refactored SoundInput interface.

added Source property for access to underlying stream.
This commit is contained in:
morkt
2015-05-14 11:26:47 +04:00
parent 7e5dc325c0
commit 9a43b6b055
7 changed files with 64 additions and 43 deletions

View File

@@ -48,16 +48,18 @@ namespace GameRes.Formats
}
}
public override bool CanSeek { get { return m_input.CanSeek; } }
public override bool CanSeek { get { return Source.CanSeek; } }
public override int SourceBitrate
{
get { return m_reader.NominalBitrate; }
}
public override string SourceFormat { get { return "ogg"; } }
public OggInput (Stream file) : base (file)
{
m_reader = new VorbisReader (m_input, false);
m_reader = new VorbisReader (Source, false);
var format = new GameRes.WaveFormat();
format.FormatTag = 3; // WAVE_FORMAT_IEEE_FLOAT
format.Channels = (ushort)m_reader.Channels;