aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorNicolas Bacca2002-11-21 08:46:01 +0000
committerNicolas Bacca2002-11-21 08:46:01 +0000
commitcb160cfbf369c8a66d7ad9e6bfdecfaacc826ef2 (patch)
treedbf4db5fb83c85ccbb115aa61b1114c9c552fd9f /sound
parent949716c08a78f76452586af7127aea582c0bec04 (diff)
downloadscummvm-rg350-cb160cfbf369c8a66d7ad9e6bfdecfaacc826ef2.tar.gz
scummvm-rg350-cb160cfbf369c8a66d7ad9e6bfdecfaacc826ef2.tar.bz2
scummvm-rg350-cb160cfbf369c8a66d7ad9e6bfdecfaacc826ef2.zip
Adapt MAD sampling rate to the real sampling rate for WinCE
svn-id: r5657
Diffstat (limited to 'sound')
-rw-r--r--sound/mixer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index 9f6ec44b24..f04538aba0 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -777,8 +777,9 @@ SoundMixer::ChannelMP3::ChannelMP3(SoundMixer * mixer, void * sound, uint size,
mad_stream_init(&_stream);
#ifdef _WIN32_WCE
- // 11 kHz on WinCE
- mad_stream_options(&_stream, MAD_OPTION_HALFSAMPLERATE);
+ // 11 kHz on WinCE if necessary
+ if ((uint)_mixer->_syst->property(OSystem::PROP_GET_SAMPLE_RATE, 0) != 22050)
+ mad_stream_options(&_stream, MAD_OPTION_HALFSAMPLERATE);
#endif
mad_frame_init(&_frame);
mad_synth_init(&_synth);
@@ -896,8 +897,9 @@ SoundMixer::ChannelMP3CDMusic::ChannelMP3CDMusic(SoundMixer * mixer, File * file
mad_stream_init(&_stream);
#ifdef _WIN32_WCE
- // 11 kHz on WinCE
- mad_stream_options(&_stream, MAD_OPTION_HALFSAMPLERATE);
+ // 11 kHz on WinCE if necessary
+ if ((uint)_mixer->_syst->property(OSystem::PROP_GET_SAMPLE_RATE, 0) != 22050)
+ mad_stream_options(&_stream, MAD_OPTION_HALFSAMPLERATE);
#endif
mad_frame_init(&_frame);
mad_synth_init(&_synth);