Adapt digital iMuse to use SeekableAudioStream::seek, instead of ryling on the deprecated FLAC, Vorbis and MP3 interface.

svn-id: r47064
This commit is contained in:
Johannes Schickel 2010-01-06 00:01:27 +00:00
parent fb9017c51e
commit 5243157eb1
2 changed files with 5 additions and 4 deletions

View File

@ -704,17 +704,18 @@ int32 ImuseDigiSndMgr::getDataFromRegion(SoundDesc *soundDesc, int region, byte
assert(tmp);
#ifdef USE_FLAC
if (soundMode == 3)
soundDesc->compressedStream = Audio::makeFlacStream(tmp, true, offsetMs, 0, 1);
soundDesc->compressedStream = Audio::makeFlacStream(tmp, true);
#endif
#ifdef USE_VORBIS
if (soundMode == 2)
soundDesc->compressedStream = Audio::makeVorbisStream(tmp, true, offsetMs, 0, 1);
soundDesc->compressedStream = Audio::makeVorbisStream(tmp, true);
#endif
#ifdef USE_MAD
if (soundMode == 1)
soundDesc->compressedStream = Audio::makeMP3Stream(tmp, true, offsetMs, 0, 1);
soundDesc->compressedStream = Audio::makeMP3Stream(tmp, true);
#endif
assert(soundDesc->compressedStream);
soundDesc->compressedStream->seek(offsetMs);
}
strcpy(soundDesc->lastFileName, fileName);
}

View File

@ -101,7 +101,7 @@ public:
int type;
int volGroupId;
int disk;
Audio::AudioStream *compressedStream;
Audio::SeekableAudioStream *compressedStream;
bool compressed;
char lastFileName[24];
};