Archived:SetDecoderMode() not required with AMR codec on S60 3rd Edition (Known Issue)
Article Metadata
Compatibility
Article
Overview
When trying to set the decoder mode for AMR codec using APS v2.4.1, KErrNotSupported error is returned.
Description
Audio Proxy Server supports controlling the AMR bitrate since version 2.4.1.
According to the APS documentation, the following functions are used for configuring the codec:
TInt RAPSSession::SetDecoderMode(TAPSCodecMode aMode); TInt RAPSSession::SetEncoderMode(TAPSCodecMode aMode);
However, SetDecoderMode always returns KErrNotSupported when the player stream has been initialized with the AMR codec.
Solution
Usage and valid parameters (TAPSCodecMode enumeration) depend on the codec that was used when initializing the player and/or recorder.
The following parameters are valid for SetEncoderMode when the recorder is initialized:
| Codec | Valid parameters (TAPSCodecMode) | Notes |
| G.729 | N/A | Always returns KErrNotSupported |
| G.711 | EALawOr20ms, EULawOr30ms | A-Law or µ-Law |
| iLBC | EALawOr20ms, EULawOr30ms | 20ms or 30ms frame size |
| AMR | EAMRNB4750bps .. EAMRNB12200bps | AMR mode 0 (4.75 kbps) .. 7 (12.2 kbps) |
The following parameters are valid for SetDecoderMode when the player is initialized:
| Codec | Valid parameters (TAPSCodecMode) | Notes |
| G.729 | N/A | Always returns KErrNotSupported |
| G.711 | EALawOr20ms, EULawOr30ms | A-Law or µ-Law |
| iLBC | EALawOr20ms, EULawOr30ms | 20ms or 30ms frame size |
| AMR | N/A | Does nothing (KErrNotSupported) |
Note that SetDecoderMode mode always returns KErrNotSupported for AMR. This error can be ignored, because unlike G.711 and iLBC decoders, AMR decoder doesn't need to be configured for a specific bitrate.


(no comments yet)