25 #include "common/scummsys.h" 26 #include "common/serializer.h" 27 #include "common/str.h" 28 #include "audio/mididrv.h" 29 #include "scumm/file.h" 30 #include "scumm/soundcd.h" 31 #include "scumm/soundse.h" 33 #define DIGI_SND_MODE_EMPTY 0 34 #define DIGI_SND_MODE_SFX 1 35 #define DIGI_SND_MODE_TALKIE 2 38 class SeekableSubReadStream;
44 class SeekableAudioStream;
51 struct MP3OffsetTable;
72 int16 _midiQueuePos, _midiQueue[0x100];
88 MP3OffsetTable *_offsetTable;
90 int64 _cachedSfxLocationInPak = -1;
91 int32 _cachedSfxLengthInPak = 0;
93 uint32 _queuedSfxOffset, _queuedTalkieOffset, _queuedSfxLen, _queuedTalkieLen;
94 byte _queuedSoundMode, _queuedSfxChannel;
97 uint16 _mouthSyncTimes[64];
104 bool _useRemasteredAudio =
false;
105 bool _enableAmbienceSounds =
false;
113 uint32 _speechTimerMod;
120 virtual void startSound(
int sound,
int heOffset = 0,
int heChannel = 0,
int heFlags = 0,
int heFreq = 0,
int hePan = 0,
int heVol = 0);
121 virtual void addSoundToQueue(
int sound,
int heOffset = 0,
int heChannel = 0,
int heFlags = 0,
int heFreq = 0,
int hePan = 0,
int heVol = 0);
123 virtual void modifySound(
int sound,
int offset,
int frequencyShift,
int pan,
int volume,
int flags) {};
125 void triggerSound(
int soundID);
126 void startTalkSound(uint32 offset, uint32 b,
int mode,
Audio::SoundHandle *handle = NULL);
127 void stopTalkSound();
128 bool isMouthSyncOff(uint pos);
129 virtual int isSoundRunning(
int sound)
const;
130 virtual bool isSoundInUse(
int sound)
const;
131 virtual void stopSound(
int sound);
132 virtual void stopAllSounds();
133 void soundKludge(
int *list,
int num);
134 void talkSound(uint32 offset, uint32 length,
int mode,
int channel = 0);
135 virtual void setupSound();
136 virtual void pauseSounds(
bool pause);
137 bool isSfxFileCompressed();
138 bool hasSfxFile()
const;
139 ScummFile *restoreDiMUSESpeechFile(
const char *fileName);
140 void extractSyncsFromDiMUSEMarker(
const char *marker);
141 void incrementSpeechTimer();
142 void resetSpeechTimer();
143 void startSpeechTimer();
144 void stopSpeechTimer();
145 bool speechIsPlaying();
148 void restoreAfterLoad();
150 bool isAudioDisabled();
152 void updateMusicTimer();
154 bool shouldInjectMISEAudio()
const;
155 void startRemasteredSpeech(
const char *msgString, uint16 roomNumber, uint16 actorTalking, uint16 numWaits);
158 bool isRolandLoom()
const {
159 return _soundCD->isRolandLoom();
164 return _soundCD->pollCD();
167 _soundCD->updateCD();
171 _soundCD->stopCDTimer();
173 void playCDTrack(
int track,
int numLoops,
int startFrame,
int duration) {
174 _soundCD->playCDTrack(track, numLoops, startFrame, duration);
176 int getCurrentCDSound()
const {
177 return _soundCD->getCurrentCDSound();
180 _soundCD->restoreCDAudioAfterLoad(info);
182 void setupMISEAudioParams(int32 scriptNum, int32 scriptOffset) {
183 _soundSE->setupMISEAudioParams(scriptNum, scriptOffset);
188 bool isSfxFinished()
const;
189 void processSfxQueues();
191 bool isSoundInQueue(
int sound)
const;
193 virtual void processSoundQueues();
MidiDriverFlags
Definition: mididrv.h:81
Definition: serializer.h:79
Definition: algorithm.h:29
Definition: serializer.h:308