From 9ebbeda949c0a4da2c5a3ecb588a718bb867c0d4 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Tue, 28 Aug 2012 20:25:48 +0200 Subject: TONY: Implement some forgotten sound/music functions. --- engines/tony/tony.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'engines/tony') diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp index b9d12beb11..05c195f8ba 100644 --- a/engines/tony/tony.cpp +++ b/engines/tony/tony.cpp @@ -518,13 +518,28 @@ void TonyEngine::closeMusic() { } void TonyEngine::pauseSound(bool bPause) { + _theEngine.pauseSound(bPause); + + for (uint i = 0; i < 6; i++) + if (_stream[i]) + _stream[i]->pause(bPause); + + for (uint i = 0; i < MAX_SFX_CHANNELS; i++) { + if (_sfx[i]) + _sfx[i]->pause(bPause); + if (_utilSfx[i]) + _utilSfx[i]->pause(bPause); + } } void TonyEngine::setMusicVolume(int nChannel, int volume) { + _stream[nChannel + GLOBALS._flipflop]->setVolume(volume); } int TonyEngine::getMusicVolume(int nChannel) { - return 255; + int volume; + _stream[nChannel + GLOBALS._flipflop]->getVolume(&volume); + return volume; } Common::String TonyEngine::getSaveStateFileName(int n) { -- cgit v1.2.3