aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/sound.h
diff options
context:
space:
mode:
authorPaul Gilbert2011-05-12 23:09:48 +1000
committerPaul Gilbert2011-05-24 21:25:49 +1000
commitb3fb2b5db8aa73703dc86fdcd06be0d7d0c1b0b6 (patch)
treee856508257568bc38942508c6f2b7bf58d9b3fba /engines/tsage/sound.h
parent3457253f03cd5a57281735360fc600f0fe831298 (diff)
downloadscummvm-rg350-b3fb2b5db8aa73703dc86fdcd06be0d7d0c1b0b6.tar.gz
scummvm-rg350-b3fb2b5db8aa73703dc86fdcd06be0d7d0c1b0b6.tar.bz2
scummvm-rg350-b3fb2b5db8aa73703dc86fdcd06be0d7d0c1b0b6.zip
TSAGE: More code for installing sound drivers
Diffstat (limited to 'engines/tsage/sound.h')
-rw-r--r--engines/tsage/sound.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h
index 26c26817a5..22132bc6ca 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -58,11 +58,20 @@ public:
Common::String _shortDescription, _longDescription;
int _driverNum;
int _minVersion, _maxVersion;
+ uint32 *_groupMaskList;
+ // The following fields were originally held in separate arrays in the SoundManager class
+ uint32 _groupMask;
public:
+ SoundDriver();
+
const Common::String &getShortDriverDescription() { return _shortDescription; }
const Common::String &getLongDriverDescription() { return _longDescription; }
- virtual void setVolume(int volume) = 0;
+ virtual bool open() { return true; }
+ virtual void close() {}
+ virtual uint32 *getGroupMaskList() const { return _groupMaskList; }
+ virtual void setVolume(int volume) {}
+ virtual void installPatchBank(const byte *data) {}
};
class SoundManager : public SaveListener {
@@ -77,7 +86,7 @@ public:
int _volume;
int _disableCtr;
int _suspendCtr;
- int _field153;
+ int _suspendedCount;
bool _driversDetected;
Common::List<Sound *> _soundList;
Common::List<SoundDriverEntry> _availableDrivers;
@@ -137,6 +146,7 @@ public:
static void _sfAddToPlayList(Sound *sound);
static void _sfRemoveFromPlayList(Sound *sound);
static bool _sfIsOnPlayList(Sound *sound);
+ static void _sfRethinkSoundDrivers();
static void _sfRethinkVoiceTypes();
static void _sfUpdateVolume(Sound *sound);
static void _sfDereferenceAll();
@@ -147,7 +157,7 @@ public:
static void _sfExtractGroupMask();
static bool _sfInstallDriver(SoundDriver *driver);
static void _sfUnInstallDriver(SoundDriver *driver);
- static void _sfInstallPatchBank(const byte *bankData);
+ static void _sfInstallPatchBank(SoundDriver *driver, const byte *bankData);
static void _sfDoAddToPlayList(Sound *sound);
static bool _sfDoRemoveFromPlayList(Sound *sound);
static void _sfDoUpdateVolume(Sound *sound);
@@ -175,10 +185,10 @@ public:
int _holdAt;
int _cueValue;
int _volume1;
- int _field1F;
+ int _volume3;
int _volume2;
- int _field21;
- int _field22;
+ int _volume5;
+ int _volume4;
uint _timeIndex;
int _field26;
int _field28[SOUND_ARR_SIZE];
@@ -215,7 +225,7 @@ public:
bool isMuted() const;
void pause(bool flag);
void mute(bool flag);
- void fade(int v1, int v2, int v3, int v4);
+ void fade(int volume1, int volume2, int volume3, int v4);
void setTimeIndex(uint32 timeIndex);
uint32 getTimeIndex() const;
int getCueValue() const;
@@ -271,7 +281,8 @@ public:
class AdlibSoundDriver: public SoundDriver {
public:
- void setVolume(int volume) {}
+ virtual void setVolume(int volume) {}
+ virtual void installPatchBank(const byte *data) {}
};
} // End of namespace tSage