|
| MixedSoundDriver (KyraEngine_v1 *vm, Audio::Mixer *mixer, Sound *music, Sound *sfx) |
|
kType | getMusicType () const override |
|
kType | getSfxType () const override |
|
bool | init () override |
|
void | process () override |
|
void | updateVolumeSettings () override |
|
void | initAudioResourceInfo (int set, void *info) override |
|
void | selectAudioResourceSet (int set) override |
|
bool | hasSoundFile (uint file) const override |
|
void | loadSoundFile (uint file) override |
|
void | loadSoundFile (const Common::Path &file) override |
|
void | loadSfxFile (const Common::Path &file) override |
|
void | playTrack (uint8 track) override |
|
void | haltTrack () override |
|
bool | isPlaying () const override |
|
void | playSoundEffect (uint16 track, uint8 volume=0xFF) override |
|
void | stopAllSoundEffects () override |
|
void | beginFadeOut () override |
|
void | pause (bool paused) override |
|
| Sound (KyraEngine_v1 *vm, Audio::Mixer *mixer) |
|
virtual bool | useDigitalSfx () const |
|
virtual void | unloadSoundFile (const Common::String &file) |
|
virtual void | beginFadeOut (int) |
|
virtual void | enableMusic (int enable) |
|
int | musicEnabled () const |
|
void | enableSFX (bool enable) |
|
bool | sfxEnabled () const |
|
bool | isVoicePresent (const char *file) const |
|
virtual int32 | voicePlay (const char *file, Audio::SoundHandle *handle=0, uint8 volume=255, uint8 priority=255, bool isSfx=false) |
|
Audio::SeekableAudioStream * | getVoiceStream (const char *file) const |
|
bool | playVoiceStream (Audio::AudioStream *stream, Audio::SoundHandle *handle=0, uint8 volume=255, uint8 priority=255, bool isSfx=false) |
|
bool | voiceIsPlaying (const Audio::SoundHandle *handle=0) const |
|
bool | allVoiceChannelsPlaying () const |
|
uint32 | voicePlayedTime (const Audio::SoundHandle &handle) const |
|
void | voiceStop (const Audio::SoundHandle *handle=0) |
|
virtual int | checkTrigger () |
|
virtual void | resetTrigger () |
|
|
enum | kType {
kAdLib,
kMidiMT32,
kMidiGM,
kTowns,
kPC98,
kPCSpkr,
kPCjr,
kAmiga,
kSegaCD,
kMac
} |
|
enum | { kNumChannelHandles = 4
} |
|
SoundChannel | _soundChannels [kNumChannelHandles] |
|
int | _musicEnabled |
|
bool | _sfxEnabled |
|
KyraEngine_v1 * | _vm |
|
Audio::Mixer * | _mixer |
|
◆ init()
bool Kyra::MixedSoundDriver::init |
( |
| ) |
|
|
overridevirtual |
Initializes the output device.
- Returns
- true on success, else false
Implements Kyra::Sound.
◆ process()
void Kyra::MixedSoundDriver::process |
( |
| ) |
|
|
overridevirtual |
Updates the device, this is needed for some devices.
Reimplemented from Kyra::Sound.
◆ updateVolumeSettings()
void Kyra::MixedSoundDriver::updateVolumeSettings |
( |
| ) |
|
|
overridevirtual |
Updates internal volume settings according to ConfigManager.
Reimplemented from Kyra::Sound.
◆ initAudioResourceInfo()
void Kyra::MixedSoundDriver::initAudioResourceInfo |
( |
int |
set, |
|
|
void * |
info |
|
) |
| |
|
overridevirtual |
Assigns static resource data with information on how to load audio resources to
- Parameters
-
set | value defined in AudioResourceSet enum info various types of resource info data (file list, file name pattern, struct, etc. - depending on the inheriting driver type) |
Implements Kyra::Sound.
◆ selectAudioResourceSet()
void Kyra::MixedSoundDriver::selectAudioResourceSet |
( |
int |
set | ) |
|
|
overridevirtual |
Select audio resource set.
- Parameters
-
set | value defined in AudioResourceSet enum |
Implements Kyra::Sound.
◆ hasSoundFile()
bool Kyra::MixedSoundDriver::hasSoundFile |
( |
uint |
file | ) |
const |
|
overridevirtual |
Checks if a given sound file is present.
- Parameters
-
- Returns
- true if available, false otherwise
Implements Kyra::Sound.
◆ loadSoundFile() [1/2]
void Kyra::MixedSoundDriver::loadSoundFile |
( |
uint |
file | ) |
|
|
overridevirtual |
Load a specifc sound file for use of playing music and sound effects.
Implements Kyra::Sound.
◆ loadSoundFile() [2/2]
void Kyra::MixedSoundDriver::loadSoundFile |
( |
const Common::Path & |
file | ) |
|
|
overridevirtual |
Load a sound file for playing music (and sometimes sound effects) from.
Implements Kyra::Sound.
◆ loadSfxFile()
void Kyra::MixedSoundDriver::loadSfxFile |
( |
const Common::Path & |
file | ) |
|
|
overridevirtual |
Load a sound file for playing sound effects from.
Reimplemented from Kyra::Sound.
◆ playTrack()
void Kyra::MixedSoundDriver::playTrack |
( |
uint8 |
track | ) |
|
|
overridevirtual |
Plays the specified track.
- Parameters
-
Implements Kyra::Sound.
◆ haltTrack()
void Kyra::MixedSoundDriver::haltTrack |
( |
| ) |
|
|
overridevirtual |
Stop playback of the current track.
Implements Kyra::Sound.
◆ isPlaying()
bool Kyra::MixedSoundDriver::isPlaying |
( |
| ) |
const |
|
overridevirtual |
Checks if the sound driver plays any sound.
- Returns
- true if playing, false otherwise
Reimplemented from Kyra::Sound.
◆ playSoundEffect()
void Kyra::MixedSoundDriver::playSoundEffect |
( |
uint16 |
track, |
|
|
uint8 |
volume = 0xFF |
|
) |
| |
|
overridevirtual |
Plays the specified sound effect.
- Parameters
-
Implements Kyra::Sound.
◆ stopAllSoundEffects()
void Kyra::MixedSoundDriver::stopAllSoundEffects |
( |
| ) |
|
|
overridevirtual |
Stop playback of all sfx tracks.
Reimplemented from Kyra::Sound.
◆ beginFadeOut()
void Kyra::MixedSoundDriver::beginFadeOut |
( |
| ) |
|
|
overridevirtual |
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.
Implements Kyra::Sound.
◆ pause()
void Kyra::MixedSoundDriver::pause |
( |
bool |
paused | ) |
|
|
overridevirtual |
Stops all audio playback when paused. Continues after end of pause.
Reimplemented from Kyra::Sound.
The documentation for this class was generated from the following file: