Archived:Configuring eAAC+ decoder MMF plug-in
Configuring eAAC+ decoder MMF plug-in
All S60 3rd Edition phones have a CMMFCodec-based eAAC+ decoder, available to be used by any 3rd party without any capability requirements. This decoder is implemented as an MMF plug-in and can be used from an application or from an MMF controller.
In order to use the decoder, it needs to be configured. The configuration details are described below.
Instantiating the decoder:
codec = CMMFCodec::NewL(UID);
where the UID (of type TUid) is one of the following:
eAAC+ Decoder UID : 0x10207aa9
AAC Decoder UID: 0x101faf81
codec->ConfigureL( TUid aConfigType, const TDesC8 &aConfigData );
with parameters set as below:
aConfigType = KUidMmfCodecAudioSettings;
aConfigData is implemented as an RArray<TInt> of 11 elements:
 - Fs: Input sample frequency <required>
Sample frequency of core AAC decoder.
 Output channels <required>
eAAC+ decoder can use it as number of output channels (1 or 2)
eAAC+ decoder can duplicate mono to 2 channels, or mix-down stereo to mono.
(Note: Stated as number of input channels (historically), but for eAAC+, specifies number of output channels).
 – Profile (1 or 3) <required>
1 = AAC-LC
3 = AAC-LTP
 – Output frame size in bytes
i.e. 4096 for stereo AAC-LC of 1024 samples per frame
Note that if SBR is enabled and FOut = 2*Fs, the number of output samples is doubled and this would be 8192.
(Not really a user-configurable item, decoder may ignore this value).
 – Samples per frame (1024) <legacy>
Only 1024 supported by this decoder according to the specification.
 – Input sample frequency (same as element ) <required>
 – Not used <legacy>
 – Downsampling mode (0,1) <required>
0 – Normal mode
1 – Sets Fout = Fs in cases where Fout would be 2*Fs (SBR enabled and Fs <= 24kHz)
Decoder is specified for level 3 support of AAC+ (max output sample rate is 48kHz).
 – Sample size (16) <required>
Bits per sample
 – Fout: Output sample frequency (0, 8000, 16000, FOut <recommended>)
Invokes 3gp downsampler to 8kHz or 16kHz.
0 can be used to not invoke the 3gp 8/16 resampler tool.
Ignored for Fs >= 32kHz, when downsample mode of SBR would be required
 - Extended object type (5 or 6) ; valid if Profile = 1 <required>
5 = SBR (AAC-LC + SBR)
6 = PS (AAC-LC + SBR + PS)
After a successful call to ConfigureL(), audio data can be decoded with
codec->ProcessL( sourceBuffer, destBuffer );
The sourceBuffer MUST contain one or more full AAC/eAAC+ frames - decoding partial frames is not supported.
In S60 2nd Edition, FP3 the destBuffer must also be large enough to buffer the data (this usually means the number of input AAC frames * 2048 * number of channels).