25 #include "kyra/kyra_v1.h" 27 #include "common/scummsys.h" 28 #include "common/str.h" 30 #include "audio/mixer.h" 34 class SeekableAudioStream;
41 SoundResourceInfo_PC(
const char *
const *files,
int numFiles) : fileList(files), fileListSize(numFiles) {}
42 const char *
const *fileList;
47 SoundResourceInfo_Towns(
const char *
const *files,
int numFiles,
const int32 *cdaTbl,
int cdaTblSize) : fileList(files), fileListSize(numFiles), cdaTable(cdaTbl), cdaTableSize(cdaTblSize) {}
48 const char *
const *fileList;
50 const int32 *cdaTable;
60 SoundResourceInfo_TownsPC98V2(
const char *
const *files,
int numFiles,
const char *fileNamePattern,
const uint16 *cdaTbl,
int cdaTblSize) : fileList(files), fileListSize(numFiles), pattern(fileNamePattern), cdaTable(cdaTbl), cdaTableSize(cdaTblSize) {}
61 const char *
const *fileList;
64 const uint16 *cdaTable;
69 SoundResourceInfo_TownsEoB(
const char *
const *filelist, uint numfiles,
const uint8 *pcmdata, uint pcmdataSize,
int pcmvolume) : fileList(filelist), numFiles(numfiles), pcmData(pcmdata), pcmDataSize(pcmdataSize), pcmVolume(pcmvolume) {}
73 const char *
const *fileList;
79 SoundResourceInfo_AmigaEoB(
const char *
const *files,
int numFiles,
const char *
const *soundmap,
int numSounds) : fileList(files), fileListSize(numFiles), soundList(soundmap), soundListSize(numSounds) {}
80 const char *
const *fileList;
82 const char *
const *soundList;
109 virtual kType getMusicType()
const = 0;
110 virtual kType getSfxType()
const;
115 virtual bool useDigitalSfx()
const {
return true; }
122 virtual bool init() = 0;
141 virtual void initAudioResourceInfo(
int set,
void *info) = 0;
148 virtual void selectAudioResourceSet(
int set) = 0;
156 virtual bool hasSoundFile(uint file)
const = 0;
162 virtual void loadSoundFile(uint file) = 0;
168 virtual void loadSoundFile(
const Common::Path &file) = 0;
186 virtual void playTrack(uint8 track) = 0;
191 virtual void haltTrack() = 0;
198 virtual void playSoundEffect(uint16 track, uint8 volume = 0xFF) = 0;
210 virtual bool isPlaying()
const;
221 virtual void beginFadeOut() = 0;
222 virtual void beginFadeOut(
int) { beginFadeOut(); }
229 virtual void enableMusic(
int enable) { _musicEnabled = enable; }
230 int musicEnabled()
const {
return _musicEnabled; }
231 void enableSFX(
bool enable) { _sfxEnabled = enable; }
232 bool sfxEnabled()
const {
return _sfxEnabled; }
240 bool isVoicePresent(
const char *file)
const;
255 virtual int32 voicePlay(
const char *file,
Audio::SoundHandle *handle = 0, uint8 volume = 255, uint8 priority = 255,
bool isSfx =
false);
273 bool allVoiceChannelsPlaying()
const;
281 return _mixer->getSoundElapsedTime(handle);
300 kNumChannelHandles = 4
318 struct SpeechCodecs {
322 DisposeAfterUse::Flag disposeAfterUse);
325 static const SpeechCodecs _supportedCodecs[];
333 kType getMusicType()
const override;
334 kType getSfxType()
const override;
336 bool init()
override;
337 void process()
override;
339 void updateVolumeSettings()
override;
341 void initAudioResourceInfo(
int set,
void *info)
override;
342 void selectAudioResourceSet(
int set)
override;
343 bool hasSoundFile(uint file)
const override;
344 void loadSoundFile(uint file)
override;
349 void playTrack(uint8 track)
override;
350 void haltTrack()
override;
351 bool isPlaying()
const override;
353 void playSoundEffect(uint16 track, uint8 volume = 0xFF)
override;
355 void stopAllSoundEffects()
override;
357 void beginFadeOut()
override;
358 void pause(
bool paused)
override;
360 Sound *_music, *_sfx;
virtual void resetTrigger()
Definition: sound.h:297
virtual int checkTrigger()
Definition: sound.h:292
Definition: kyra_v1.h:126
virtual void pause(bool paused)
Definition: sound.h:227
virtual void updateVolumeSettings()
Definition: sound.h:132
virtual void process()
Definition: sound.h:127
Definition: audiostream.h:212
Definition: audiostream.h:50
virtual void unloadSoundFile(const Common::String &file)
Definition: sound.h:173
uint32 voicePlayedTime(const Audio::SoundHandle &handle) const
Definition: sound.h:280
Definition: detection.h:27
virtual void loadSfxFile(const Common::Path &file)
Definition: sound.h:179
virtual void stopAllSoundEffects()
Definition: sound.h:203