#include <cascade/av/CascadeWAVPlayer.h>
Inheritance diagram for CascadeWAVPlayer:
Public Types | |
enum | PlaybackError { kUnknown = 0, kUnsupportedSampleRate = 1, kUnsupportedBitsPerSample = 2, kUnsupportedNumChannels = 3 } |
Public Member Functions | |
CascadeWAVPlayer () | |
virtual | ~CascadeWAVPlayer () |
virtual bool | Play (CascadeFile &file, CascadeAudioPlaybackDevice &device) |
virtual bool | Stop () |
virtual bool | Pause () |
virtual bool | ResumePlayback () |
virtual bool | SetVolume (u16 nVolume) |
virtual bool | IsPlaying () |
virtual bool | IsStopped () |
virtual bool | IsPaused () |
virtual u32 | GetDuration () |
Protected Member Functions | |
virtual void | OnPlaybackBegin () |
virtual void | OnPlaybackEnd () |
virtual void | OnSecondTick (u32 nSecond) |
virtual void | OnPlaybackError (PlaybackError error, u32 nErrorData) |
Friends | |
class | CascadePrivate::WAVPlayer |
CascadeWAVPlayer is a class that allows easy playback of WAV and AIFF files
|
represents a type of playback error PlaybackError represents the types of playback errors that can occur. A variable of this type is provided to the virtual function OnPlaybackError to indicate the error that occurred during playback.
|
|
the default constructor - lightweight This default constructor is lightweight. |
|
destructor The destructor. |
|
gets the duration of the wav or aiff file in milliseconds GetDuration() gets the duration of the wav or aiff file in milliseconds.
|
|
determines whether or not the file is paused IsPaused() determines whether or not the wav or aiff file is paused.
|
|
determines whether or not the file is playing IsPlaying() determines whether or not the wav or aiff file is playing.
|
|
determines whether or not the file is stopped IsStopped() determines whether or not the wav or aiff file is stopped.
|
|
notifies the client when playback begins OnPlaybackBegin() is called in the context of a private playback thread when playback has begun. |
|
notifies the client when playback ends OnPlaybackEnd() is called in the context of a private playback thread when playback has ended. |
|
notifies the client of an error that occurs during playback
OnPlaybackError() is called in the context of a private playback thread whenever a playback error occurs. The playback error is indicated by the parameter
|
|
notifies the client every second during playback OnSecondTick() is called in the context of a private playback thread every second while the file is playing.
|
|
pauses playback of the wav or aiff file Pause() pauses playback of the wav or aiff file.
|
|
plays a wav or aiff file on a device Play() starts playback of a wav or aiff file.
|
|
resumes playback of a paused wav or aiff file ResumePlayback() resumes playback of a previously paused wav or aiff file.
|
|
sets the playback volume SetVolume() sets the output volume of audio playback. Legal values for nVolume are 0 - 0xFFFF which is a linear range of volume where 0 is no volume and 0xFFFF is full volume.
|
|
stops playback of the wav or aiff file Stop() stops playback of the wav or aiff file.
|
|
|