class MAudioGainControl |
Interface to gain control processing unit.
Gain control is used for controlling volume and gain related settings of an audio stream.
Public Member Functions | |
---|---|
TInt | GetGain ( RArray < TAudioChannelGain > &) |
TInt | GetMaxGain ( TInt &) |
TInt | GetMaxRampTime ( TTimeIntervalMicroSeconds &) |
TInt | RegisterAudioGainControlObserver ( MAudioGainControlObserver &) |
TInt | SetGain ( RArray < TAudioChannelGain > &, TUid , const TTimeIntervalMicroSeconds &) |
TInt | SetGain ( RArray < TAudioChannelGain > &) |
void | UnregisterAudioGainControlObserver ( MAudioGainControlObserver &) |
TInt | GetGain | ( | RArray < TAudioChannelGain > & | aChannels | ) | const [pure virtual] |
Returns channel specific gain settings.
RArray < TAudioChannelGain > & aChannels | On return contains current gain settings for each audio channel. |
TInt | GetMaxGain | ( | TInt & | aMaxGain | ) | const [pure virtual] |
Returns the maximum gain the device supports.
The maximum gain value depends on the setup of the stream.
this is the maximum gain value which can be passed to SetGain() .
TInt & aMaxGain | On return, contains the maximum gain value, provided that the returned error code is KErrNone. |
TInt | GetMaxRampTime | ( | TTimeIntervalMicroSeconds & | aMaxRampTime | ) | const [pure virtual] |
Returns the maximum ramp time that is supported for the associated stream.
The maximum ramp time may be different in playback and recording modes, so the value should be checked before setting the ramptime. this function also does not take into account any possible ongoing ramp.
this is the maximum ramp time value which can be passed to SetGain() .
TTimeIntervalMicroSeconds & aMaxRampTime | On return contains the maximum ramp time. The value is platform and stream setup dependent but is always greater than or equal to zero. |
TInt | RegisterAudioGainControlObserver | ( | MAudioGainControlObserver & | aObserver | ) | [pure virtual] |
Registers an observer for receiving callbacks.
MAudioGainControlObserver & aObserver | a reference to the observer to register. |
TInt | SetGain | ( | RArray < TAudioChannelGain > & | aChannels, |
TUid | aRampOperation, | |||
const TTimeIntervalMicroSeconds & | aRampDuration | |||
) | [pure virtual] |
Requests changes to the audio gain on a channel-by-channel basis.
Note that the values for each channel are independent of each other. The call is asynchronous in nature, resulting in a GainChanged() callback, and the request is only applied following a successful Commit() cycle. The callback signals the receipt of the SetGain() call from the underlying adaptation, and not (say) the completion of a ramp operation. The actual gains will only change once the associated Audio Stream becomes EActive. If the associated Audio Stream is already EActive then the change will start immediately following the next successful Commit() cycle. MMRC may choose to modify or ignore the requested gains.
RArray < TAudioChannelGain > & aChannels | Contains the channels for which the gain should be set and the gain value for those channels. |
TUid aRampOperation | How aRampDuration is to be interpreted.(see below) |
const TTimeIntervalMicroSeconds & aRampDuration | Duration in microseconds. |
TInt | SetGain | ( | RArray < TAudioChannelGain > & | aChannels | ) | [pure virtual] |
Sets the audio channel gain.
By default all channels are set to use same gain value. Note that the values for each channel are independent of each other, meaning that they only control the gain level on which the particular channel is being used and there is no limitation requiring the sum of all channels to be 100.
The gain values will be applied once the associated stream is active. if the stream is active while this function is called, then the values are applied immediately.
RArray < TAudioChannelGain > & aChannels | Contains the channels for which the gain should be set and the gain value for those channels. |
void | UnregisterAudioGainControlObserver | ( | MAudioGainControlObserver & | aObserver | ) | [pure virtual] |
Unregisters an observer.
MAudioGainControlObserver & aObserver | a reference to observer to unregister. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.