diff options
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/sound/audio_buffer.h | 4 | ||||
-rw-r--r-- | engines/titanic/sound/sound_manager.cpp | 3 | ||||
-rw-r--r-- | engines/titanic/sound/wave_file.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/engines/titanic/sound/audio_buffer.h b/engines/titanic/sound/audio_buffer.h index 1f157b9346..ad8c3e4064 100644 --- a/engines/titanic/sound/audio_buffer.h +++ b/engines/titanic/sound/audio_buffer.h @@ -28,10 +28,12 @@ namespace Titanic { +#define AUDIO_SAMPLING_RATE 22050 + class CAudioBuffer { private: Common::Mutex _mutex; - FixedQueue<int16, 88200> _data; + FixedQueue<int16, AUDIO_SAMPLING_RATE * 4> _data; public: bool _finished; public: diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp index a4d838ce2f..677ae0b7f3 100644 --- a/engines/titanic/sound/sound_manager.cpp +++ b/engines/titanic/sound/sound_manager.cpp @@ -26,7 +26,6 @@ namespace Titanic { -const uint SAMPLING_RATE = 22050; const uint LATENCY = 100; const uint CHANNELS_COUNT = 16; @@ -110,7 +109,7 @@ QSoundManager::QSoundManager(Audio::Mixer *mixer) : CSoundManager(), QMixer(mixe Common::fill(&_channelsVolume[0], &_channelsVolume[16], 0); Common::fill(&_channelsMode[0], &_channelsMode[16], 0); - qsWaveMixInitEx(QMIXCONFIG(SAMPLING_RATE, CHANNELS_COUNT, LATENCY)); + qsWaveMixInitEx(QMIXCONFIG(AUDIO_SAMPLING_RATE, CHANNELS_COUNT, LATENCY)); qsWaveMixActivate(true); qsWaveMixOpenChannel(0, QMIX_OPENALL); } diff --git a/engines/titanic/sound/wave_file.cpp b/engines/titanic/sound/wave_file.cpp index c1aab42a7f..e57e9f0ee2 100644 --- a/engines/titanic/sound/wave_file.cpp +++ b/engines/titanic/sound/wave_file.cpp @@ -188,7 +188,7 @@ const int16 *CWaveFile::lock() { switch (_loadMode) { case LOADMODE_SCUMMVM: // Sanity checking that only raw 16-bit LE 22Khz waves can be locked - assert(_waveData && _rate == 22050); + assert(_waveData && _rate == AUDIO_SAMPLING_RATE); assert(_flags == (Audio::FLAG_LITTLE_ENDIAN | Audio::FLAG_16BITS)); assert(_wavType == kWaveFormatPCM); |