|
Nokia N97 SDK Example Applications Guide |
#include <CCESoundPlayer.h>
Inheritance diagram for CCESoundPlayer:

Definition at line 32 of file CCESoundPlayer.h.
Public Member Functions |
|
| virtual | ~CCESoundPlayer () |
| void | StartPlaybackL (const TDesC &aFileName) |
| void | StopPlayback () |
| TCEPlayerState | PlayerState () |
Static Public Member Functions |
|
| static CCESoundPlayer * | NewL () |
| static CCESoundPlayer * | NewLC () |
Protected Member Functions |
|
| void | MapcInitComplete (TInt aError, const TTimeIntervalMicroSeconds &aDuration) |
| void | MapcPlayComplete (TInt aError) |
Private Member Functions |
|
| CCESoundPlayer () | |
| void | ConstructL () |
Private Attributes |
|
| CMdaAudioPlayerUtility * | iMdaAudioPlayerUtility |
| TCEPlayerState | iPlayerState |
| CActiveSchedulerWait | iWait |
|
|
Destructor. Definition at line 71 of file CCESoundPlayer.cpp. References iPlayerState, and StopPlayback(). 00072 { 00073 if( iPlayerState == ECEPlaying ) 00074 { 00075 StopPlayback(); 00076 } 00077 00078 delete iMdaAudioPlayerUtility; 00079 }
|
|
|
C++ default constructor. Definition at line 30 of file CCESoundPlayer.cpp.
|
|
|
Creates and returns a new instance of this class.
Definition at line 50 of file CCESoundPlayer.cpp. References NewLC(). Referenced by CCEMusicView::ConstructL(). 00051 { 00052 CCESoundPlayer* self = CCESoundPlayer::NewLC(); 00053 CleanupStack::Pop( self ); 00054 return self; 00055 }
|
|
|
Creates and returns a new instance of this class. The returned object is left on the cleanup stack.
Definition at line 62 of file CCESoundPlayer.cpp. References ConstructL(). Referenced by NewL(). 00063 { 00064 CCESoundPlayer* self = new (ELeave) CCESoundPlayer; 00065 CleanupStack::PushL( self ); 00066 self->ConstructL(); 00067 return self; 00068 }
|
|
|
Symbian 2nd phase constructor. Definition at line 39 of file CCESoundPlayer.cpp. References iMdaAudioPlayerUtility. Referenced by NewLC(). 00040 { 00041 // Create a player utility 00042 iMdaAudioPlayerUtility = CMdaAudioPlayerUtility::NewL( *this ); 00043 }
|
|
||||||||||||
|
From MMdaAudioPlayerCallback. Defines client behaviour when opening and initialization of an audio sample has completed. Definition at line 87 of file CCESoundPlayer.cpp. References iMdaAudioPlayerUtility, and iPlayerState. 00090 { 00091 iPlayerState = aError ? ECENotReady : ECEReadyToPlay; 00092 00093 // Start the playback, if audio file initialization was successful 00094 if ( iPlayerState == ECEReadyToPlay ) 00095 { 00096 iMdaAudioPlayerUtility->Play(); 00097 iPlayerState = ECEPlaying; 00098 } 00099 }
|
|
|
From MMdaAudioPlayerCallback. Defines client behaviour when playback of an audio sample has completed. Definition at line 106 of file CCESoundPlayer.cpp. References iPlayerState. 00107 { 00108 iPlayerState = aError ? ECENotReady : ECEReadyToPlay; 00109 }
|
|
|
Open music file and start music playback.
Definition at line 116 of file CCESoundPlayer.cpp. References iMdaAudioPlayerUtility. 00117 { 00118 // Open the sound file 00119 iMdaAudioPlayerUtility->OpenFileL( aFileName ); 00120 }
|
|
|
Stop music playback. Definition at line 127 of file CCESoundPlayer.cpp. References iMdaAudioPlayerUtility, and iPlayerState. Referenced by ~CCESoundPlayer(). 00128 { 00129 // Stop audio playback and close the audio file 00130 if( iMdaAudioPlayerUtility && iPlayerState == ECEPlaying ) 00131 { 00132 iMdaAudioPlayerUtility->Stop(); 00133 iMdaAudioPlayerUtility->Close(); 00134 iPlayerState = ECENotReady; 00135 } 00136 }
|
|
|
Get the state of the audio player.
Definition at line 143 of file CCESoundPlayer.cpp. References iPlayerState. Referenced by CCEMusicView::DynInitMenuPaneL(), and CCEMusicView::HandleCommandL(). 00144 { 00145 return iPlayerState; 00146 }
|
|
© Nokia 2009 |