- added a dedicated player class for streamed music formats (i.e. MP3, Ogg and Flac)

The idea is to have more control on the game side instead of dealing with these formats in the backend, which was done for FMod because it already had the decoders implemented.
However, with OpenAL this setup makes no sense and only complicates future extensions that can be better handled at a higher level.
This commit is contained in:
Christoph Oelckers 2017-04-01 19:46:38 +02:00
commit dfd3535e02
11 changed files with 281 additions and 11 deletions

View file

@ -132,9 +132,9 @@ TArray<char> SndFileDecoder::readAll()
return output;
}
bool SndFileDecoder::seek(size_t ms_offset)
bool SndFileDecoder::seek(size_t ms_offset, bool ms)
{
size_t smp_offset = (size_t)((double)ms_offset / 1000. * SndInfo.samplerate);
size_t smp_offset = ms? (size_t)((double)ms_offset / 1000. * SndInfo.samplerate) : ms_offset;
if(sf_seek(SndFile, smp_offset, SEEK_SET) < 0)
return false;
return true;