I am trying to develop a cleint/server application, using bluetooth.
And the server (computer) sends some audio data to the client (nokia 7650).
I can receive the audio data successfully, I checked the size and so on...
But impossible to play the audio data, it crashes in the MapcInitComplete function with the KErrNotSupported error (-5).
I thought it could be the format of the audio data (WAV and AMR), but if I load the file with the application and open the file (NewFilePlayerL()), it plays my audio sample well.
So I am out of ideas now, and I need your help ;)
Here some of my code from my AppUI.cpp, when it receives some data from the server :
iDes = new(ELeave) TBuf8<10000>;
//buffer contains the data I received from the server via bluetooth
for (TInt i=0;i<buffer.Length();i++)
iPlayerAdapter = CPlayerAdapter::NewL(*iDes, *this);
And here is the implementation of playeradapter.cpp:
void CPlayerAdapter::ConstructL(TDes8& aDes
iMdaAudioPlayerUtility = CMdaAudioPlayerUtility::NewDesPlayerL(aDes, *this);
void CPlayerAdapter::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/)
iState = aError ? ENotReady : EReadyToPlay;
//I display the message error here : KErrNotSupported -5
What is wrong in my code? Do i need some flush or something like that?
Thanks in advance!