22 #ifndef SCUMM_SOUNDSE_H 23 #define SCUMM_SOUNDSE_H 25 #include "common/scummsys.h" 26 #include "audio/audiostream.h" 27 #include "audio/mixer.h" 28 #include "scumm/file.h" 31 class SeekableSubReadStream;
48 kSoundSETypeCommentary,
81 int32 handleMISESpeech(
const char *msgString,
82 const char *speechFilenameSubstitution,
87 void setupMISEAudioParams(int32 scriptNum, int32 scriptOffset) {
88 _currentScriptSavedForSpeechMI = scriptNum;
89 _currentScriptOffsetSavedForSpeechMI = scriptOffset;
92 void startAmbience(int32 musicTrack);
97 kXWBSegmentBankData = 0,
98 kXWBSegmentEntryMetaData = 1,
99 kXWBSegmentSeekTables = 2,
100 kXWBSegmentEntryNames = 3,
101 kXWBSegmentEntryWaveData = 4
105 struct AudioEntryMI {
109 uint16 localScriptOffset;
120 int32 hashFourCharString;
131 OffsetToIndexMap _offsetToIndexDOTTAndFT;
132 NameToOffsetMap _nameToOffsetDOTTAndFT;
133 NameToIndexMap _nameToIndexMISpeech;
134 NameToIndexMap _nameToIndexMISpeechPatched;
136 AudioIndex _musicEntries;
137 AudioIndex _speechEntries;
138 AudioIndex _sfxEntries;
139 AudioIndex _ambienceEntries;
140 AudioIndex _commentaryEntries;
141 AudioIndex _patchEntries;
144 AudioIndexMI _audioEntriesMI;
147 int32 _currentScriptSavedForSpeechMI = 0;
148 int32 _currentScriptOffsetSavedForSpeechMI = 0;
152 int32 getSoundIndexFromOffset(uint32 offset);
153 int32 getAppropriateSpeechCue(
const char *msgString,
154 const char *speechFilenameSubstitution,
161 void initAudioMappingMI();
162 void initAudioMappingDOTTAndFT();
163 void initSoundFiles();
166 void indexXWBFile(SoundSEType type);
167 void indexSpeechXSBFile();
170 void indexFSBFile(SoundSEType type);
175 AudioIndex *getAudioEntries(SoundSEType type);
176 int32 getAmbienceTrack(int32 musicTrack);
189 DisposeAfterUse::Flag disposeAfterUse);
190 ~HeaderlessWMAStream()
override;
192 int readBuffer(int16 *buffer,
const int numSamples)
override;
194 bool endOfData()
const override {
return _stream->eos(); }
195 bool isStereo()
const override {
return _entry.channels == 2; }
196 int getRate()
const override {
return _entry.rate; }
204 AudioStream *_audioStream =
nullptr;
206 DisposeAfterUse::Flag _disposeAfterUse;
Definition: timestamp.h:83
Definition: audiostream.h:212
Definition: substream.h:78
Definition: algorithm.h:29