- Run libsndfile before libmpg123 when reading an audio lump.

libmpg123 spews quite a lot of debug stuff in stdout when encountering files like WAV or Ogg Vorbis, while libsndfile is silent when encountering an MP3 file.
This commit is contained in:
Edoardo Prezioso 2017-01-17 16:11:49 +01:00 committed by Christoph Oelckers
parent c4aaeef6b1
commit 0da1142bdb

View file

@ -615,8 +615,8 @@ SoundDecoder *SoundRenderer::CreateDecoder(FileReader *reader)
SoundDecoder *decoder = NULL;
int pos = reader->Tell();
#ifdef HAVE_MPG123
decoder = new MPG123Decoder;
#ifdef HAVE_SNDFILE
decoder = new SndFileDecoder;
if (decoder->open(reader))
return decoder;
reader->Seek(pos, SEEK_SET);
@ -624,8 +624,8 @@ SoundDecoder *SoundRenderer::CreateDecoder(FileReader *reader)
delete decoder;
decoder = NULL;
#endif
#ifdef HAVE_SNDFILE
decoder = new SndFileDecoder;
#ifdef HAVE_MPG123
decoder = new MPG123Decoder;
if (decoder->open(reader))
return decoder;
reader->Seek(pos, SEEK_SET);