ScummVM API documentation
Kyra::SoundMac Class Reference
Inheritance diagram for Kyra::SoundMac:
Kyra::Sound

Public Member Functions

 SoundMac (KyraEngine_v1 *vm, Audio::Mixer *mixer)
 
kType getMusicType () const override
 
bool init () override
 
bool init (bool hiQuality)
 
void initAudioResourceInfo (int, void *) override
 
void selectAudioResourceSet (int set) override
 
bool hasSoundFile (uint) const override
 
void loadSoundFile (uint) override
 
void loadSoundFile (const Common::Path &) override
 
void playTrack (uint8 track) override
 
void haltTrack () override
 
void playSoundEffect (uint16 track, uint8) override
 
bool isPlaying () const override
 
void beginFadeOut () override
 
void updateVolumeSettings () override
 
void enableMusic (int enable) override
 
- Public Member Functions inherited from Kyra::Sound
 Sound (KyraEngine_v1 *vm, Audio::Mixer *mixer)
 
virtual kType getSfxType () const
 
virtual bool useDigitalSfx () const
 
virtual void process ()
 
virtual void unloadSoundFile (const Common::String &file)
 
virtual void loadSfxFile (const Common::Path &file)
 
virtual void stopAllSoundEffects ()
 
virtual void beginFadeOut (int)
 
virtual void pause (bool paused)
 
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::SeekableAudioStreamgetVoiceStream (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 ()
 

Additional Inherited Members

- Public Types inherited from Kyra::Sound
enum  kType {
  kAdLib, kMidiMT32, kMidiGM, kTowns,
  kPC98, kPCSpkr, kPCjr, kAmiga,
  kSegaCD, kMac
}
 
- Protected Types inherited from Kyra::Sound
enum  { kNumChannelHandles = 4 }
 
- Protected Attributes inherited from Kyra::Sound
SoundChannel _soundChannels [kNumChannelHandles]
 
int _musicEnabled
 
bool _sfxEnabled
 
KyraEngine_v1_vm
 
Audio::Mixer_mixer
 

Member Function Documentation

◆ init()

bool Kyra::SoundMac::init ( )
inlineoverridevirtual

Initializes the output device.

Returns
true on success, else false

Implements Kyra::Sound.

◆ initAudioResourceInfo()

void Kyra::SoundMac::initAudioResourceInfo ( int  set,
void *  info 
)
inlineoverridevirtual

Assigns static resource data with information on how to load audio resources to

Parameters
setvalue 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::SoundMac::selectAudioResourceSet ( int  set)
overridevirtual

Select audio resource set.

Parameters
setvalue defined in AudioResourceSet enum

Implements Kyra::Sound.

◆ hasSoundFile()

bool Kyra::SoundMac::hasSoundFile ( uint  file) const
inlineoverridevirtual

Checks if a given sound file is present.

Parameters
tracktrack number
Returns
true if available, false otherwise

Implements Kyra::Sound.

◆ loadSoundFile() [1/2]

void Kyra::SoundMac::loadSoundFile ( uint  file)
inlineoverridevirtual

Load a specifc sound file for use of playing music and sound effects.

Implements Kyra::Sound.

◆ loadSoundFile() [2/2]

void Kyra::SoundMac::loadSoundFile ( const Common::Path file)
inlineoverridevirtual

Load a sound file for playing music (and sometimes sound effects) from.

Implements Kyra::Sound.

◆ playTrack()

void Kyra::SoundMac::playTrack ( uint8  track)
overridevirtual

Plays the specified track.

Parameters
tracktrack number

Implements Kyra::Sound.

◆ haltTrack()

void Kyra::SoundMac::haltTrack ( )
overridevirtual

Stop playback of the current track.

Implements Kyra::Sound.

◆ playSoundEffect()

void Kyra::SoundMac::playSoundEffect ( uint16  track,
uint8  volume 
)
overridevirtual

Plays the specified sound effect.

Parameters
tracksound effect id

Implements Kyra::Sound.

◆ isPlaying()

bool Kyra::SoundMac::isPlaying ( ) const
overridevirtual

Checks if the sound driver plays any sound.

Returns
true if playing, false otherwise

Reimplemented from Kyra::Sound.

◆ beginFadeOut()

void Kyra::SoundMac::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.

◆ updateVolumeSettings()

void Kyra::SoundMac::updateVolumeSettings ( )
overridevirtual

Updates internal volume settings according to ConfigManager.

Reimplemented from Kyra::Sound.


The documentation for this class was generated from the following file: