#include <cascade/av/CascadeMP3Player.h>
Inheritance diagram for CascadeMP3Player:
Public Types | |
enum | PlaybackError { kUnknown = 0, kUnsupportedSampleRate = 1, kUnsupportedBitsPerSample = 2, kUnsupportedNumChannels = 3 } |
Public Member Functions | |
CascadeMP3Player () | |
virtual | ~CascadeMP3Player () |
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::MP3Player |
CascadeMP3Player is a class that allows easy playback of MP3 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 mp3 file in milliseconds GetDuration() gets the duration of the mp3 file in milliseconds.
|
|
determines whether or not the file is paused IsPaused() determines whether or not the mp3 file is paused.
|
|
determines whether or not the file is playing IsPlaying() determines whether or not the mp3 file is playing.
|
|
determines whether or not the file is stopped IsStopped() determines whether or not the mp3 file is stopped.
|
|
notifies the client when playback begins OnPlaybackBegin() is called in the context of the mp3 playback thread when playback has begun. |
|
notifies the client when playback ends OnPlaybackEnd() is called in the context of the mp3 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 the mp3 playback thread every second while the file is playing.
|
|
pauses playback of the mp3 file Pause() pauses playback of the mp3 file.
|
|
plays an mp3 file on a device Play() starts playback of an mp3 file.
|
|
resumes playback of a paused mp3 file ResumePlayback() resumes playback of a previously paused mp3 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 mp3 file Stop() stops playback of the mp3 file.
|
|
|