2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
2006-08-15 18:04:01 +00:00
|
|
|
*
|
2007-05-30 21:56:52 +00:00
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2005-01-09 16:06:29 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2009-07-17 13:50:59 +00:00
|
|
|
*
|
2005-01-09 16:06:29 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2009-07-17 13:50:59 +00:00
|
|
|
*
|
2005-01-09 16:06:29 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2005-01-09 16:06:29 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2007-02-20 17:33:54 +00:00
|
|
|
#ifndef KYRA_SOUND_H
|
|
|
|
#define KYRA_SOUND_H
|
2004-11-11 13:37:35 +00:00
|
|
|
|
2008-05-11 23:16:50 +00:00
|
|
|
#include "kyra/kyra_v1.h"
|
2007-09-19 08:40:12 +00:00
|
|
|
|
2004-11-11 13:37:35 +00:00
|
|
|
#include "common/scummsys.h"
|
2009-05-27 14:40:37 +00:00
|
|
|
#include "common/str.h"
|
2006-07-26 22:24:33 +00:00
|
|
|
|
2011-02-09 01:09:01 +00:00
|
|
|
#include "audio/mixer.h"
|
2006-07-26 22:24:33 +00:00
|
|
|
|
2006-01-13 23:06:04 +00:00
|
|
|
namespace Audio {
|
2006-04-29 22:33:31 +00:00
|
|
|
class AudioStream;
|
2010-01-05 02:27:24 +00:00
|
|
|
class SeekableAudioStream;
|
2009-10-04 21:26:33 +00:00
|
|
|
} // End of namespace Audio
|
2006-01-13 23:06:04 +00:00
|
|
|
|
2004-11-11 13:37:35 +00:00
|
|
|
namespace Kyra {
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2007-12-16 18:48:43 +00:00
|
|
|
/**
|
2007-11-03 23:32:15 +00:00
|
|
|
* Analog audio output device API for Kyrandia games.
|
2008-05-09 13:33:31 +00:00
|
|
|
* It contains functionality to play music tracks,
|
2007-11-03 23:32:15 +00:00
|
|
|
* sound effects and voices.
|
|
|
|
*/
|
2006-01-13 23:06:04 +00:00
|
|
|
class Sound {
|
|
|
|
public:
|
2008-05-11 23:16:50 +00:00
|
|
|
Sound(KyraEngine_v1 *vm, Audio::Mixer *mixer);
|
2006-02-27 22:39:55 +00:00
|
|
|
virtual ~Sound();
|
|
|
|
|
2008-04-06 13:32:41 +00:00
|
|
|
enum kType {
|
2010-01-12 21:07:56 +00:00
|
|
|
kAdLib,
|
2008-04-06 13:32:41 +00:00
|
|
|
kMidiMT32,
|
|
|
|
kMidiGM,
|
2008-06-26 19:42:59 +00:00
|
|
|
kTowns,
|
2009-05-27 14:40:37 +00:00
|
|
|
kPC98,
|
2009-07-19 14:02:19 +00:00
|
|
|
kPCSpkr,
|
|
|
|
kAmiga
|
2008-04-06 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
virtual kType getMusicType() const = 0;
|
|
|
|
virtual kType getSfxType() const { return getMusicType(); }
|
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
/**
|
|
|
|
* Initializes the output device.
|
|
|
|
*
|
|
|
|
* @return true on success, else false
|
|
|
|
*/
|
2006-02-27 22:39:55 +00:00
|
|
|
virtual bool init() = 0;
|
2007-11-03 23:32:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Updates the device, this is needed for some devices.
|
|
|
|
*/
|
2006-03-21 17:17:24 +00:00
|
|
|
virtual void process() {}
|
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
/**
|
2008-05-09 13:33:31 +00:00
|
|
|
* Updates internal volume settings according to ConfigManager.
|
2007-11-03 23:32:15 +00:00
|
|
|
*/
|
2008-04-04 18:09:19 +00:00
|
|
|
virtual void updateVolumeSettings() {}
|
2006-03-21 17:17:24 +00:00
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
/**
|
|
|
|
* Sets the soundfiles the output device will use
|
|
|
|
* when playing a track and/or sound effect.
|
|
|
|
*
|
2009-11-29 13:52:02 +00:00
|
|
|
* @param list soundfile list
|
2007-11-03 23:32:15 +00:00
|
|
|
*/
|
2008-01-03 14:42:49 +00:00
|
|
|
virtual void setSoundList(const AudioDataStruct *list) { _soundDataList = list; }
|
2007-12-16 18:48:43 +00:00
|
|
|
|
2008-04-06 14:11:43 +00:00
|
|
|
/**
|
2008-05-09 13:33:31 +00:00
|
|
|
* Checks if a given sound file is present.
|
2008-04-06 14:11:43 +00:00
|
|
|
*
|
2009-11-29 13:52:02 +00:00
|
|
|
* @param track track number
|
2008-04-06 14:11:43 +00:00
|
|
|
* @return true if available, false otherwise
|
|
|
|
*/
|
2010-10-28 23:56:36 +00:00
|
|
|
virtual bool hasSoundFile(uint file) const { return (fileListEntry(file) != 0); }
|
2008-04-06 14:11:43 +00:00
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
/**
|
|
|
|
* Load a specifc sound file for use of
|
|
|
|
* playing music and sound effects.
|
|
|
|
*/
|
2007-01-29 18:15:14 +00:00
|
|
|
virtual void loadSoundFile(uint file) = 0;
|
2006-03-21 17:17:24 +00:00
|
|
|
|
2008-08-02 15:05:19 +00:00
|
|
|
/**
|
|
|
|
* Load a sound file for playing music
|
2011-05-28 23:01:07 +00:00
|
|
|
* (and sometimes sound effects) from.
|
2008-08-02 15:05:19 +00:00
|
|
|
*/
|
|
|
|
virtual void loadSoundFile(Common::String file) = 0;
|
|
|
|
|
2008-11-30 02:47:20 +00:00
|
|
|
/**
|
|
|
|
* Load a sound file for playing sound
|
|
|
|
* effects from.
|
|
|
|
*/
|
2009-09-13 21:48:02 +00:00
|
|
|
virtual void loadSfxFile(Common::String file) {}
|
2008-11-30 02:47:20 +00:00
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
/**
|
|
|
|
* Plays the specified track.
|
|
|
|
*
|
2009-11-29 13:52:02 +00:00
|
|
|
* @param track track number
|
2007-11-03 23:32:15 +00:00
|
|
|
*/
|
2006-03-12 14:22:27 +00:00
|
|
|
virtual void playTrack(uint8 track) = 0;
|
2007-11-03 23:32:15 +00:00
|
|
|
|
|
|
|
/**
|
2008-05-09 13:33:31 +00:00
|
|
|
* Stop playback of the current track.
|
2007-11-03 23:32:15 +00:00
|
|
|
*/
|
2006-01-13 23:06:04 +00:00
|
|
|
virtual void haltTrack() = 0;
|
2006-03-21 17:17:24 +00:00
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
/**
|
2008-05-09 13:33:31 +00:00
|
|
|
* Plays the specified sound effect.
|
2007-11-03 23:32:15 +00:00
|
|
|
*
|
2009-11-29 13:52:02 +00:00
|
|
|
* @param track sound effect id
|
2007-11-03 23:32:15 +00:00
|
|
|
*/
|
2006-01-13 23:06:04 +00:00
|
|
|
virtual void playSoundEffect(uint8 track) = 0;
|
2006-03-21 17:17:24 +00:00
|
|
|
|
2008-11-30 15:15:14 +00:00
|
|
|
/**
|
|
|
|
* Stop playback of all sfx tracks.
|
|
|
|
*/
|
|
|
|
virtual void stopAllSoundEffects() {}
|
|
|
|
|
2008-04-06 14:58:02 +00:00
|
|
|
/**
|
2008-05-09 13:33:31 +00:00
|
|
|
* Checks if the sound driver plays any sound.
|
2008-04-06 14:58:02 +00:00
|
|
|
*
|
|
|
|
* @return true if playing, false otherwise
|
|
|
|
*/
|
|
|
|
virtual bool isPlaying() const { return false; }
|
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
/**
|
|
|
|
* Starts fading out the volume.
|
|
|
|
*
|
|
|
|
* This keeps fading out the output until
|
|
|
|
* it is silenced, but does not change
|
|
|
|
* the volume set by setVolume! It will
|
|
|
|
* automatically reset the volume when
|
|
|
|
* playing a new track or sound effect.
|
|
|
|
*/
|
2006-01-13 23:06:04 +00:00
|
|
|
virtual void beginFadeOut() = 0;
|
2006-03-21 17:17:24 +00:00
|
|
|
|
2011-05-28 23:01:07 +00:00
|
|
|
/**
|
|
|
|
* Stops all audio playback when paused. Continues after end of pause.
|
|
|
|
*/
|
|
|
|
virtual void pause(bool paused);
|
|
|
|
|
2007-03-24 00:04:08 +00:00
|
|
|
void enableMusic(int enable) { _musicEnabled = enable; }
|
|
|
|
int musicEnabled() const { return _musicEnabled; }
|
2006-06-02 22:57:02 +00:00
|
|
|
void enableSFX(bool enable) { _sfxEnabled = enable; }
|
|
|
|
bool sfxEnabled() const { return _sfxEnabled; }
|
|
|
|
|
2008-03-21 16:18:27 +00:00
|
|
|
virtual bool voiceFileIsPresent(const char *file);
|
|
|
|
|
2009-05-29 17:12:45 +00:00
|
|
|
/**
|
|
|
|
* Checks whether a voice file with the given name is present
|
|
|
|
*
|
2009-11-29 13:55:26 +00:00
|
|
|
* @param file file name
|
2009-05-29 17:12:45 +00:00
|
|
|
* @return true if available, false otherwise
|
|
|
|
*/
|
|
|
|
bool isVoicePresent(const char *file);
|
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
/**
|
|
|
|
* Plays the specified voice file.
|
|
|
|
*
|
|
|
|
* Also before starting to play the
|
|
|
|
* specified voice file, it stops the
|
|
|
|
* current voice.
|
|
|
|
*
|
2009-11-29 13:55:26 +00:00
|
|
|
* @param file file to be played
|
|
|
|
* @param volume volume of the voice file
|
|
|
|
* @param isSfx marks file as sfx instead of voice
|
|
|
|
* @param handle store a copy of the sound handle
|
2008-05-24 22:47:08 +00:00
|
|
|
* @return playtime of the voice file (-1 marks unknown playtime)
|
2007-11-03 23:32:15 +00:00
|
|
|
*/
|
2009-05-24 01:37:51 +00:00
|
|
|
virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle = 0, uint8 volume = 255, bool isSfx = false);
|
2009-05-24 15:06:28 +00:00
|
|
|
|
2010-01-05 20:14:28 +00:00
|
|
|
Audio::SeekableAudioStream *getVoiceStream(const char *file);
|
2007-11-03 23:32:15 +00:00
|
|
|
|
2009-05-24 01:29:09 +00:00
|
|
|
bool playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *handle = 0, uint8 volume = 255, bool isSfx = false);
|
2009-02-01 19:27:01 +00:00
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
/**
|
|
|
|
* Checks if a voice is being played.
|
|
|
|
*
|
|
|
|
* @return true when playing, else false
|
|
|
|
*/
|
2009-05-24 01:29:09 +00:00
|
|
|
bool voiceIsPlaying(const Audio::SoundHandle *handle = 0);
|
2007-11-03 23:32:15 +00:00
|
|
|
|
2009-05-10 13:40:28 +00:00
|
|
|
/**
|
|
|
|
* Checks if all voice handles are used.
|
|
|
|
*
|
|
|
|
* @return false when a handle is free, else true
|
|
|
|
*/
|
|
|
|
bool allVoiceChannelsPlaying();
|
|
|
|
|
2008-05-24 22:47:08 +00:00
|
|
|
/**
|
|
|
|
* Checks how long a voice has been playing
|
|
|
|
*
|
|
|
|
* @return time in milliseconds
|
|
|
|
*/
|
2009-05-24 01:29:09 +00:00
|
|
|
uint32 voicePlayedTime(const Audio::SoundHandle &handle) {
|
|
|
|
return _mixer->getSoundElapsedTime(handle);
|
|
|
|
}
|
2008-05-24 22:47:08 +00:00
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
/**
|
|
|
|
* Stops playback of the current voice.
|
|
|
|
*/
|
2009-05-24 01:29:09 +00:00
|
|
|
void voiceStop(const Audio::SoundHandle *handle = 0);
|
2006-02-27 22:39:55 +00:00
|
|
|
protected:
|
2009-04-25 13:15:05 +00:00
|
|
|
const char *fileListEntry(int file) const { return (_soundDataList != 0 && file >= 0 && file < _soundDataList->fileListLen) ? _soundDataList->fileList[file] : ""; }
|
|
|
|
int fileListLen() const { return _soundDataList->fileListLen; }
|
|
|
|
const void *cdaData() const { return _soundDataList != 0 ? _soundDataList->cdaTracks : 0; }
|
|
|
|
int cdaTrackNum() const { return _soundDataList != 0 ? _soundDataList->cdaNumTracks : 0; }
|
|
|
|
int extraOffset() const { return _soundDataList != 0 ? _soundDataList->extraOffset : 0; }
|
2008-01-03 14:42:49 +00:00
|
|
|
|
2008-02-17 02:06:04 +00:00
|
|
|
enum {
|
2008-03-21 16:18:27 +00:00
|
|
|
kNumChannelHandles = 4
|
2008-02-17 02:06:04 +00:00
|
|
|
};
|
2009-01-01 15:06:43 +00:00
|
|
|
|
2009-05-24 01:29:09 +00:00
|
|
|
Audio::SoundHandle _soundChannels[kNumChannelHandles];
|
2008-02-17 02:06:04 +00:00
|
|
|
|
2007-03-24 00:04:08 +00:00
|
|
|
int _musicEnabled;
|
2006-06-02 22:57:02 +00:00
|
|
|
bool _sfxEnabled;
|
|
|
|
|
2008-05-11 23:16:50 +00:00
|
|
|
KyraEngine_v1 *_vm;
|
2006-02-27 22:39:55 +00:00
|
|
|
Audio::Mixer *_mixer;
|
2007-11-03 23:32:15 +00:00
|
|
|
|
2006-02-27 22:39:55 +00:00
|
|
|
private:
|
2008-01-03 14:42:49 +00:00
|
|
|
const AudioDataStruct *_soundDataList;
|
2008-03-21 16:18:27 +00:00
|
|
|
|
2006-02-27 22:39:55 +00:00
|
|
|
struct SpeechCodecs {
|
|
|
|
const char *fileext;
|
2010-01-05 02:27:24 +00:00
|
|
|
Audio::SeekableAudioStream *(*streamFunc)(
|
2007-07-15 18:29:05 +00:00
|
|
|
Common::SeekableReadStream *stream,
|
2010-01-16 21:36:08 +00:00
|
|
|
DisposeAfterUse::Flag disposeAfterUse);
|
2006-02-27 22:39:55 +00:00
|
|
|
};
|
2006-03-21 17:17:24 +00:00
|
|
|
|
2008-06-03 18:12:21 +00:00
|
|
|
static const SpeechCodecs _supportedCodecs[];
|
2006-02-27 22:39:55 +00:00
|
|
|
};
|
|
|
|
|
2006-03-28 15:15:36 +00:00
|
|
|
class MixedSoundDriver : public Sound {
|
|
|
|
public:
|
2008-05-11 23:16:50 +00:00
|
|
|
MixedSoundDriver(KyraEngine_v1 *vm, Audio::Mixer *mixer, Sound *music, Sound *sfx) : Sound(vm, mixer), _music(music), _sfx(sfx) {}
|
2006-03-28 15:15:36 +00:00
|
|
|
~MixedSoundDriver() { delete _music; delete _sfx; }
|
|
|
|
|
2008-04-06 13:32:41 +00:00
|
|
|
kType getMusicType() const { return _music->getMusicType(); }
|
|
|
|
kType getSfxType() const { return _sfx->getSfxType(); }
|
|
|
|
|
2007-12-22 23:29:15 +00:00
|
|
|
bool init() { return (_music->init() && _sfx->init()); }
|
2006-03-28 15:15:36 +00:00
|
|
|
void process() { _music->process(); _sfx->process(); }
|
|
|
|
|
2008-04-04 18:09:19 +00:00
|
|
|
void updateVolumeSettings() { _music->updateVolumeSettings(); _sfx->updateVolumeSettings(); }
|
2006-03-28 15:15:36 +00:00
|
|
|
|
2008-01-03 21:57:54 +00:00
|
|
|
void setSoundList(const AudioDataStruct * list) { _music->setSoundList(list); _sfx->setSoundList(list); }
|
2008-04-06 14:13:14 +00:00
|
|
|
bool hasSoundFile(uint file) const { return _music->hasSoundFile(file) && _sfx->hasSoundFile(file); }
|
2007-01-29 18:15:14 +00:00
|
|
|
void loadSoundFile(uint file) { _music->loadSoundFile(file); _sfx->loadSoundFile(file); }
|
2008-08-02 15:05:19 +00:00
|
|
|
void loadSoundFile(Common::String file) { _music->loadSoundFile(file); _sfx->loadSoundFile(file); }
|
2010-01-25 01:39:44 +00:00
|
|
|
|
2009-05-29 17:21:00 +00:00
|
|
|
void loadSfxFile(Common::String file) { _sfx->loadSoundFile(file); }
|
|
|
|
|
2006-03-28 15:15:36 +00:00
|
|
|
void playTrack(uint8 track) { _music->playTrack(track); }
|
|
|
|
void haltTrack() { _music->haltTrack(); }
|
2008-04-06 14:58:02 +00:00
|
|
|
bool isPlaying() const { return _music->isPlaying() | _sfx->isPlaying(); }
|
2006-03-28 15:15:36 +00:00
|
|
|
|
|
|
|
void playSoundEffect(uint8 track) { _sfx->playSoundEffect(track); }
|
|
|
|
|
2009-05-29 17:21:00 +00:00
|
|
|
void stopAllSoundEffects() { _sfx->stopAllSoundEffects(); }
|
|
|
|
|
2006-03-28 15:15:36 +00:00
|
|
|
void beginFadeOut() { _music->beginFadeOut(); }
|
2011-05-28 23:01:07 +00:00
|
|
|
void pause(bool paused) { _music->pause(paused); _sfx->pause(paused); }
|
2006-03-28 15:15:36 +00:00
|
|
|
private:
|
|
|
|
Sound *_music, *_sfx;
|
|
|
|
};
|
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
// Digital Audio
|
|
|
|
class AUDStream;
|
2008-06-03 18:12:21 +00:00
|
|
|
class KyraAudioStream;
|
2008-05-11 17:50:13 +00:00
|
|
|
class KyraEngine_MR;
|
2007-11-03 23:32:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Digital audio output device.
|
|
|
|
*
|
|
|
|
* This is just used for Kyrandia 3.
|
|
|
|
*/
|
2006-05-17 18:07:02 +00:00
|
|
|
class SoundDigital {
|
|
|
|
public:
|
2008-05-11 17:50:13 +00:00
|
|
|
SoundDigital(KyraEngine_MR *vm, Audio::Mixer *mixer);
|
2006-05-17 18:07:02 +00:00
|
|
|
~SoundDigital();
|
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
bool init() { return true; }
|
2007-03-24 00:04:08 +00:00
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
/**
|
|
|
|
* Plays a sound.
|
|
|
|
*
|
2009-11-29 13:55:26 +00:00
|
|
|
* @param filename file to be played
|
|
|
|
* @param priority priority of the sound
|
|
|
|
* @param type type
|
|
|
|
* @param volume channel volume
|
|
|
|
* @param loop true if the sound should loop (endlessly)
|
|
|
|
* @param channel tell the sound player to use a specific channel for playback
|
2007-11-03 23:32:15 +00:00
|
|
|
*
|
|
|
|
* @return channel playing the sound
|
|
|
|
*/
|
2008-04-20 22:24:24 +00:00
|
|
|
int playSound(const char *filename, uint8 priority, Audio::Mixer::SoundType type, int volume = 255, bool loop = false, int channel = -1);
|
2007-11-03 23:32:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks if a given channel is playing a sound.
|
|
|
|
*
|
2009-11-29 13:55:26 +00:00
|
|
|
* @param channel channel number to check
|
2007-11-03 23:32:15 +00:00
|
|
|
* @return true if playing, else false
|
|
|
|
*/
|
2006-05-17 18:07:02 +00:00
|
|
|
bool isPlaying(int channel);
|
2007-11-03 23:32:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Stop the playback of a sound in the given
|
|
|
|
* channel.
|
|
|
|
*
|
2009-11-29 13:55:26 +00:00
|
|
|
* @param channel channel number
|
2007-11-03 23:32:15 +00:00
|
|
|
*/
|
2006-05-17 18:07:02 +00:00
|
|
|
void stopSound(int channel);
|
2007-11-03 23:32:15 +00:00
|
|
|
|
2008-04-14 20:20:51 +00:00
|
|
|
/**
|
2008-05-09 13:33:31 +00:00
|
|
|
* Stops playback of all sounds.
|
2008-04-14 20:20:51 +00:00
|
|
|
*/
|
|
|
|
void stopAllSounds();
|
|
|
|
|
2007-11-03 23:32:15 +00:00
|
|
|
/**
|
|
|
|
* Makes the sound in a given channel
|
|
|
|
* fading out.
|
|
|
|
*
|
2009-11-29 13:55:26 +00:00
|
|
|
* @param channel channel number
|
|
|
|
* @param ticks fadeout time
|
2007-11-03 23:32:15 +00:00
|
|
|
*/
|
2008-04-12 23:26:13 +00:00
|
|
|
void beginFadeOut(int channel, int ticks);
|
2006-05-17 18:07:02 +00:00
|
|
|
private:
|
2008-05-11 17:50:13 +00:00
|
|
|
KyraEngine_MR *_vm;
|
2006-05-17 18:07:02 +00:00
|
|
|
Audio::Mixer *_mixer;
|
|
|
|
|
|
|
|
struct Sound {
|
|
|
|
Audio::SoundHandle handle;
|
2008-04-20 14:36:39 +00:00
|
|
|
|
|
|
|
char filename[16];
|
2008-04-20 14:25:37 +00:00
|
|
|
uint8 priority;
|
2008-06-03 18:12:21 +00:00
|
|
|
KyraAudioStream *stream;
|
2008-04-17 17:49:18 +00:00
|
|
|
} _sounds[4];
|
2008-06-03 18:12:21 +00:00
|
|
|
|
|
|
|
struct AudioCodecs {
|
|
|
|
const char *fileext;
|
2010-01-05 02:27:24 +00:00
|
|
|
Audio::SeekableAudioStream *(*streamFunc)(
|
2008-06-03 18:12:21 +00:00
|
|
|
Common::SeekableReadStream *stream,
|
2010-01-16 21:36:08 +00:00
|
|
|
DisposeAfterUse::Flag disposeAfterUse);
|
2008-06-03 18:12:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const AudioCodecs _supportedCodecs[];
|
2006-05-17 18:07:02 +00:00
|
|
|
};
|
|
|
|
|
2009-10-04 21:26:33 +00:00
|
|
|
} // End of namespace Kyra
|
2004-11-11 13:37:35 +00:00
|
|
|
|
|
|
|
#endif
|