From 82b6902b5661b6b9832d39ae33627bc964cccf34 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Tue, 19 Oct 2004 17:12:53 +0000 Subject: Initial, and slightly buggy, support for sound effects. svn-id: r15614 --- saga/sound.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'saga/sound.h') diff --git a/saga/sound.h b/saga/sound.h index dfb7b0835e..bccb872735 100644 --- a/saga/sound.h +++ b/saga/sound.h @@ -48,32 +48,28 @@ public: Sound(SagaEngine *vm, SoundMixer *mixer, int enabled); ~Sound(); - int play(int sound_rn, int channel); - int pause(int channel); - int resume(int channel); - int stop(int channel); + int playSound(R_SOUNDBUFFER *buf, int volume); + int pauseSound(); + int resumeSound(); + int stopSound(); - int playVoice(R_SOUNDBUFFER *); + int playVoice(R_SOUNDBUFFER *buf); int pauseVoice(); int resumeVoice(); int stopVoice(); private: + int playSoundBuffer(PlayingSoundHandle *handle, R_SOUNDBUFFER *buf, int volume, bool loop); + int _soundInitialized; int _enabled; - R_GAME_SOUNDINFO _snd_info; - - R_RSCFILE_CONTEXT *_soundContext; - R_RSCFILE_CONTEXT *_voiceContext; - SagaEngine *_vm; SoundMixer *_mixer; PlayingSoundHandle _effectHandle; PlayingSoundHandle _voiceHandle; - PlayingSoundHandle _musictHandle; }; -- cgit v1.2.3