From 008042ac2538bebfce013cb0ec4efa4a5600e4bb Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Tue, 1 May 2007 15:39:40 +0000 Subject: Implemented a IFF (Interchange File Format) parser and added subclasses to parse graphics (ILBM, PBM) and audio (8SVX), thus replacing old decoding routines. SAGA and Parallaction have been adjusted to work with the new code. svn-id: r26719 --- engines/parallaction/music.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'engines/parallaction/music.h') diff --git a/engines/parallaction/music.h b/engines/parallaction/music.h index bfb74fa38f..ae2f9c8716 100644 --- a/engines/parallaction/music.h +++ b/engines/parallaction/music.h @@ -27,6 +27,7 @@ #include "common/mutex.h" #include "sound/audiostream.h" +#include "sound/iff.h" #include "sound/mixer.h" #include "sound/mididrv.h" @@ -50,14 +51,14 @@ public: SoundMan(Parallaction *vm); virtual ~SoundMan() {} - void setMusicFile(const char *filename); + virtual void playSfx(const char *filename, uint channel, bool looping, int volume = -1, int rate = -1) { } + virtual void stopSfx(uint channel) { } + void setMusicFile(const char *filename); virtual void playMusic() = 0; virtual void stopMusic() = 0; - virtual void playCharacterMusic(const char *character) = 0; virtual void playLocationMusic(const char *location) = 0; - void setMusicVolume(int value); }; @@ -76,17 +77,30 @@ public: void playLocationMusic(const char *location); }; +#define NUM_AMIGA_CHANNELS 4 + class AmigaSoundMan : public SoundMan { Audio::AudioStream *_musicStream; Audio::SoundHandle _musicHandle; + struct Channel { + Audio::Voice8Header header; + byte *data; + uint32 dataSize; + Audio::SoundHandle handle; + uint32 flags; + } _channels[NUM_AMIGA_CHANNELS]; + public: AmigaSoundMan(Parallaction *vm); ~AmigaSoundMan(); void playMusic(); void stopMusic(); + void playSfx(const char *filename, uint channel, bool looping, int volume, int rate); + void stopSfx(uint channel); + void playCharacterMusic(const char *character); void playLocationMusic(const char *location); }; -- cgit v1.2.3