diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/imuse_digi/dimuse.cpp | 10 | ||||
-rw-r--r-- | scumm/imuse_digi/dimuse.h | 6 | ||||
-rw-r--r-- | scumm/imuse_digi/dimuse_sndmgr.cpp | 48 | ||||
-rw-r--r-- | scumm/imuse_digi/dimuse_sndmgr.h | 2 |
4 files changed, 33 insertions, 33 deletions
diff --git a/scumm/imuse_digi/dimuse.cpp b/scumm/imuse_digi/dimuse.cpp index 0abcc59043..58b71f4694 100644 --- a/scumm/imuse_digi/dimuse.cpp +++ b/scumm/imuse_digi/dimuse.cpp @@ -198,7 +198,7 @@ void IMuseDigital::switchToNextRegion(int track) { _track[track].regionOffset = 0; } -void IMuseDigital::startSound(int soundId, char *soundName, int soundType, int soundGroup, AudioStream *input) { +void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, int soundGroup, AudioStream *input) { debug(5, "IMuseDigital::startSound(%d)", soundId); int l; @@ -418,7 +418,7 @@ void IMuseDigital::parseScriptCmds(int a, int b, int c, int d, int e, int f, int int music = _digStateMusicMap[l].table_index; debug(5, "Play imuse music: %s, %s, %s", _digStateMusicTable[music].name, _digStateMusicTable[music].title, _digStateMusicTable[music].filename); if (_digStateMusicTable[music].filename[0] != 0) { - startMusic((char *)_digStateMusicTable[music].filename, _digStateMusicTable[music].id); + startMusic(_digStateMusicTable[music].filename, _digStateMusicTable[music].id); } break; } @@ -446,7 +446,7 @@ void IMuseDigital::parseScriptCmds(int a, int b, int c, int d, int e, int f, int if ((_comiStateMusicTable[l].id == b)) { debug(5, "Play imuse music: %s, %s, %s", _comiStateMusicTable[l].name, _comiStateMusicTable[l].title, _comiStateMusicTable[l].filename); if (_comiStateMusicTable[l].filename[0] != 0) { - startMusic((char *)_comiStateMusicTable[l].filename, b); + startMusic(_comiStateMusicTable[l].filename, b); } break; } @@ -477,7 +477,7 @@ void IMuseDigital::parseScriptCmds(int a, int b, int c, int d, int e, int f, int if (_digSeqMusicTable[l].room == b) { debug(5, "Play imuse music: %s, %s, %s", _digSeqMusicTable[l].name, _digSeqMusicTable[l].title, _digSeqMusicTable[l].filename); if (_digSeqMusicTable[l].filename[0] != 0) { - startMusic((char *)_digSeqMusicTable[l].filename, b); + startMusic(_digSeqMusicTable[l].filename, b); } break; } @@ -487,7 +487,7 @@ void IMuseDigital::parseScriptCmds(int a, int b, int c, int d, int e, int f, int if (_comiSeqMusicTable[l].id == b) { debug(5, "Play imuse music: %s, %s, %s", _comiSeqMusicTable[l].name, _comiSeqMusicTable[l].title, _comiSeqMusicTable[l].filename); if (_comiSeqMusicTable[l].filename[0] != 0) { - startMusic((char *)_comiSeqMusicTable[l].filename, b); + startMusic(_comiSeqMusicTable[l].filename, b); } break; } diff --git a/scumm/imuse_digi/dimuse.h b/scumm/imuse_digi/dimuse.h index 5d093920c7..cfabb3783f 100644 --- a/scumm/imuse_digi/dimuse.h +++ b/scumm/imuse_digi/dimuse.h @@ -75,7 +75,7 @@ private: static void timer_handler(void *refConf); void callback(); void switchToNextRegion(int track); - void startSound(int soundId, char *soundName, int soundType, int soundGroup, AudioStream *input); + void startSound(int soundId, const char *soundName, int soundType, int soundGroup, AudioStream *input); public: IMuseDigital(ScummEngine *scumm); @@ -85,11 +85,11 @@ public: { debug(5, "startVoiceStream(%d)", soundId); startSound(soundId, NULL, 0, IMUSE_VOICE, input); } void startVoice(int soundId) { debug(5, "startVoiceBundle(%d)", soundId); startSound(soundId, NULL, IMUSE_BUNDLE, IMUSE_VOICE, NULL); } - void startVoice(int soundId, char *soundName) + void startVoice(int soundId, const char *soundName) { debug(5, "startVoiceBundle(%s)", soundName); startSound(soundId, soundName, IMUSE_BUNDLE, IMUSE_VOICE, NULL); } void startMusic(int soundId) { debug(5, "startMusicResource(%d)", soundId); startSound(soundId, NULL, IMUSE_RESOURCE, IMUSE_MUSIC, NULL); } - void startMusic(char *soundName, int soundId) + void startMusic(const char *soundName, int soundId) { debug(5, "startMusicBundle(%s)", soundName); startSound(soundId, soundName, IMUSE_BUNDLE, IMUSE_MUSIC, NULL); } void startSfx(int soundId) { debug(5, "startSfx(%d)", soundId); startSound(soundId, NULL, IMUSE_RESOURCE, IMUSE_SFX, NULL); } diff --git a/scumm/imuse_digi/dimuse_sndmgr.cpp b/scumm/imuse_digi/dimuse_sndmgr.cpp index 51a3e5eb09..098bebf74b 100644 --- a/scumm/imuse_digi/dimuse_sndmgr.cpp +++ b/scumm/imuse_digi/dimuse_sndmgr.cpp @@ -44,24 +44,24 @@ ImuseDigiSndMgr::~ImuseDigiSndMgr() { } void ImuseDigiSndMgr::waitForFreeAccess() { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); while (!_accessFree) { } } void ImuseDigiSndMgr::lock() { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); waitForFreeAccess(); _accessFree = false; } void ImuseDigiSndMgr::unlock() { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); _accessFree = true; } void ImuseDigiSndMgr::prepareSound(byte *ptr, int slot) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); if (READ_UINT32(ptr) == MKID('Crea')) { int size, rate, loops; _sounds[slot].resPtr = readVOCFromMemory(ptr, size, rate, loops); @@ -143,7 +143,7 @@ void ImuseDigiSndMgr::prepareSound(byte *ptr, int slot) { } int ImuseDigiSndMgr::allocSlot() { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); for (int l = 0; l < MAX_IMUSE_SOUNDS; l++) { if (!_sounds[l].inUse) { _sounds[l].inUse = true; @@ -155,7 +155,7 @@ int ImuseDigiSndMgr::allocSlot() { } bool ImuseDigiSndMgr::openMusicBundle(int slot) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); bool result = false; _sounds[slot]._bundle = new BundleMgr(); @@ -183,7 +183,7 @@ bool ImuseDigiSndMgr::openMusicBundle(int slot) { } bool ImuseDigiSndMgr::openVoiceBundle(int slot) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); bool result = false; _sounds[slot]._bundle = new BundleMgr(); @@ -210,10 +210,10 @@ bool ImuseDigiSndMgr::openVoiceBundle(int slot) { return result; } -void *ImuseDigiSndMgr::openSound(int32 soundId, char *soundName, int soundType, int soundGroup) { +void *ImuseDigiSndMgr::openSound(int32 soundId, const char *soundName, int soundType, int soundGroup) { assert(soundId >= 0); assert(soundType); - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); int slot = allocSlot(); @@ -277,7 +277,7 @@ void *ImuseDigiSndMgr::openSound(int32 soundId, char *soundName, int soundType, void ImuseDigiSndMgr::closeSound(void *soundHandle) { assert(soundHandle && checkForProperHandle(soundHandle)); - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); for (int l = 0; l < MAX_IMUSE_SOUNDS; l++) { if (&_sounds[l] == soundHandle) { @@ -291,7 +291,7 @@ void ImuseDigiSndMgr::closeSound(void *soundHandle) { } bool ImuseDigiSndMgr::checkForProperHandle(void *soundHandle) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); for (int l = 0; l < MAX_IMUSE_SOUNDS; l++) { if (soundHandle == &_sounds[l]) return true; @@ -300,7 +300,7 @@ bool ImuseDigiSndMgr::checkForProperHandle(void *soundHandle) { } int ImuseDigiSndMgr::getFreq(void *soundHandle) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); int result = ((soundStruct *)soundHandle)->freq; @@ -309,7 +309,7 @@ int ImuseDigiSndMgr::getFreq(void *soundHandle) { } int ImuseDigiSndMgr::getBits(void *soundHandle) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); int result = ((soundStruct *)soundHandle)->bits; @@ -318,7 +318,7 @@ int ImuseDigiSndMgr::getBits(void *soundHandle) { } int ImuseDigiSndMgr::getChannels(void *soundHandle) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); int result = ((soundStruct *)soundHandle)->channels; @@ -327,7 +327,7 @@ int ImuseDigiSndMgr::getChannels(void *soundHandle) { } bool ImuseDigiSndMgr::isEndOfRegion(void *soundHandle, int region) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); assert(region >= 0 && region < ((soundStruct *)soundHandle)->numRegions); @@ -337,7 +337,7 @@ bool ImuseDigiSndMgr::isEndOfRegion(void *soundHandle, int region) { } int ImuseDigiSndMgr::getNumRegions(void *soundHandle) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); int result = ((soundStruct *)soundHandle)->numRegions; @@ -346,7 +346,7 @@ int ImuseDigiSndMgr::getNumRegions(void *soundHandle) { } int ImuseDigiSndMgr::getNumJumps(void *soundHandle) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); int result = ((soundStruct *)soundHandle)->numJumps; @@ -355,7 +355,7 @@ int ImuseDigiSndMgr::getNumJumps(void *soundHandle) { } int ImuseDigiSndMgr::getNumMarkers(void *soundHandle) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); int result = ((soundStruct *)soundHandle)->numMarkers; @@ -364,7 +364,7 @@ int ImuseDigiSndMgr::getNumMarkers(void *soundHandle) { } int ImuseDigiSndMgr::getJumpIdByRegion(void *soundHandle, int number) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); assert(number >= 0 && number < ((soundStruct *)soundHandle)->numRegions); @@ -379,7 +379,7 @@ int ImuseDigiSndMgr::getJumpIdByRegion(void *soundHandle, int number) { } int ImuseDigiSndMgr::getJumpDestRegionId(void *soundHandle, int number) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); assert(number >= 0 && number < ((soundStruct *)soundHandle)->numJumps); @@ -395,7 +395,7 @@ int ImuseDigiSndMgr::getJumpDestRegionId(void *soundHandle, int number) { } int ImuseDigiSndMgr::getJumpHookId(void *soundHandle, int number) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); assert(number >= 0 && number < ((soundStruct *)soundHandle)->numJumps); @@ -405,7 +405,7 @@ int ImuseDigiSndMgr::getJumpHookId(void *soundHandle, int number) { } int ImuseDigiSndMgr::getJumpFade(void *soundHandle, int number) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); assert(number >= 0 && number < ((soundStruct *)soundHandle)->numJumps); @@ -414,7 +414,7 @@ int ImuseDigiSndMgr::getJumpFade(void *soundHandle, int number) { } char *ImuseDigiSndMgr::getMarker(void *soundHandle, int number) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); assert(number >= 0 && number < ((soundStruct *)soundHandle)->numMarkers); @@ -424,7 +424,7 @@ char *ImuseDigiSndMgr::getMarker(void *soundHandle, int number) { } int32 ImuseDigiSndMgr::getDataFromRegion(void *soundHandle, int region, byte **buf, int32 offset, int32 size) { - Common::StackLock lock(_mutex); + Common::StackLock tmpLock(_mutex); ImuseDigiSndMgr::lock(); assert(soundHandle && checkForProperHandle(soundHandle)); assert(buf && offset >= 0 && size >= 0); diff --git a/scumm/imuse_digi/dimuse_sndmgr.h b/scumm/imuse_digi/dimuse_sndmgr.h index 9ac8cf7f32..4226f1941c 100644 --- a/scumm/imuse_digi/dimuse_sndmgr.h +++ b/scumm/imuse_digi/dimuse_sndmgr.h @@ -102,7 +102,7 @@ public: ImuseDigiSndMgr(ScummEngine *scumm); ~ImuseDigiSndMgr(); - void *openSound(int32 soundId, char *soundName, int soundType, int soundGroup); + void *openSound(int32 soundId, const char *soundName, int soundType, int soundGroup); void closeSound(void *soundHandle); int getFreq(void *soundHandle); |