I am trying to play a .wav audio file using the CMdaAudioPlayerUtility. I am following the example/snippet in book "Programming for the Series 60 PLatform" i.e. I have a class
CHSAudioPlayer that implements MMdaAudioPlayerCallback. The constructor looks like this:
CHSAudioPlayer::CHSAudioPlayer(const TDesC& audioFileName)
aInitStatus = KErrNotReady;
//aInitStatus = KErrNone;
iPlayer = CMdaAudioPlayerUtility::NewFilePlayerL( audioFileName, *this );
I also have the MapcInitComplete and MapcPlayComplete methods implemented.
In my AppUI I am trying to do something like this:
CHSAudioPlayer* aAuPlayer = new CHSAudioPlayer(answer);
But I end up getting a System Error soon as the new CHSAudioPlayer(answer); is called. It never hits the MapcInitComplete method with an error code. Seems like I am doing something fundamentally wrong and so I dont even hit the MapcInitComplete method. I am not sure if :
(a) the file path is wrong
(b) the way I am implementing this is wrong
(c) the file format is wrong (I've tried .au and .wav files (I've even tried recording my own .wav audio clips in 8 bit PCM, 8 bit A-Law and 8 bit IMA ADPCM formats but I get the same result)
(d) something else is being overlooked
I have already researched this forum for this subject and have not been able to find a previous answer.
I've downloaded the Audio Streaming Plugin and copied the files per the Readme file's instructions but that hasn't helped either.
I'd really appreciate any help/input in this regard. Thanks in advance.