Archived:Audio Input Routing Symbian API
The Audio Input Routing API (CAudioInput) is used by audio applications to inform the Audio subsystem which audio streams it wants to record or capture.
This is an optional feature. If it is not supported on a platform, the NewL method of CAudioInput will leave with KErrNotSupported or return a NULL pointer. Even if the interface is supported, any method in the interface may leave with KErrNotSupported. It is the audio application’s responsibility to be able to handle this error when using this class.
CAudioInput requires the client to have an instance of one of the following:
The TAudioInputPreference enumeration defines the audio streams that can be selected as inputs for recording.
- EDefaultMic: Microphone associated with the currently active speaker.
- EOutputToSpeaker: Audio currently being sent to the currently active speaker.
- EFMRadio: Audio of the currently tuned FM radio station.
- EVoiceCall: Audio stream associated with the current phone call.
- ELineIn: Audio being received from the line-in (if available).
Using the CAudioInput API for routing input audio
// Create CAudioInput CAudioInput* audioInput = CAudioInput::NewL( *theRecordUtility ); // theRecordUtility is an instance of CMdaAudioRecorderUtility RArray<CAudioInput::TAudioInputPreference> inputArray; inputArray.Append( CAudioInput::EVoiceCall ); // Set Audio Input audioInput->SetAudioInputL( inputArray.Array( ) ); // now the recorder utility will be able to record the audio from voice call