Public Member Functions | Protected Attributes

GuiSound Class Reference

Sound conversion and playback. A wrapper for other sound libraries - ASND, libmad, ltremor, etc. More...

#include <gui.h>

List of all members.

Public Member Functions

 GuiSound (const u8 *s, int l, int t)
 ~GuiSound ()
 Destructor.
void Play ()
 Start sound playback.
void Stop ()
 Stop sound playback.
void Pause ()
 Pause sound playback.
void Resume ()
 Resume sound playback.
bool IsPlaying ()
void SetVolume (int v)
void SetLoop (bool l)

Protected Attributes

const u8 * sound
 Pointer to the sound data.
int type
 Sound format type (SOUND_PCM or SOUND_OGG).
s32 length
 Length of sound data.
s32 voice
 Currently assigned ASND voice channel.
s32 volume
 Sound volume (0-100).
bool loop
 Loop sound playback.

Detailed Description

Sound conversion and playback. A wrapper for other sound libraries - ASND, libmad, ltremor, etc.

Definition at line 131 of file gui.h.


Constructor & Destructor Documentation

GuiSound::GuiSound ( const u8 *  s,
int  l,
int  t 
)

Constructor

Parameters:
s Pointer to the sound data
l Length of sound data
t Sound format type (SOUND_PCM or SOUND_OGG)
GuiSound::~GuiSound (  ) 

Destructor.

Destructor for the GuiSound class.

Definition at line 29 of file gui_sound.cpp.


Member Function Documentation

bool GuiSound::IsPlaying (  ) 

Checks if the sound is currently playing

Returns:
true if sound is playing, false otherwise

Definition at line 121 of file gui_sound.cpp.

void GuiSound::SetLoop ( bool  l  ) 

Set the sound to loop playback (only applies to OGG)

Parameters:
l Loop (true to loop)

Definition at line 152 of file gui_sound.cpp.

void GuiSound::SetVolume ( int  v  ) 

Set sound volume

Parameters:
v Sound volume (0-100)

Definition at line 129 of file gui_sound.cpp.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Defines