22#if !defined(SCUMM_IMUSE_DIGI_DEFS_H) && defined(ENABLE_SCUMM_7_8)
23#define SCUMM_IMUSE_DIGI_DEFS_H
27#define DIMUSE_MAX_GROUPS 16
28#define DIMUSE_MAX_FADES 16
29#define DIMUSE_MAX_TRIGGERS 8
30#define DIMUSE_MAX_DEFERS 8
31#define DIMUSE_MAX_TRACKS 8
32#define DIMUSE_MAX_MAP_SIZE 2048
33#define DIMUSE_MAX_DISPATCHES 8
34#define DIMUSE_MAX_STREAMZONES 50
35#define DIMUSE_MAX_FADE_VOLUME 8323072
36#define DIMUSE_MAX_STREAMS 3
38#define DIMUSE_LARGE_FADES 1
39#define DIMUSE_SMALL_FADES 4
40#define DIMUSE_LARGE_FADE_DIM 350000
41#define DIMUSE_SMALL_FADE_DIM 44100
43#define DIMUSE_BASE_SAMPLERATE 22050
44#define DIMUSE_BASE_FEEDSIZE 512
45#define DIMUSE_NUM_WAVE_BUFS 8
46#define DIMUSE_SMUSH_SOUNDID 12345678
47#define DIMUSE_BUN_CHUNK_SIZE 0x2000
48#define DIMUSE_GROUP_SFX 1
49#define DIMUSE_GROUP_SPEECH 2
50#define DIMUSE_GROUP_MUSIC 3
51#define DIMUSE_GROUP_MUSICEFF 4
52#define DIMUSE_BUFFER_SPEECH 1
53#define DIMUSE_BUFFER_MUSIC 2
54#define DIMUSE_BUFFER_SFX 3
56#define DIMUSE_TIMER_BASE_RATE_HZ 50
57#define DIMUSE_TIMER_BASE_RATE_USEC 20000
58#define DIMUSE_TIMER_GAIN_RED_RATE_USEC 100000
59#define DIMUSE_TIMER_FADES_RATE_USEC 16667
62#define DIMUSE_P_BOGUS_ID 0x0
63#define DIMUSE_P_SND_TRACK_NUM 0x100
64#define DIMUSE_P_TRIGS_SNDS 0x200
65#define DIMUSE_P_MARKER 0x300
66#define DIMUSE_P_GROUP 0x400
67#define DIMUSE_P_PRIORITY 0x500
68#define DIMUSE_P_VOLUME 0x600
69#define DIMUSE_P_PAN 0x700
70#define DIMUSE_P_DETUNE 0x800
71#define DIMUSE_P_TRANSPOSE 0x900
72#define DIMUSE_P_MAILBOX 0xA00
73#define DIMUSE_P_UNKNOWN 0xF00
74#define DIMUSE_P_SND_HAS_STREAM 0x1800
75#define DIMUSE_P_STREAM_BUFID 0x1900
76#define DIMUSE_P_SND_POS_IN_MS 0x1A00
79#define DIMUSE_C_KLUDGE_SET_STATE 0x1000
80#define DIMUSE_C_KLUDGE_SET_SEQUENCE 0x1001
81#define DIMUSE_C_KLUDGE_SET_CUE_POINT 0x1002
82#define DIMUSE_C_KLUDGE_SET_ATTRIBUTE 0x1003
83#define DIMUSE_C_KLUDGE_SET_SFX_VOLUME 0x2000
84#define DIMUSE_C_KLUDGE_SET_VOICE_VOLUME 0x2001
85#define DIMUSE_C_KLUDGE_SET_MUSIC_VOLUME 0x2002
86#define DIMUSE_C_KLUDGE_STOP_ALL_SNDS 10
87#define DIMUSE_C_KLUDGE_SET_PARAM 12
88#define DIMUSE_C_KLUDGE_FADE_PARAM 14
89#define DIMUSE_C_KLUDGE_START_STREAM 25
90#define DIMUSE_C_KLUDGE_SWITCH_STREAM 26
93#define DIMUSE_C_SCRIPT_INIT 0
94#define DIMUSE_C_SCRIPT_TERMINATE 1
95#define DIMUSE_C_SCRIPT_SAVE 2
96#define DIMUSE_C_SCRIPT_RESTORE 3
97#define DIMUSE_C_SCRIPT_REFRESH 4
98#define DIMUSE_C_SCRIPT_SET_STATE 5
99#define DIMUSE_C_SCRIPT_SET_SEQUENCE 6
100#define DIMUSE_C_SCRIPT_CUE_POINT 7
101#define DIMUSE_C_SCRIPT_SET_ATTRIBUTE 8
104#define DIMUSE_C_INIT 0
105#define DIMUSE_C_PAUSE 3
106#define DIMUSE_C_RESUME 4
107#define DIMUSE_C_SET_GRP_VOL 7
108#define DIMUSE_C_START_SND 8
109#define DIMUSE_C_STOP_SND 9
110#define DIMUSE_C_STOP_ALL_SNDS 10
111#define DIMUSE_C_GET_NEXT_SND 11
112#define DIMUSE_C_SET_PARAM 12
113#define DIMUSE_C_GET_PARAM 13
114#define DIMUSE_C_FADE_PARAM 14
115#define DIMUSE_C_SET_HOOK 15
116#define DIMUSE_C_GET_HOOK 16
117#define DIMUSE_C_SET_TRIGGER 17
118#define DIMUSE_C_CHECK_TRIGGER 18
119#define DIMUSE_C_CLEAR_TRIGGER 19
120#define DIMUSE_C_DEFER_CMD 20
121#define DIMUSE_C_GET_MARKER_SYNCS 21
122#define DIMUSE_C_START_STREAM 25
123#define DIMUSE_C_SWITCH_STREAM 26
124#define DIMUSE_C_PROCESS_STREAMS 27
125#define DIMUSE_C_FEED_STREAM 29
128#define DIMUSE_C_SCRIPT_CALLBACK 0
132#define VOC_DIGI_DATA_BLOCK 1
133#define VOC_MARKER_BLOCK 4
134#define VOC_LOOP_START_BLOCK 6
135#define VOC_LOOP_END_BLOCK 7
137struct IMuseDigiDispatch;
138struct IMuseDigiTrack;
139struct IMuseDigiStreamZone;
186struct IMuseDigiTrack {
188 IMuseDigiTrack *prev;
189 IMuseDigiTrack *next;
190 IMuseDigiDispatch *dispatchPtr;
213struct IMuseDigiStreamZone {
214 IMuseDigiStreamZone *prev;
215 IMuseDigiStreamZone *next;
236 int32 vocLoopTriggerOffset;
246struct IMuseDigiDispatch {
247 IMuseDigiTrack *trackPtr;
252 int32 audioRemaining;
253 int32 map[DIMUSE_MAX_MAP_SIZE];
254 IMuseDigiStream *streamPtr;
256 IMuseDigiStreamZone *streamZoneList;
263 int fadeChannelCount;
268 int32 vocLoopStartingPoint;
277} waveOutParamsStruct;