From eb9b492ce7444400246525a66a316b50f1de2bde Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 11 Jun 2011 14:09:03 +0300 Subject: SWORD25: Unstub more sound-related functions --- engines/sword25/sfx/soundengine.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'engines') diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp index e650ae6945..9244137c25 100644 --- a/engines/sword25/sfx/soundengine.cpp +++ b/engines/sword25/sfx/soundengine.cpp @@ -126,11 +126,15 @@ void SoundEngine::resumeAll() { } void SoundEngine::pauseLayer(uint layer) { - warning("STUB: SoundEngine::pauseLayer(%d)", layer); + // Not used in the game + + warning("SoundEngine::pauseLayer(%d)", layer); } void SoundEngine::resumeLayer(uint layer) { - warning("STUB: SoundEngine::resumeLayer(%d)", layer); + // Not used in the game + + warning("SoundEngine::resumeLayer(%d)", layer); } SndHandle *SoundEngine::getHandle(uint *id) { @@ -238,7 +242,9 @@ void SoundEngine::stopSound(uint handle) { } bool SoundEngine::isSoundPaused(uint handle) { - warning("STUB: SoundEngine::isSoundPaused(%d)", handle); + // Not used in the game + + warning("SoundEngine::isSoundPaused(%d)", handle); return false; } @@ -252,20 +258,18 @@ bool SoundEngine::isSoundPlaying(uint handle) { } float SoundEngine::getSoundVolume(uint handle) { - warning("STUB: SoundEngine::getSoundVolume(%d)", handle); + debugC(1, kDebugSound, "SoundEngine::getSoundVolume(%d)", handle); - return 0; + return (float)_mixer->getChannelVolume(_handles[handle].handle) / 255.0; } float SoundEngine::getSoundPanning(uint handle) { - warning("STUB: SoundEngine::getSoundPanning(%d)", handle); + debugC(1, kDebugSound, "SoundEngine::getSoundPanning(%d)", handle); - return 0; + return (float)_mixer->getChannelBalance(_handles[handle].handle) / 127.0; } Resource *SoundEngine::loadResource(const Common::String &fileName) { - warning("STUB: SoundEngine::loadResource(%s)", fileName.c_str()); - return new SoundResource(fileName); } -- cgit v1.2.3