I am trying to play mp3 audio from memory using CMdaAudioOutputStream according to the last sections (#5 and #6) in "S60 Platform: Music Application Developer's Guide".
The application is developed with SDK 2nd ED FP2 and tested on target platform - Nokia 6630 (8.0a 2nd ED FP2).
Audio & Video
Nokia 6630 Spec
When tested on the 6630, there is simply no output at all. The general program flow is:
iStream = CMdaAudioOutputStream::NewL(*this)
In MaoscOpenComplete(TInt aError): (aError = 0 in the log)
*32kHz Mono IS the property of the loaded MP3 audio.
In a user triggered event:
*MP3 data loading is verified. The trapped value t here is 0 in the log.
Shortly after, MaoscBufferCopied(TInt aError, const TDesC8& aBuffer) is called with aError = 0. There is no sound and MaoscPlayComplete(TInt aError) never gets called.
Is Nokia 6630 able to use SetDataTypeL() to play anything other than PCM16 data? If I remove SetDataTypeL() I DO hear garbage, as MP3 data are intepreted as PCM16.
I have also tried with CMdaAudioPlayerUtility::OpenDesL(). According to the guide mentioned earlier it requires a MIME type inserted before MP3 data. I tried inserting a standard ASCII string "audio/mpeg", "audio/mpeg\r\n\r\n", "audio/x-mp3" ... and never had any luck. Am I using the wrong format or should I use 16-bit Unicode for that?
Thanks for your help.
There are a few interesting points I discovered:
1. When using CMdaAudioPlayerUtility::OpenFileL(), the MP3 file plays fine for sure.
2. The 2nd ED FP2 SDK document NEVER mentions anything about CMdaAudioOutputStream::SetDataTypeL(), but checking with mdaaudiosampleplayer.h, it IS there.