Public Member Functions

sp::audio::OpenSLESSound Class Reference

#include <spOpenSLESSound.hpp>

Inheritance diagram for sp::audio::OpenSLESSound:
sp::audio::Sound

List of all members.

Public Member Functions

 OpenSLESSound ()
 ~OpenSLESSound ()
bool reload (const io::stringc &Filename, u8 BufferCount=DEF_SOUND_BUFFERCOUNT)
void close ()
void play (bool Looped=false)
void pause (bool Paused=true)
 Pauses (if "Paused" is true) or resumes (if "Paused" if false) the sound.
void stop ()
 Stops playing the sound.
void setSeek (f32 Seek)
f32 getSeek () const
void setVolume (f32 Volume)
void setSpeed (f32 Speed)
void setBalance (f32 Balance)
f32 getLength () const
 Returns the length of the sound (in seconds).
bool valid () const
 Returns true if the object is a valid sound. Otherwise no sound file has been loaded or could not load.
bool saveRecord (const io::stringc &Filename)
void beginRecording ()
 Begins to record a sound from an sound-input device (microphone).
void endRecording ()
 Finish the recording sound. After recording a sound it can be saved as a wave (WAV) file.

Constructor & Destructor Documentation

sp::audio::OpenSLESSound::OpenSLESSound (  ) 
sp::audio::OpenSLESSound::~OpenSLESSound (  ) 

Member Function Documentation

void sp::audio::OpenSLESSound::beginRecording (  )  [virtual]

Begins to record a sound from an sound-input device (microphone).

Reimplemented from sp::audio::Sound.

void sp::audio::OpenSLESSound::close (  )  [virtual]

Implements sp::audio::Sound.

void sp::audio::OpenSLESSound::endRecording (  )  [virtual]

Finish the recording sound. After recording a sound it can be saved as a wave (WAV) file.

Reimplemented from sp::audio::Sound.

f32 sp::audio::OpenSLESSound::getLength (  )  const [virtual]

Returns the length of the sound (in seconds).

Implements sp::audio::Sound.

f32 sp::audio::OpenSLESSound::getSeek (  )  const [virtual]

Reimplemented from sp::audio::Sound.

void sp::audio::OpenSLESSound::pause ( bool  Paused = true  )  [virtual]

Pauses (if "Paused" is true) or resumes (if "Paused" if false) the sound.

Reimplemented from sp::audio::Sound.

void sp::audio::OpenSLESSound::play ( bool  Looped = false  ) 
bool sp::audio::OpenSLESSound::reload ( const io::stringc Filename,
u8  BufferCount = DEF_SOUND_BUFFERCOUNT 
) [virtual]

Implements sp::audio::Sound.

bool sp::audio::OpenSLESSound::saveRecord ( const io::stringc Filename  )  [virtual]

Saves the record sound as a wave (WAV) file to the disk. A sound needs to be recorded using the "beginRecording" and "endRecording" before this function can be used.

Parameters:
Filename,: Filename or path where the sound file is to be saved.
Returns:
True if the sound could be saved.

Reimplemented from sp::audio::Sound.

void sp::audio::OpenSLESSound::setBalance ( f32  Balance  )  [virtual]

Sets the balance of the sound.

Parameters:
Balance,: Specifies the balance between two sound-output devices (the sound boxes). Must lie between -1.0 (left) and 1.0 (right). By default 0.0 (in the middle, both boxes have the same volume).

Reimplemented from sp::audio::Sound.

void sp::audio::OpenSLESSound::setSeek ( f32  Seek  )  [virtual]

Sets the seek or status of the sound. To use this function "play" needs not to be called.

Parameters:
Seek,: Specifies the status. Must lie between 0.0 and 1.0.

Reimplemented from sp::audio::Sound.

void sp::audio::OpenSLESSound::setSpeed ( f32  Speed  )  [virtual]

Sets the speed or frequency of the sound.

Parameters:
Speed,: Specifies the speed. Must lie between 0.0 (slow, where with 0.0 the sound stops to play and 2.0 (fast). By default 1.0 (normal). Backwards playing is not possible!

Reimplemented from sp::audio::Sound.

void sp::audio::OpenSLESSound::setVolume ( f32  Volume  )  [virtual]

Sets the volume of the sound.

Parameters:
Volume,: Specifies the volume for the sound. Must lie between 0.0 (quiet) and 1.0 (loud). By default 1.0.

Reimplemented from sp::audio::Sound.

void sp::audio::OpenSLESSound::stop (  )  [virtual]

Stops playing the sound.

Reimplemented from sp::audio::Sound.

bool sp::audio::OpenSLESSound::valid (  )  const [virtual]

Returns true if the object is a valid sound. Otherwise no sound file has been loaded or could not load.

Implements sp::audio::Sound.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines