aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/sound.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/fullpipe/sound.h')
-rw-r--r--engines/fullpipe/sound.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/fullpipe/sound.h b/engines/fullpipe/sound.h
index e2b271fe2c..ca64832c04 100644
--- a/engines/fullpipe/sound.h
+++ b/engines/fullpipe/sound.h
@@ -32,12 +32,17 @@ class Sound : public MemoryObject {
int _directSoundBuffer;
int _directSoundBuffers[7];
byte *_soundData;
+ Audio::SoundHandle _handle;
- public:
+public:
Sound();
+ virtual ~Sound();
+
virtual bool load(MfcArchive &file, NGIArchive *archive);
virtual bool load(MfcArchive &file) { assert(0); return false; } // Disable base class
void updateVolume();
+ int getId() const { return _id; }
+ Audio::SoundHandle getHandle() const { return _handle; }
void setPanAndVolumeByStaticAni();
};
@@ -55,6 +60,13 @@ class SoundList : public CObject {
int getCount() { return _soundItemsCount; }
Sound *getSoundByIndex(int idx) { return _soundItems[idx]; }
+ Sound *getSoundById(int id) {
+ for (int i = 0; i < _soundItemsCount; i++) {
+ if (_soundItems[i]->getId() == id)
+ return _soundItems[i];
+ }
+ return NULL;
+ }
};
} // End of namespace Fullpipe