From 70f8f689a152aee9a599c310a09da0a72508af6d Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Fri, 16 Jul 2004 10:24:29 +0000 Subject: Applied patch #957544 to make output sample rate configurable at runtime. svn-id: r14225 --- sound/mixer.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sound') diff --git a/sound/mixer.cpp b/sound/mixer.cpp index b67b0c782b..40dfe8b3be 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -111,11 +111,6 @@ SoundMixer::SoundMixer() { _premixProc = 0; int i = 0; - _outputRate = (uint) _syst->getOutputSampleRate(); - - if (_outputRate == 0) - error("OSystem returned invalid sample rate"); - _globalVolume = 0; _musicVolume = 0; @@ -125,6 +120,12 @@ SoundMixer::SoundMixer() { _channels[i] = 0; _mixerReady = _syst->setSoundCallback(mixCallback, this); + _outputRate = (uint) _syst->getOutputSampleRate(); + + if (_outputRate == 0) + error("OSystem returned invalid sample rate"); + + debug(1, "Output sample rate: %d Hz", _outputRate); } SoundMixer::~SoundMixer() { -- cgit v1.2.3