aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/sound.h
diff options
context:
space:
mode:
authorPaul Gilbert2011-04-27 22:22:20 +1000
committerPaul Gilbert2011-05-24 21:24:13 +1000
commit120a648e68a35790ee92682d4dfddc0c216b53ef (patch)
tree78c550956491777ea292f6b39db5608823f7ecd2 /engines/tsage/sound.h
parent16666ec40c5425db1d8ae957c546d02a12f52c7d (diff)
downloadscummvm-rg350-120a648e68a35790ee92682d4dfddc0c216b53ef.tar.gz
scummvm-rg350-120a648e68a35790ee92682d4dfddc0c216b53ef.tar.bz2
scummvm-rg350-120a648e68a35790ee92682d4dfddc0c216b53ef.zip
TSAGE: Implemented the code for the ASound class
Diffstat (limited to 'engines/tsage/sound.h')
-rw-r--r--engines/tsage/sound.h67
1 files changed, 48 insertions, 19 deletions
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h
index d1099fabcc..2155a935cd 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -44,46 +44,75 @@ public:
class Sound: public EventHandler {
public:
-
-};
-
-class ASound: public Sound {
-public:
- Sound _sound;
- Action *_action;
- int _field280;
-
- ASound();
- virtual void synchronize(Serializer &s);
- virtual void dispatch();
-
- void play(int soundNum, Action *action = NULL, int volume = 127);
+ void play(int soundNum, int volume = 127);
void stop();
- void prime(int v, Action *action = NULL);
+ void prime(int soundNum);
+ void prime(int soundNum, int v2);
+ void _unPrime();
void unPrime();
void go();
- void hault(void);
+ void halt(void);
int getSoundNum() const;
bool isPlaying() const;
+ bool isPrimed() const;
bool isPaused() const;
bool isMuted() const;
void pause();
void mute();
void fadeIn();
void fadeOut(EventHandler *evtHandler);
- void fade(int v1, int v2, int v3, int v4, EventHandler *evtHandler);
+ void fade(int v1, int v2, int v3, int v4);
void setTimeIndex(uint32 timeIndex);
uint32 getTimeIndex() const;
+ bool getCueValue() const;
+ void setCueValue(bool flag);
+ void setVol(int volume);
+ int getVol() const;
void setPri(int v);
void setLoop(bool flag);
int getPri() const;
bool getLoop();
- void setVolume(int volume);
- int getVol() const;
void holdAt(int v);
void release();
};
+class ASound: public EventHandler {
+public:
+ Sound _sound;
+ Action *_action;
+ bool _cueFlag;
+
+ ASound();
+ virtual void synchronize(Serializer &s);
+ virtual void dispatch();
+
+ void play(int soundNum, Action *action = NULL, int volume = 127);
+ void stop();
+ void prime(int soundNum, Action *action = NULL);
+ void unPrime();
+ void go() { _sound.go(); }
+ void hault(void) { _sound.halt(); }
+ int getSoundNum() const { return _sound.getSoundNum(); }
+ bool isPlaying() const { return _sound.isPlaying(); }
+ bool isPaused() const { return _sound.isPaused(); }
+ bool isMuted() const { return _sound.isMuted(); }
+ void pause() { _sound.pause(); }
+ void mute() { _sound.mute(); }
+ void fadeIn() { fade(127, 5, 10, 0, NULL); }
+ void fadeOut(Action *action) { fade(0, 5, 10, 1, action); }
+ void fade(int v1, int v2, int v3, int v4, Action *action);
+ void setTimeIndex(uint32 timeIndex) { _sound.setTimeIndex(timeIndex); }
+ uint32 getTimeIndex() const { return _sound.getTimeIndex(); }
+ void setPri(int v) { _sound.setPri(v); }
+ void setLoop(bool flag) { _sound.setLoop(flag); }
+ int getPri() const { return _sound.getPri(); }
+ bool getLoop() { return _sound.getLoop(); }
+ void setVol(int volume) { _sound.setVol(volume); }
+ int getVol() const { return _sound.getVol(); }
+ void holdAt(int v) { _sound.holdAt(v); }
+ void release() { _sound.release(); }
+};
+
} // End of namespace tSage
#endif