aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/sound.h
diff options
context:
space:
mode:
authorStrangerke2019-08-05 20:02:21 +0200
committerEugene Sandulenko2019-09-03 17:17:32 +0200
commit22251ec2a77445d09f9f1100cd2752339acd075f (patch)
tree64e87e15f3e0f908dfa1fda3299320c3fc9ca382 /engines/hdb/sound.h
parentcb8976b65af38a7548c25e48e10b9b0f65d8aafd (diff)
downloadscummvm-rg350-22251ec2a77445d09f9f1100cd2752339acd075f.tar.gz
scummvm-rg350-22251ec2a77445d09f9f1100cd2752339acd075f.tar.bz2
scummvm-rg350-22251ec2a77445d09f9f1100cd2752339acd075f.zip
HDB: Introduce two new enums for the sound
Diffstat (limited to 'engines/hdb/sound.h')
-rw-r--r--engines/hdb/sound.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/engines/hdb/sound.h b/engines/hdb/sound.h
index 9e04dadbd4..516df9b3fd 100644
--- a/engines/hdb/sound.h
+++ b/engines/hdb/sound.h
@@ -1434,15 +1434,27 @@ struct Voice {
}
};
+enum SndMem {
+ SNDMEM_FREEABLE = -1,
+ SNDMEM_NOTCACHED = 0,
+ SNDMEM_LOADED = 1
+};
+
+enum SndType {
+ SNDTYPE_NONE = 0,
+ SNDTYPE_WAV = -1,
+ SNDTYPE_MP3 = 1
+};
+
struct SoundCache {
- int loaded; // -1 = freeable; in memory, 0 = not cached, 1 = cached
+ SndMem loaded; // -1 = freeable; in memory, 0 = not cached, 1 = cached
int32 size; // size of sound
const char *name; // filename / MSD name
const char *luaName; // name used by Lua for i.d.
- int ext; // 0 = Uninitialized, -1 = WAV, 1 = MP3
+ SndType ext; // 0 = Uninitialized, -1 = WAV, 1 = MP3
Audio::SeekableAudioStream *audioStream;
- SoundCache() : loaded(0), size(0), name(nullptr), luaName(nullptr), ext(0), audioStream(nullptr) {}
+ SoundCache() : loaded(SNDMEM_NOTCACHED), size(0), name(nullptr), luaName(nullptr), ext(SNDTYPE_NONE), audioStream(nullptr) {}
};
struct Song {