aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/audio.h
diff options
context:
space:
mode:
authorSylvain Dupont2010-10-25 22:15:47 +0000
committerSylvain Dupont2010-10-25 22:15:47 +0000
commit7ab1e368e880e17d3ea904fe74153219e9531d1d (patch)
tree07182732047bbddf669e4fd2b6377b095957b855 /engines/toon/audio.h
parentf370ba174aa8085f80779bd92e22189451ccaf01 (diff)
downloadscummvm-rg350-7ab1e368e880e17d3ea904fe74153219e9531d1d.tar.gz
scummvm-rg350-7ab1e368e880e17d3ea904fe74153219e9531d1d.tar.bz2
scummvm-rg350-7ab1e368e880e17d3ea904fe74153219e9531d1d.zip
TOON: Implemented Ambient SFX
For example used in arcade playing sounds, lullaby music, toilet game win sound effects... svn-id: r53834
Diffstat (limited to 'engines/toon/audio.h')
-rw-r--r--engines/toon/audio.h32
1 files changed, 25 insertions, 7 deletions
diff --git a/engines/toon/audio.h b/engines/toon/audio.h
index 535e909565..32295fdadd 100644
--- a/engines/toon/audio.h
+++ b/engines/toon/audio.h
@@ -109,6 +109,16 @@ protected:
ToonEngine *_vm;
};
+struct AudioAmbientSFX {
+ int32 _id;
+ int32 _volume;
+ int32 _lastTimer;
+ int32 _delay;
+ int32 _mode;
+ int32 _channel;
+ bool _enabled;
+};
+
class AudioManager {
public:
void removeInstance(AudioStreamInstance *inst); // called by destructor
@@ -120,16 +130,22 @@ public:
void playMusic(Common::String dir, Common::String music);
void playVoice(int32 id, bool genericVoice);
- void playSFX(int32 id, int volume, bool genericSFX);
+ int32 playSFX(int32 id, int volume, bool genericSFX);
void stopCurrentVoice();
void setMusicVolume(int32 volume);
void stopMusic();
void muteVoice(bool mute);
void muteMusic(bool mute);
void muteSfx(bool mute);
- bool isVoiceMuted() { return voiceMuted; }
- bool isMusicMuted() { return musicMuted; }
- bool isSfxMuted() { return sfxMuted; }
+ bool isVoiceMuted() { return _voiceMuted; }
+ bool isMusicMuted() { return _musicMuted; }
+ bool isSfxMuted() { return _sfxMuted; }
+
+ void startAmbientSFX(int32 id, int32 delay, int32 mode, int32 volume);
+ void killAmbientSFX(int32 id);
+ void killAllAmbientSFX();
+ void updateAmbientSFX();
+ void setAmbientSFXVolume(int32 id, int volume);
void closeAudioPack(int32 id);
bool loadAudioPack(int32 id, Common::String indexFile, Common::String packFile);
@@ -148,9 +164,11 @@ public:
Audio::Mixer *_mixer;
protected:
- bool voiceMuted;
- bool musicMuted;
- bool sfxMuted;
+ bool _voiceMuted;
+ bool _musicMuted;
+ bool _sfxMuted;
+
+ AudioAmbientSFX _ambientSFXs[4];
};
} // End of namespace Toon