aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/sound.h
diff options
context:
space:
mode:
authorJohannes Schickel2006-03-12 14:22:27 +0000
committerJohannes Schickel2006-03-12 14:22:27 +0000
commitcd28f28d3248d1186a797fcb77a512efaaf31ad3 (patch)
tree767fab920dc413ee1e5a59c4f02e273d95a34b34 /engines/kyra/sound.h
parentc8347b23b1552328bf1c986e2c394acb81242738 (diff)
downloadscummvm-rg350-cd28f28d3248d1186a797fcb77a512efaaf31ad3.tar.gz
scummvm-rg350-cd28f28d3248d1186a797fcb77a512efaaf31ad3.tar.bz2
scummvm-rg350-cd28f28d3248d1186a797fcb77a512efaaf31ad3.zip
Music in the last two intro scenes plays now again with adlib.
Cleaned up the sound code a bit (removed some unneeded functions). svn-id: r21234
Diffstat (limited to 'engines/kyra/sound.h')
-rw-r--r--engines/kyra/sound.h52
1 files changed, 19 insertions, 33 deletions
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 2baccc0d9a..1d90d24335 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -49,20 +49,14 @@ public:
virtual void setVolume(int volume) = 0;
virtual int getVolume() = 0;
- virtual void playMusic(const char *file) = 0;
- virtual void stopMusic() = 0;
+ virtual void loadMusicFile(const char *file) = 0;
- virtual void playTrack(uint8 track, bool looping = true) = 0;
+ virtual void playTrack(uint8 track) = 0;
virtual void haltTrack() = 0;
- virtual void startTrack() = 0;
-
- virtual void loadSoundEffectFile(const char *file) = 0;
- virtual void stopSoundEffect() = 0;
virtual void playSoundEffect(uint8 track) = 0;
virtual void beginFadeOut() = 0;
- virtual bool fadeOut() = 0;
void voicePlay(const char *file);
void voiceUnload() {}
@@ -97,20 +91,14 @@ public:
void setVolume(int volume);
int getVolume();
- void playMusic(const char *file);
- void stopMusic();
+ void loadMusicFile(const char *file);
- void playTrack(uint8 track, bool looping);
+ void playTrack(uint8 track);
void haltTrack();
- void startTrack();
-
- void loadSoundEffectFile(const char *file);
- void stopSoundEffect();
void playSoundEffect(uint8 track);
void beginFadeOut();
- bool fadeOut();
private:
void loadSoundFile(const char *file);
@@ -139,26 +127,14 @@ public:
void setVolume(int volume);
int getVolume() { return _volume; }
- void hasNativeMT32(bool nativeMT32) { _nativeMT32 = nativeMT32; }
- bool isMT32() { return _nativeMT32; }
-
- void playMusic(const char *file);
- void playMusic(uint8 *data, uint32 size);
- void stopMusic();
-
- void playTrack(uint8 track, bool looping);
+ void loadMusicFile(const char *file);
+
+ void playTrack(uint8 track);
void haltTrack() { _isPlaying = false; }
- void startTrack() { _isPlaying = true; }
- void setPassThrough(bool b) { _passThrough = b; }
-
- void loadSoundEffectFile(const char *file);
- void loadSoundEffectFile(uint8 *data, uint32 size);
- void stopSoundEffect();
-
+
void playSoundEffect(uint8 track);
void beginFadeOut();
- bool fadeOut() { return _fadeMusicOut; }
//MidiDriver interface implementation
int open();
@@ -172,8 +148,19 @@ public:
//Channel allocation functions
MidiChannel *allocateChannel() { return 0; }
MidiChannel *getPercussionChannel() { return 0; }
+
+ void setPassThrough(bool b) { _passThrough = b; }
+
+ void hasNativeMT32(bool nativeMT32) { _nativeMT32 = nativeMT32; }
+ bool isMT32() { return _nativeMT32; }
private:
+ void playMusic(uint8 *data, uint32 size);
+ void stopMusic();
+ void loadSoundEffectFile(const char *file);
+ void loadSoundEffectFile(uint8 *data, uint32 size);
+
+ void stopSoundEffect();
static void onTimer(void *data);
@@ -188,7 +175,6 @@ private:
bool _sfxIsPlaying;
uint32 _fadeStartTime;
bool _fadeMusicOut;
- bool _isLooping;
bool _eventFromMusic;
MidiParser *_parser;
byte *_parserSource;