UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ugdk::audio::Sample Class Reference

#include <ugdk/audio/sample.h>

Public Member Functions

void Play ()
 Plays the sound. More...
 
void PlayForever ()
 Plays this sample until told to stop. More...
 
void Play (int loops)
 Plays the sound the given number of times. More...
 
void Stop ()
 Stops playing the sound. More...
 
bool IsPlaying ()
 Returns whether the sound is playing or not. More...
 
void SetVolume (double vol)
 Sets the volume. More...
 
double Volume ()
 Returns the sound's volume. More...
 

Friends

class Manager
 

Detailed Description

Note: It isn't possible to instantiate a Sample directly. In order to play a sound, you must call LoadSample() from AudioManager. All memory management is done my the AudioManager.

See also
AudioManager

Member Function Documentation

bool ugdk::audio::Sample::IsPlaying ( )

Returns whether the sound is playing or not.

void ugdk::audio::Sample::Play ( )

Plays the sound.

void ugdk::audio::Sample::Play ( int  loops)

Plays the sound the given number of times.

void ugdk::audio::Sample::PlayForever ( )

Plays this sample until told to stop.

void ugdk::audio::Sample::SetVolume ( double  vol)

Sets the volume.

Sets the volume between 0 and 1. 0 is silent, 1 is the max volume.

Parameters
volThe volume.
void ugdk::audio::Sample::Stop ( )

Stops playing the sound.

double ugdk::audio::Sample::Volume ( )

Returns the sound's volume.

Returns
The actual volume, 0.0 <= volume <= 1.0

Friends And Related Function Documentation

friend class Manager
friend

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