# 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.

## 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.

## Member Function Documentation

bool GuiSound::IsPlaying | ( |  | ) |

Checks if the sound is currently playing

Returns:
  true if sound is playing, false otherwise

void GuiSound::SetLoop | ( | bool | l | ) |

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

Parameters:

  | l | Loop (true to loop)

void GuiSound::SetVolume | ( | int | v | ) |

Set sound volume

Parameters:

  | v | Sound volume (0-100)

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

- gui.h
- gui_sound.cpp