Hello everyone,
I have a problem that will probably be trivial to someone with more knowledge about Symbian.
I need to play an audio stream. I do it like this:
in .cpp (I'm omitting if (err ==...))Code:in .h CMdaAudioOutputStream* iAudioStream;
I don't have a problem playing audio if I open a file. But I need to generate audio data on the fly. My problem lies with iAudioStream->WriteL(buffer) because buffer in iAudioStream->WriteL must be RBuf8 and the data that I need to play is located in TFixedArray<TInt16, 512> buffer.Code:TRAP(err, iAudioStream->SetDataTypeL(KMMFFourCCCodePCM16)); TRAP(err, iAudioStream->SetAudioPropertiesL(TMdaAudioDataSettings::ESampleRate11025Hz, TMdaAudioDataSettings::EChannelsMono)); TRAP(err, iAudioStream->WriteL(buffer));
Could someone please tell me how to go about transfering data from the fixed array to audio stram's RBuf8 buffer?

Reply With Quote

