#include <Audio.h>
Public Member Functions | |
UINT | Init (int frequency, word format, int channels, int chunksize) |
Function to initialize the object Audio. | |
void | Release (void) |
Function to finalize the object Audio. | |
UINT | SetNumChannels (int channels) |
Function to change the number of channels of the audio. | |
int | GetNumChannels (void) |
Function to obtain the number of channels of the audio. | |
word | GetFormat (void) |
Function to obtain the format of the audio. | |
int | GetFrequency (void) |
Function to obtain the frequency of the audio. | |
UINT | SetVolume (int volume) |
Function to change the volume of the audio. | |
int | GetVolume (void) |
Function to obtain the volume of the audio. | |
UINT | SetChannelVolume (int channel, int volume) |
Function to change the volume of a channel. | |
int | GetChannelVolume (int channel) |
Function to obtain the volume of a channel. | |
UINT | SetChannelPan (int channel, byte left, byte right) |
Function to change the panning of a channel. | |
UINT | DelChannelPan (int channel) |
Function to delete the panning of a channel. | |
UINT | PlaySound (Sound &snd, int loops=PLAY_ONCE) |
Function to play a sound in a channel. | |
UINT | PlaySound (Sound &snd, int channel, int loops) |
Function to play a sound in a channel. | |
UINT | FadeInSound (Sound &snd, int ms, int loops=PLAY_ONCE) |
Function to play a sound in a channel with fade in. | |
UINT | FadeInSound (Sound &snd, int ms, int channel, int loops) |
Function to play a sound in a channel with fade in. | |
void | PauseSound (Sound &snd) |
Function to pause a sound of a channel. | |
void | PauseChannel (int channel) |
Function to pause a channel. | |
void | PauseAudio (void) |
Function to pause the audio. | |
void | ResumeSound (Sound &snd) |
Function to resume a sound of a channel. | |
void | ResumeChannel (int channel) |
Function to resume a channel. | |
void | ResumeAudio (void) |
Function to resume the audio. | |
void | StopSound (Sound &snd) |
Function to stop a sound of a channel. | |
void | StopChannel (int channel) |
Function to stop a channel. | |
void | StopAudio (void) |
Function to stop the audio. | |
void | FadeOutSound (Sound &snd, int ms) |
Function to stop a sound of a channel with fade out. | |
void | FadeOutChannel (int channel, int ms) |
Function to stop a channel with fade out. | |
void | FadeOutAudio (int ms) |
Function to stop the audio with fade out. | |
bool | IsPlayingSound (Sound &snd) |
Function to ask if a sound is playing. | |
bool | IsPlayingChannel (int channel) |
Function to ask if a channel is playing. | |
bool | IsPausedSound (Sound &snd) |
Function to ask if a sound is paused. | |
bool | IsPausedChannel (int channel) |
Function to ask if a channel is paused. | |
Static Public Member Functions | |
static Audio * | GetInstance (void) |
Function to obtain the instance of Audio. |
The Audio class manages the subjects related to the system of audio, such as to handle the channels of the application. Being able to reproduce, to pause or to stop sounds in these channels, and other effects like fade in and fade out.
UINT Yukino::Audio::DelChannelPan | ( | int | channel | ) |
Function to delete the panning of a channel.
This function serves to delete the panning of a channel.
channel | Channel number. |
UINT Yukino::Audio::FadeInSound | ( | Sound & | snd, | |
int | ms, | |||
int | channel, | |||
int | loops | |||
) |
Function to play a sound in a channel with fade in.
This function serves to play a sound in a channel with fade in.
snd | Sound to play. | |
ms | Number of milliseconds for fade in. | |
channel | Channel number. | |
loops | Number of loops. |
Function to play a sound in a channel with fade in.
This function serves to play a sound in a channel with fade in.
snd | Sound to play. | |
ms | Number of milliseconds for fade in. | |
loops | Number of loops. |
void Yukino::Audio::FadeOutAudio | ( | int | ms | ) | [inline] |
Function to stop the audio with fade out.
This function serves to stop the audio with fade out.
ms | Number of milliseconds for fade out. |
void Yukino::Audio::FadeOutChannel | ( | int | channel, | |
int | ms | |||
) | [inline] |
Function to stop a channel with fade out.
This function serves to stop a channel with fade out.
channel | Channel to stop. | |
ms | Number of milliseconds for fade out. |
void Yukino::Audio::FadeOutSound | ( | Sound & | snd, | |
int | ms | |||
) | [inline] |
Function to stop a sound of a channel with fade out.
This function serves to stop a sound of a channel with fade out.
snd | Sound to stop. | |
ms | Number of milliseconds for fade out. |
int Yukino::Audio::GetChannelVolume | ( | int | channel | ) | [inline] |
Function to obtain the volume of a channel.
This function serves to obtain the volume of a channel.
channel | Channel number. |
word Yukino::Audio::GetFormat | ( | void | ) | [inline] |
Function to obtain the format of the audio.
This function serves to obtain the format of the audio.
int Yukino::Audio::GetFrequency | ( | void | ) | [inline] |
Function to obtain the frequency of the audio.
This function serves to obtain the frequency of the audio.
Audio * Yukino::Audio::GetInstance | ( | void | ) | [static] |
Function to obtain the instance of Audio.
This function creates an instance of Audio, in case of not being created, and gives back a pointer of this if memory is successful requesting.
int Yukino::Audio::GetNumChannels | ( | void | ) | [inline] |
Function to obtain the number of channels of the audio.
This function serves to obtain the number of channels of the audio.
int Yukino::Audio::GetVolume | ( | void | ) | [inline] |
Function to obtain the volume of the audio.
This function serves to obtain the volume of the audio.
UINT Yukino::Audio::Init | ( | int | frequency, | |
word | format, | |||
int | channels, | |||
int | chunksize | |||
) |
Function to initialize the object Audio.
This function serves to initialize the object Audio, passing to him the frequency, the format, the number of channels and the buffer's size.
frequency | Audio's frequency. | |
format | Audio's format. | |
channels | Audio's channels's number. | |
chunksize | Audio's buffer's size. |
bool Yukino::Audio::IsPausedChannel | ( | int | channel | ) | [inline] |
Function to ask if a channel is paused.
This function serves to ask if a channel is paused.
channel | Channel to ask. |
bool Yukino::Audio::IsPausedSound | ( | Sound & | snd | ) | [inline] |
Function to ask if a sound is paused.
This function serves to ask if a sound is paused.
snd | Sound to ask. |
bool Yukino::Audio::IsPlayingChannel | ( | int | channel | ) | [inline] |
Function to ask if a channel is playing.
This function serves to ask if a channel is playing.
channel | Channel to ask. |
bool Yukino::Audio::IsPlayingSound | ( | Sound & | snd | ) | [inline] |
Function to ask if a sound is playing.
This function serves to ask if a sound is playing.
snd | Sound to ask. |
void Yukino::Audio::PauseAudio | ( | void | ) | [inline] |
Function to pause the audio.
This function serves to pause the audio.
void Yukino::Audio::PauseChannel | ( | int | channel | ) | [inline] |
Function to pause a channel.
This function serves to pause a channel.
channel | Channel to pause. |
void Yukino::Audio::PauseSound | ( | Sound & | snd | ) | [inline] |
Function to pause a sound of a channel.
This function serves to pause a sound of a channel.
snd | Sound to pause. |
UINT Yukino::Audio::PlaySound | ( | Sound & | snd, | |
int | channel, | |||
int | loops | |||
) |
Function to play a sound in a channel.
This function serves to play a sound in a channel.
snd | Sound to play. | |
channel | Channel number. | |
loops | Number of loops. |
Function to play a sound in a channel.
This function serves to play a sound in a channel.
snd | Sound to play. | |
loops | Number of loops. |
void Yukino::Audio::Release | ( | void | ) |
void Yukino::Audio::ResumeAudio | ( | void | ) | [inline] |
Function to resume the audio.
This function serves to resume the audio.
void Yukino::Audio::ResumeChannel | ( | int | channel | ) | [inline] |
Function to resume a channel.
This function serves to resume a channel.
channel | Channel to resume. |
void Yukino::Audio::ResumeSound | ( | Sound & | snd | ) | [inline] |
Function to resume a sound of a channel.
This function serves to resume a sound of a channel.
snd | Sound to resume. |
Function to change the panning of a channel.
This function serves to change the panning of a channel.
channel | Channel number. | |
left | Level in the left. | |
right | Level in the right. |
UINT Yukino::Audio::SetChannelVolume | ( | int | channel, | |
int | volume | |||
) |
Function to change the volume of a channel.
This function serves to change the volume of a channel.
channel | Channel number. | |
volume | New volume. |
UINT Yukino::Audio::SetNumChannels | ( | int | channels | ) |
Function to change the number of channels of the audio.
This function serves to change the number of channels of the audio.
channels | Number of new channels. |
UINT Yukino::Audio::SetVolume | ( | int | volume | ) |
Function to change the volume of the audio.
This function serves to change the volume of the audio.
volume | New volume. |
void Yukino::Audio::StopAudio | ( | void | ) | [inline] |
Function to stop the audio.
This function serves to stop the audio.
void Yukino::Audio::StopChannel | ( | int | channel | ) | [inline] |
Function to stop a channel.
This function serves to stop a channel.
channel | Channel to stop. |
void Yukino::Audio::StopSound | ( | Sound & | snd | ) | [inline] |
Function to stop a sound of a channel.
This function serves to stop a sound of a channel.
snd | Sound to stop. |