ScummVM
Kyra::SoundDigital_MR Class Reference

Digital audio output device. More...

#include <sound_digital_mr.h>

Collaboration diagram for Kyra::SoundDigital_MR:

Classes

struct  AudioCodecs
 
struct  Sound
 

Public Member Functions

 SoundDigital_MR (KyraEngine_MR *vm, Audio::Mixer *mixer)
 
 ~SoundDigital_MR ()
 
int playSound (const char *filename, uint8 priority, Audio::Mixer::SoundType type, int volume=255, bool loop=false, int channel=-1)
 Plays a sound. More...
 
bool isPlaying (int channel)
 Checks if a given channel is playing a sound. More...
 
void stopSound (int channel)
 Stop the playback of a sound in the given channel. More...
 
void stopAllSounds ()
 Stops playback of all sounds. More...
 
void beginFadeOut (int channel, int ticks)
 Makes the sound in a given channel fading out. More...
 

Private Attributes

KyraEngine_MR_vm
 
Audio::Mixer_mixer
 
struct Kyra::SoundDigital_MR::Sound _sounds [4]
 

Static Private Attributes

static const AudioCodecs _supportedCodecs []
 

Detailed Description

Digital audio output device.

This is just used for Kyrandia 3.

Definition at line 47 of file sound_digital_mr.h.

Constructor & Destructor Documentation

◆ SoundDigital_MR()

Kyra::SoundDigital_MR::SoundDigital_MR ( KyraEngine_MR vm,
Audio::Mixer mixer 
)

Definition at line 105 of file sound_digital_mr.cpp.

◆ ~SoundDigital_MR()

Kyra::SoundDigital_MR::~SoundDigital_MR ( )

Definition at line 110 of file sound_digital_mr.cpp.

Member Function Documentation

◆ beginFadeOut()

void Kyra::SoundDigital_MR::beginFadeOut ( int  channel,
int  ticks 
)

Makes the sound in a given channel fading out.

Parameters
channelchannel number
ticksfadeout time

Definition at line 225 of file sound_digital_mr.cpp.

◆ isPlaying()

bool Kyra::SoundDigital_MR::isPlaying ( int  channel)

Checks if a given channel is playing a sound.

Parameters
channelchannel number to check
Returns
true if playing, else false

Definition at line 197 of file sound_digital_mr.cpp.

◆ playSound()

int Kyra::SoundDigital_MR::playSound ( const char *  filename,
uint8  priority,
Audio::Mixer::SoundType  type,
int  volume = 255,
bool  loop = false,
int  channel = -1 
)

Plays a sound.

Parameters
filenamefile to be played
prioritypriority of the sound
typetype
volumechannel volume
looptrue if the sound should loop (endlessly)
channeltell the sound player to use a specific channel for playback
Returns
channel playing the sound

Definition at line 115 of file sound_digital_mr.cpp.

◆ stopAllSounds()

void Kyra::SoundDigital_MR::stopAllSounds ( )

Stops playback of all sounds.

Definition at line 218 of file sound_digital_mr.cpp.

◆ stopSound()

void Kyra::SoundDigital_MR::stopSound ( int  channel)

Stop the playback of a sound in the given channel.

Parameters
channelchannel number

Definition at line 209 of file sound_digital_mr.cpp.

Member Data Documentation

◆ _mixer

Audio::Mixer* Kyra::SoundDigital_MR::_mixer
private

Definition at line 97 of file sound_digital_mr.h.

◆ _sounds

struct Kyra::SoundDigital_MR::Sound Kyra::SoundDigital_MR::_sounds[4]
private

◆ _supportedCodecs

const SoundDigital_MR::AudioCodecs Kyra::SoundDigital_MR::_supportedCodecs
staticprivate
Initial value:
= {
{ ".FLA", Audio::makeFLACStream },
{ ".MP3", Audio::makeMP3Stream },
{ ".AUD", makeAUDStream },
{ 0, 0 }
}

Definition at line 114 of file sound_digital_mr.h.

◆ _vm

KyraEngine_MR* Kyra::SoundDigital_MR::_vm
private

Definition at line 96 of file sound_digital_mr.h.


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