From a6a1e91976bf4ab11b57566d96a134f2797a7326 Mon Sep 17 00:00:00 2001 From: Bill Meltsner Date: Sat, 15 Jan 2011 14:32:02 -0600 Subject: [PATCH] mp3s sampled at rates other than 44.1KHz will play properly now (fixes issue #170) --- src/modules/sound/lullaby/Mpg123Decoder.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/sound/lullaby/Mpg123Decoder.cpp b/src/modules/sound/lullaby/Mpg123Decoder.cpp index 342bb77f5..94eea2a5a 100644 --- a/src/modules/sound/lullaby/Mpg123Decoder.cpp +++ b/src/modules/sound/lullaby/Mpg123Decoder.cpp @@ -116,6 +116,8 @@ namespace lullaby int ret = mpg123_getformat(handle, &rate, &channels, &encoding); if (rate == 0) rate = sampleRate; + else + sampleRate = rate; if (channels == 0) channels = MPG123_STEREO; if (encoding == 0)