diff --git a/sound/filters/openal_various.hpp b/sound/filters/openal_various.hpp index 87030f4b6e..945b3dabda 100644 --- a/sound/filters/openal_various.hpp +++ b/sound/filters/openal_various.hpp @@ -17,9 +17,8 @@ namespace Sound { MP3: mpg123 WAV: custom wav loader (PCM only) - This could be an alternative to using eg. libsndfile or other 3rd - party decoder libraries. (We implemented this for OpenMW because - we were experiencing crashes when using libsndfile.) + This could be an alternative to using eg. 3rd party decoder + libraries like libsndfile. */ class OpenAL_Various_Factory : public InputFilter { diff --git a/sound/sources/mpg123_source.cpp b/sound/sources/mpg123_source.cpp index 8a0dbd1029..b0eeb77bbd 100644 --- a/sound/sources/mpg123_source.cpp +++ b/sound/sources/mpg123_source.cpp @@ -106,11 +106,6 @@ Mpg123Source::Mpg123Source(const std::string &file) // This is the only bit size we support. bits = 16; - - // Ensure the output format does not change. (The tutorial on the - // mpg123 site did this, I assume it's kosher.) - mpg123_format_none(mhh); - mpg123_format(mhh,rate,channels,encoding); } Mpg123Source::~Mpg123Source() diff --git a/sound/sources/wav_source.cpp b/sound/sources/wav_source.cpp index 5ee87d492a..8e3e8558cf 100644 --- a/sound/sources/wav_source.cpp +++ b/sound/sources/wav_source.cpp @@ -30,7 +30,10 @@ size_t WavSource::read(void *data, size_t length) { if(length > left) length = left; - input->read(data, length); + size_t read = input->read(data, length); + if(read < length) + // Something went wrong + fail("WAV read error"); return length; }