Kyra::SoundDigital_MR Class Reference

Digital audio output device. More...

#include <sound_digital_mr.h>

Collaboration diagram for Kyra::SoundDigital_MR:


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

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.

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.

channelchannel number to check
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.

filenamefile to be played
prioritypriority of the sound
volumechannel volume
looptrue if the sound should loop (endlessly)
channeltell the sound player to use a specific channel for playback
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.

channelchannel number

Definition at line 209 of file sound_digital_mr.cpp.

Member Data Documentation

◆ _mixer

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

Definition at line 97 of file sound_digital_mr.h.

◆ _sounds

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

◆ _supportedCodecs

const SoundDigital_MR::AudioCodecs Kyra::SoundDigital_MR::_supportedCodecs
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

Definition at line 96 of file sound_digital_mr.h.

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