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