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

@@ -47,9 +47,11 @@ namespace GameRes.Formats
get { return m_bitrate; }
}
public override string SourceFormat { get { return "mp3"; } }
public Mp3Input (Stream file) : base (file)
{
m_reader = new Mp3FileReader (m_input);
m_reader = new Mp3FileReader (file);
m_bitrate = m_reader.Mp3WaveFormat.AverageBytesPerSecond*8;
var format = new GameRes.WaveFormat();
format.FormatTag = (ushort)m_reader.WaveFormat.Encoding;