aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-10-20 12:22:30 +0000
committerMax Horn2009-10-20 12:22:30 +0000
commit66fae7bc8a2557e876ed7fbcc2738adad175ad88 (patch)
tree7ed6a630f46721f9fcee73afab365c873612b3ea
parent5ce23633e26a66f8a3ba4bfe88b4bb7f23622d6e (diff)
downloadscummvm-rg350-66fae7bc8a2557e876ed7fbcc2738adad175ad88.tar.gz
scummvm-rg350-66fae7bc8a2557e876ed7fbcc2738adad175ad88.tar.bz2
scummvm-rg350-66fae7bc8a2557e876ed7fbcc2738adad175ad88.zip
AGI: Change g_useChorus to SoundMgr::_useChorus, and add FIXME comment about it always being true (so maybe it can be removed?)
svn-id: r45266
-rw-r--r--engines/agi/sound.cpp8
-rw-r--r--engines/agi/sound.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index 05cbdaba5e..5e52a66d91 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -35,7 +35,6 @@
namespace Agi {
#define USE_INTERPOLATION
-static bool g_useChorus = true;
//
// TODO: add support for variable sampling rate in the output device
@@ -504,7 +503,7 @@ void SoundMgr::deinitSound() {
void SoundMgr::stopNote(int i) {
_chn[i].adsr = AGI_SOUND_ENV_RELEASE;
- if (g_useChorus) {
+ if (_useChorus) {
// Stop chorus ;)
if (_chn[i].type == AGI_SOUND_4CHN &&
_vm->_soundemu == SOUND_EMU_NONE && i < 3) {
@@ -525,7 +524,7 @@ void SoundMgr::playNote(int i, int freq, int vol) {
_chn[i].env = 0x10000;
_chn[i].adsr = AGI_SOUND_ENV_ATTACK;
- if (g_useChorus) {
+ if (_useChorus) {
// Add chorus ;)
if (_chn[i].type == AGI_SOUND_4CHN &&
_vm->_soundemu == SOUND_EMU_NONE && i < 3) {
@@ -880,7 +879,7 @@ void SoundMgr::playAgiSound() {
_chn[i].vol = 0;
_chn[i].env = 0;
- if (g_useChorus) {
+ if (_useChorus) {
// chorus
if (_chn[i].type == AGI_SOUND_4CHN && _vm->_soundemu == SOUND_EMU_NONE && i < 3) {
_chn[i + 4].vol = 0;
@@ -1305,6 +1304,7 @@ SoundMgr::SoundMgr(AgiBase *agi, Audio::Mixer *pMixer) : _chn() {
_sndBuffer = (int16 *)calloc(2, BUFFER_SIZE);
_waveform = 0;
_disabledMidi = false;
+ _useChorus = true; // FIXME: Currently always true?
}
void SoundMgr::premixerCall(int16 *data, uint len) {
diff --git a/engines/agi/sound.h b/engines/agi/sound.h
index 9611b29b61..f873e043c3 100644
--- a/engines/agi/sound.h
+++ b/engines/agi/sound.h
@@ -489,6 +489,8 @@ private:
int16 *_sndBuffer;
const int16 *_waveform;
+ bool _useChorus;
+
void premixerCall(int16 *buf, uint len);
void fillAudio(void *udata, int16 *stream, uint len);