diff options
author | johndoe123 | 2014-01-30 20:18:55 +0100 |
---|---|---|
committer | johndoe123 | 2014-01-30 20:18:55 +0100 |
commit | cf51529cfd0fedb33b1b0c70beb59997b21cfc5b (patch) | |
tree | 1df30e23c7f1eac7ca4a8ddfba40c89c2577dda7 /engines/fullpipe/sound.h | |
parent | 542197a891eac799855571fe2849e0dca43bdd2b (diff) | |
parent | 462f7c1c24a48b7555316a3afae357bad14cc14b (diff) | |
download | scummvm-rg350-cf51529cfd0fedb33b1b0c70beb59997b21cfc5b.tar.gz scummvm-rg350-cf51529cfd0fedb33b1b0c70beb59997b21cfc5b.tar.bz2 scummvm-rg350-cf51529cfd0fedb33b1b0c70beb59997b21cfc5b.zip |
Merge remote-tracking branch 'origin/master' into bbvs
Diffstat (limited to 'engines/fullpipe/sound.h')
-rw-r--r-- | engines/fullpipe/sound.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/engines/fullpipe/sound.h b/engines/fullpipe/sound.h index ea6987aae6..ca64832c04 100644 --- a/engines/fullpipe/sound.h +++ b/engines/fullpipe/sound.h @@ -32,11 +32,17 @@ class Sound : public MemoryObject { int _directSoundBuffer; int _directSoundBuffers[7]; byte *_soundData; + Audio::SoundHandle _handle; - public: +public: Sound(); - bool load(MfcArchive &file, NGIArchive *archive); + 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(); }; @@ -48,11 +54,19 @@ class SoundList : public CObject { public: SoundList(); - bool load(MfcArchive &file, char *fname); + virtual bool load(MfcArchive &file, char *fname); + virtual bool load(MfcArchive &file) { assert(0); return false; } // Disable base class bool loadFile(const char *fname, char *libname); 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 |