mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-22 01:39:57 +00:00
TONY: Remove useless/commented music code.
This commit is contained in:
parent
a29f1fb04c
commit
a6673aaf90
@ -180,7 +180,6 @@ public:
|
||||
int _nextSync;
|
||||
int _curChannel;
|
||||
int _flipflop;
|
||||
// OSystem::MutexRef csMusic;
|
||||
CharacterStruct _character[16];
|
||||
MCharacterStruct _mCharacter[10];
|
||||
ChangedHotspotStruct _changedHotspot[256];
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ public:
|
||||
* @returns True is everything is OK, False otherwise
|
||||
*/
|
||||
|
||||
bool stop(bool bSync = false);
|
||||
bool stop();
|
||||
void waitForSync(FPStream *toplay);
|
||||
|
||||
/**
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user