Skip to content

Commit

Permalink
codec: decode wav from stream
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSnowfield committed Mar 24, 2024
1 parent b9d9d5c commit b79484f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Konata.Codec/Audio/Codecs/WavCodec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public override int Read(byte[] buffer, int offset, int count)
/// </summary>
public class Decoder : AudioStream
{
private readonly FileStream _stream;
private readonly Stream _stream;
private readonly AudioInfo _output;

/// <summary>
Expand All @@ -108,6 +108,15 @@ public Decoder(string file)
_stream = File.OpenRead(file);
_output = GetProfileAndMove(_stream);
}

/// <summary>
/// Vorbis decoder
/// </summary>
public Decoder(Stream file)
{
_stream = file;
_output = GetProfileAndMove(_stream);
}

/// <summary>
/// Get adaptive output
Expand Down

0 comments on commit b79484f

Please sign in to comment.