Please help..can not play audio with CMdaAudioPlayerUtility
| Mon, 2008-05-12 14:27 | |
|
Hi All I want to play an audio file wav or mp3 with the use of CMdaAudioPlayerUtility but I don't know why it doesn't play it. and in AudioTest.h : class CAudioTest : public CBase,public MMdaAudioPlayerCallback . private: TState iState; and in AudioTest.cpp: void CAudioTest::Play() and for implementation of metthods of MMdaAudioPlayerCallback I wrote like this: void CAudioTest::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/) void CAudioTest::MapcPlayComplete(TInt aError) the program runs without error but it doesnt play the audio file,and I realizad that I can not enter to if statement in function CAudioTest::Play() and the reason is because CAudioTest::MapcInitComplete(..) is not called,but I have read that it is called automatically,please help me to know that. |
|






Forum posts: 587
Care to show how you actually select the file to be played etc.? Have you checked out any of the examples of using CMdaAudioPlayerUtility?
Forum posts: 3
void CAudioTest::ConstructL()
{
iMdaPlayer = CMdaAudioPlayerUtility::NewFilePlayerL(KFilename, *this);
}
that KFilename is _LIT(KFilename,"C:\\Documents and Settings\\audio.wav"); for example
but I have not checked out any example of CMdaAudioPlayerUtility ,I found one (sound1 )in this site but it is gui and I don't undersatnd the gui application structure..
Forum posts: 587
And does NewFilePlayerL succeed or not? Does it leave? I guess that with the path you showed as an example it will - the windows paths are not usable in the emulator. The emulator emulates the C: drive in [your-sdk-installation-path]\epoc32\winscw\c. So if you try to open a file in your Symbian application from c:\MyFile.txt, in the PC that is actually in my case, for example, located in: F:\Symbian\9.2\S60_3rd_FP1_2\Epoc32\winscw\c\MyFile.txt.
Forum posts: 3
Thanks Andreas for the reply.
Forum posts: 34
hi,
you go through the SDK documentation you will find the answer.
ravinder singh rawat