diff options
author | Alyssa Milburn | 2012-08-29 09:12:53 +0200 |
---|---|---|
committer | Alyssa Milburn | 2012-08-29 09:12:53 +0200 |
commit | a6673aaf906505341d8ef259db69efc0f4c540fe (patch) | |
tree | 06b26530df577f647c29a52be0d3ecd551306514 /engines | |
parent | a29f1fb04ca4ee84986c359f1a1743d16c675487 (diff) | |
download | scummvm-rg350-a6673aaf906505341d8ef259db69efc0f4c540fe.tar.gz scummvm-rg350-a6673aaf906505341d8ef259db69efc0f4c540fe.tar.bz2 scummvm-rg350-a6673aaf906505341d8ef259db69efc0f4c540fe.zip |
TONY: Remove useless/commented music code.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tony/globals.h | 1 | ||||
-rw-r--r-- | engines/tony/sound.cpp | 12 | ||||
-rw-r--r-- | engines/tony/sound.h | 2 | ||||
-rw-r--r-- | engines/tony/tony.cpp | 12 |
4 files changed, 5 insertions, 22 deletions
diff --git a/engines/tony/globals.h b/engines/tony/globals.h index e353d40f3b..0911782eac 100644 --- a/engines/tony/globals.h +++ b/engines/tony/globals.h @@ -180,7 +180,6 @@ public: int _nextSync; int _curChannel; int _flipflop; - // OSystem::MutexRef csMusic; CharacterStruct _character[16]; MCharacterStruct _mCharacter[10]; ChangedHotspotStruct _changedHotspot[256]; diff --git a/engines/tony/sound.cpp b/engines/tony/sound.cpp index 0f9f1c2bbe..e8b9dfc42a 100644 --- a/engines/tony/sound.cpp +++ b/engines/tony/sound.cpp @@ -583,7 +583,7 @@ bool FPStream::play() { * */ -bool FPStream::stop(bool bSync) { +bool FPStream::stop() { if (!_bSoundSupported) return true; @@ -593,15 +593,9 @@ bool FPStream::stop(bool bSync) { if (!g_system->getMixer()->isSoundHandleActive(_handle)) return false; - if (bSync) { - // The caller intends to call waitForSync. - // FIXME: Why call this in that case?! Looks like old code. Remove that parameter. - return true; - } else { - g_system->getMixer()->stopHandle(_handle); + g_system->getMixer()->stopHandle(_handle); - _bPaused = false; - } + _bPaused = false; return true; } diff --git a/engines/tony/sound.h b/engines/tony/sound.h index bd858e5bca..73938ecd8c 100644 --- a/engines/tony/sound.h +++ b/engines/tony/sound.h @@ -333,7 +333,7 @@ public: * @returns True is everything is OK, False otherwise */ - bool stop(bool bSync = false); + bool stop(); void waitForSync(FPStream *toplay); /** diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp index 79300ca1ee..d135f66fde 100644 --- a/engines/tony/tony.cpp +++ b/engines/tony/tony.cpp @@ -364,7 +364,6 @@ void TonyEngine::doNextMusic(CORO_PARAM, const void *param) { streams[GLOBALS._nextChannel]->setLoop(GLOBALS._nextLoop); //streams[GLOBALS._nextChannel]->prefetch(); - streams[GLOBALS._curChannel]->stop(true); streams[GLOBALS._curChannel]->waitForSync(streams[GLOBALS._nextChannel]); streams[GLOBALS._curChannel]->unloadFile(); @@ -392,14 +391,10 @@ void TonyEngine::playSFX(int nChannel, int nFX) { } void TonyEngine::stopMusic(int nChannel) { -// g_system->lockMutex(csMusic); - if (nChannel < 4) _stream[nChannel + GLOBALS._flipflop]->stop(); else _stream[nChannel]->stop(); - -// g_system->unlockMutex(csMusic); } void TonyEngine::stopSFX(int nChannel) { @@ -484,7 +479,7 @@ void TonyEngine::unloadAllUtilSFX() { void TonyEngine::initMusic() { int i; - _theSound.init(/*_window*/); + _theSound.init(); _theSound.setMasterVolume(63); for (i = 0; i < 6; i++) @@ -494,9 +489,6 @@ void TonyEngine::initMusic() { _sfx[i] = _utilSfx[i] = NULL; } - // Create the mutex for controlling music access -// csMusic = g_system->createMutex(); - // Preload sound effects preloadUtilSFX(0, "U01.ADP"); // Reversed!! preloadUtilSFX(1, "U02.ADP"); @@ -512,8 +504,6 @@ void TonyEngine::closeMusic() { _stream[i]->release(); } -// g_system->deleteMutex(csMusic); - unloadAllSFX(); unloadAllUtilSFX(); } |