Symbian
Symbian OS Library

FAQ-1070 How do I stream audio data that is not PCM16 on Symbian OS?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: Multimedia
Created: 06/03/2004 Modified: 06/16/2004
Number: FAQ-1070
Platform: Symbian OS v8.0

Question:
I have heard that in Symbian OS v8.0 onward it is possible to stream non-PCM16 audio types using the CMdaAudioOutputStream and CMdaAudioInputStream utilities. How do I do this?

Answer:
The streaming utilities on Symbian OS v8.0 onward can be set up to stream non-PCM16 data using the following APIs:

EXPORT_C void CMdaAudioOutputStream::SetDataTypeL(TFourCC aAudioType)
EXPORT_C void CMdaAudioInputStream::SetDataTypeL(TFourCC aAudioType)

The audio encoding format is set before writing any data to the stream and is passed as a TFourCC parameter [defined in MMFFourCC.h].

Conversely the current audio type that is being streamed can be determined using the following APIs:

EXPORT_C TFourCC CMdaAudioOutputStream::DataType() const
EXPORT_C TFourCC CMdaAudioInputStream::DataType() const

It should be noted that in order to stream types other than PCM16 an MDF plugin is required in the DevSound of the device on which you are streaming that supports the specified format. If there is no suitable H/W MDF plugin that can support this type on the device, then the streaming will fail with KErrNotSupported.