This commit is contained in:
Grigory Chudov
2018-10-21 14:12:25 -04:00
30 changed files with 1470 additions and 121 deletions

View File

@@ -20,7 +20,7 @@ namespace CUETools.Codecs.libFLAC
public string Name => "libFLAC";
[Browsable(false)]
public Type DecoderType => typeof(Reader);
public Type DecoderType => typeof(AudioDecoder);
[Browsable(false)]
public int Priority => 1;
@@ -37,9 +37,9 @@ namespace CUETools.Codecs.libFLAC
}
}
public unsafe class Reader : IAudioSource
public unsafe class AudioDecoder : IAudioSource
{
public Reader(DecoderSettings settings, string path, Stream IO)
public AudioDecoder(DecoderSettings settings, string path, Stream IO)
{
m_settings = settings;
@@ -306,6 +306,8 @@ namespace CUETools.Codecs.libFLAC
public string Path => m_path;
public TimeSpan Duration => Length < 0 ? TimeSpan.Zero : TimeSpan.FromSeconds((double)Length / PCM.SampleRate);
public long Length => m_sampleCount;
private int SamplesInBuffer => m_bufferLength - m_bufferOffset;