Symbian中音频API的运用
2010-07-22 01:41:00 来源:WEB开发网用法和CMdaAudioOutputStream大同小异,只不过CMdaAudioOutputStream负责将PCM数据传入底层设备的buffer进行播放,而CMdaAudioInputStream负责在录制音频的时候将底层设备的buffer中的PCM数据获取而已。
六. CMdaAudioConvertUtility
CMdaAudioConvertUtility provides features to convert audio clips between different formats. For the purposes of this description, the conversion process has been broken down into the following sections.
CMdaAudioConvertUtility not supported on S60:
platform:
S60 2nd Edition (all Feature Packs)
S60 3rd Edition (all Feature Packs)
S60 5th Edition
Description
CMdaAudioConvertUtility, which is part of Symbian’s Media Client Audio API, is not supported since S60 1st Edition (v1.2). When used on newer platforms, all variants of CMdaAudioConvertUtility::OpenL() will return KErrNotSupported error code.
Solution
Audio convert utility is no longer supported in S60. Streaming applications no longer need to convert audio to PCM format before passing it to the stream. Instead, it is possible to read or write compressed audio data directly from/to the stream, provided that a supported data type (fourCC code) is used when initialising the stream object.
For example, when using CMdaAudioInputStream to read audio data directly in AMR-NB format:
void MyStreamClass::MaiscOpenComplete(TInt aError)
{
iInputStream->SetDataTypeL(KMMFFourCCCodeAMR);
...
}
Conversion between different audio encoding types is supported only via the CMMFCodec API. Conversion can be done between encoding types if a suitable decoder/encoder combination is supported by the device. See the Device multimedia feature tables available at Forum Nokia for more information about codecs in S60 devices.
更多精彩
赞助商链接