WAV can also be read from RAR archive

This commit is contained in:
chudov
2008-11-10 09:31:14 +00:00
parent e028a4d1e8
commit df34997334
3 changed files with 104 additions and 40 deletions

View File

@@ -13,10 +13,10 @@ namespace CUEToolsLib {
public static IAudioSource GetAudioSource(string path) {
switch (Path.GetExtension(path).ToLower()) {
case ".wav":
return new WAVReader(path);
return new WAVReader(path, null);
#if !MONO
case ".flac":
return new FLACReader(path);
return new FLACReader(path, null);
case ".wv":
return new WavPackReader(path);
case ".ape":
@@ -32,6 +32,8 @@ namespace CUEToolsLib {
{
switch (Path.GetExtension(path).ToLower())
{
case ".wav":
return new WAVReader(path, IO);
#if !MONO
case ".flac":
return new FLACReader(path, IO);
@@ -70,12 +72,6 @@ namespace CUEToolsLib {
int[,] _sampleBuffer;
uint _bufferOffset, _bufferLength;
public FLACReader(string path) {
_flacReader = new FLACDotNet.FLACReader(path, null);
_bufferOffset = 0;
_bufferLength = 0;
}
public FLACReader(string path, Stream IO)
{
_flacReader = new FLACDotNet.FLACReader(path, IO);