aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/sound.h
diff options
context:
space:
mode:
authorPaul Gilbert2011-05-12 23:09:48 +1000
committerPaul Gilbert2011-05-12 23:09:48 +1000
commit5b61092584042df494b871cfeb054a64933c2664 (patch)
tree43c65d005510f6e2baef6c5ed8cc4b64e2484bfa /engines/tsage/sound.h
parent43dbf9ff56b932f0f0b8fe09361af87c64a68d16 (diff)
downloadscummvm-rg350-5b61092584042df494b871cfeb054a64933c2664.tar.gz
scummvm-rg350-5b61092584042df494b871cfeb054a64933c2664.tar.bz2
scummvm-rg350-5b61092584042df494b871cfeb054a64933c2664.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 6f86a930c0..a42f9b8c3a 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -61,11 +61,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 {
@@ -80,7 +89,7 @@ public:
int _volume;
int _disableCtr;
int _suspendCtr;
- int _field153;
+ int _suspendedCount;
bool _driversDetected;
Common::List<Sound *> _soundList;
Common::List<SoundDriverEntry> _availableDrivers;
@@ -140,6 +149,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();
@@ -150,7 +160,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);
@@ -178,10 +188,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];
@@ -218,7 +228,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;
@@ -274,7 +284,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