aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tony/sound.cpp')
-rw-r--r--engines/tony/sound.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/engines/tony/sound.cpp b/engines/tony/sound.cpp
index 8697d7ce29..90ae241db0 100644
--- a/engines/tony/sound.cpp
+++ b/engines/tony/sound.cpp
@@ -45,8 +45,8 @@ namespace Tony {
* to the linear scale used by the mixer.
*/
static int remapVolume(int volume) {
- double dsvol = (double)(63 - volume) * -10000.0 / 63.0;
- return (int)((double)Audio::Mixer::kMaxChannelVolume * pow(10.0, dsvol / 2000.0) + 0.5);
+ double dsvol = (double)(63 - volume) * -10000.0 / 63.0;
+ return (int)((double)Audio::Mixer::kMaxChannelVolume * pow(10.0, dsvol / 2000.0) + 0.5);
}
/****************************************************************************\
@@ -75,7 +75,6 @@ bool FPSound::init() {
* Destroy the object and free the memory
*
*/
-
FPSound::~FPSound() {
}
@@ -86,7 +85,6 @@ FPSound::~FPSound() {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSound::createStream(FPStream **streamPtr) {
(*streamPtr) = new FPStream(_soundSupported);
@@ -100,7 +98,6 @@ bool FPSound::createStream(FPStream **streamPtr) {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSound::createSfx(FPSfx **sfxPtr) {
(*sfxPtr) = new FPSfx(_soundSupported);
@@ -112,7 +109,6 @@ bool FPSound::createSfx(FPSfx **sfxPtr) {
*
* @param volume Volume to set (0-63)
*/
-
void FPSound::setMasterVolume(int volume) {
if (!_soundSupported)
return;
@@ -128,7 +124,6 @@ void FPSound::setMasterVolume(int volume) {
*
* @param volumePtr Variable that will contain the volume (0-63)
*/
-
void FPSound::getMasterVolume(int *volumePtr) {
if (!_soundSupported)
return;
@@ -143,7 +138,6 @@ void FPSound::getMasterVolume(int *volumePtr) {
* create it using FPSound::CreateSfx()
*
*/
-
FPSfx::FPSfx(bool soundOn) {
_soundSupported = soundOn;
_fileLoaded = false;
@@ -164,7 +158,6 @@ FPSfx::FPSfx(bool soundOn) {
* currently played, and free the memory it uses.
*
*/
-
FPSfx::~FPSfx() {
if (!_soundSupported)
return;
@@ -189,7 +182,6 @@ FPSfx::~FPSfx() {
* FPSound::CreateStream().
* Object pointers are no longer valid after this call.
*/
-
void FPSfx::release() {
delete this;
}
@@ -231,7 +223,6 @@ bool FPSfx::loadVoiceFromVDB(Common::File &vdbFP) {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSfx::loadFile(const char *fileName, uint32 codec) {
if (!_soundSupported)
return true;
@@ -272,7 +263,6 @@ bool FPSfx::loadFile(const char *fileName, uint32 codec) {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSfx::play() {
stop(); // sanity check
@@ -307,7 +297,6 @@ bool FPSfx::play() {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSfx::stop() {
if (_fileLoaded) {
g_system->getMixer()->stopHandle(_handle);
@@ -326,7 +315,6 @@ bool FPSfx::stop() {
* playing. Any changes made during the play will have
* no effect until the sfx is stopped then played again.
*/
-
void FPSfx::setLoop(bool loop) {
_loop = loop;
}
@@ -335,7 +323,6 @@ void FPSfx::setLoop(bool loop) {
* Pauses a Sfx.
*
*/
-
void FPSfx::setPause(bool pause) {
if (_fileLoaded) {
if (g_system->getMixer()->isSoundHandleActive(_handle) && (pause ^ _paused))
@@ -351,7 +338,6 @@ void FPSfx::setPause(bool pause) {
* @param volume Volume to be set (0-63)
*
*/
-
void FPSfx::setVolume(int volume) {
if (volume > 63)
volume = 63;
@@ -389,7 +375,6 @@ void FPSfx::setVolume(int volume) {
* @param volumePtr Will contain the current Sfx volume
*
*/
-
void FPSfx::getVolume(int *volumePtr) {
if (g_system->getMixer()->isSoundHandleActive(_handle))
*volumePtr = _lastVolume;
@@ -400,7 +385,6 @@ void FPSfx::getVolume(int *volumePtr) {
/**
* Returns true if the underlying sound has ended
*/
-
bool FPSfx::endOfBuffer() const {
return !g_system->getMixer()->isSoundHandleActive(_handle) && (!_rewindableStream || _rewindableStream->endOfData());
}
@@ -456,7 +440,6 @@ FPStream::FPStream(bool soundOn) {
*
* @remarks It calls CloseFile() if needed.
*/
-
FPStream::~FPStream() {
if (!_soundSupported)
return;
@@ -599,7 +582,6 @@ bool FPStream::play() {
* @returns True is everything is OK, False otherwise
*
*/
-
bool FPStream::stop() {
if (!_soundSupported)
return true;
@@ -666,7 +648,6 @@ void FPStream::setPause(bool pause) {
* @param volume Volume to be set (0-63)
*
*/
-
void FPStream::setVolume(int volume) {
if (volume > 63)
volume = 63;
@@ -694,7 +675,6 @@ void FPStream::setVolume(int volume) {
* @param volumePtr Variable that will contain the current volume
*
*/
-
void FPStream::getVolume(int *volumePtr) {
if (g_system->getMixer()->isSoundHandleActive(_handle))
*volumePtr = _lastVolume;