epoc32/include/mmf/server/devsoundstandardcustominterfaces.h
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/mmf/server/devsoundstandardcustominterfaces.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,1711 @@
     1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __DEVSOUNDSTANDARDCUSTOMINTERFACES_H__
    1.20 +#define __DEVSOUNDSTANDARDCUSTOMINTERFACES_H__
    1.21 +
    1.22 +#include <e32std.h>
    1.23 +
    1.24 +/*****************************************************************************/
    1.25 +/**
    1.26 +UID associated with the custom interface MMMFDevSoundCustomInterfaceBitRate.
    1.27 +@publishedAll
    1.28 +@released
    1.29 +*/
    1.30 +const TUid KUidCustomInterfaceDevSoundBitRate = {0x101F7DD5};
    1.31 +
    1.32 +
    1.33 +
    1.34 +/**
    1.35 +This class provides an interface to set and retrive the DevSound bit rate.
    1.36 +
    1.37 +@publishedAll
    1.38 +@released
    1.39 +*/
    1.40 +class MMMFDevSoundCustomInterfaceBitRate
    1.41 +	{	
    1.42 +public:
    1.43 +	
    1.44 +	/**
    1.45 +	Gets the bit rates that are supported by DevSound in its current configuration.
    1.46 +
    1.47 +	@param  aSupportedBitRates
    1.48 +	The supported bit rates, in bits per second, shall be appended to this array. Note that 
    1.49 +	the array shall be reset by this method.
    1.50 +	*/
    1.51 +	virtual void GetSupportedBitRatesL(RArray<TInt>& aSupportedBitRates) = 0;
    1.52 +
    1.53 +	/**
    1.54 +	Returns	the current bit rate.
    1.55 +
    1.56 +	@return	The current bit rate, in bits per second.
    1.57 +	*/
    1.58 +	virtual TInt BitRateL() = 0;
    1.59 +
    1.60 +	/**
    1.61 +	Sets the bit rate to a new value.
    1.62 +
    1.63 +	@param  aBitRate
    1.64 +	The new bit rate, in bits per second.
    1.65 +	*/
    1.66 +	virtual void SetBitRateL(TInt aBitRate) = 0;
    1.67 +	};
    1.68 +
    1.69 +
    1.70 +/*****************************************************************************/
    1.71 +/**
    1.72 +UID associated with the Custom interface MMMFDevSoundCustomInterfaceFileBlockLength.
    1.73 +
    1.74 +@publishedPartner
    1.75 +@prototype
    1.76 +
    1.77 +*/
    1.78 +const TUid KUidCustomInterfaceDevSoundFileBlockLength = {0x10273806};
    1.79 +
    1.80 +/**
    1.81 +Custom interface class for setting the file's block length on the hwdevice. 
    1.82 +
    1.83 +Note also that this interface is just a simple interface to 
    1.84 +set file's block length. No checking is perfomed on the values sent (hence the
    1.85 +Set methods do not return an error code).
    1.86 +
    1.87 +@publishedPartner
    1.88 +@prototype
    1.89 +*/
    1.90 +class MMMFDevSoundCustomInterfaceFileBlockLength
    1.91 +	{
    1.92 +public:
    1.93 +	/**
    1.94 +	Sets the file's block length on the hwdevice
    1.95 +	@param aBlockAlign
    1.96 +	       The file's block length 
    1.97 +	*/
    1.98 +	virtual void SetFileBlockLength(TUint aBlockAlign)=0;
    1.99 +	};
   1.100 +
   1.101 +/*****************************************************************************/
   1.102 +/**
   1.103 +UID associated with the Custom interface MMMFGsmConfig
   1.104 +
   1.105 +@publishedPartner
   1.106 +@prototype
   1.107 +*/
   1.108 +const TUid KUidGsmConfig = {0x102825FC};
   1.109 +
   1.110 +/**
   1.111 +This class provides an interface to set and retrive the GSM conversion format.
   1.112 +
   1.113 +@publishedPartner
   1.114 +@prototype
   1.115 +*/
   1.116 +class MMMFGsmConfig
   1.117 +	{
   1.118 +public: 
   1.119 +	/** The GSM conversion format */
   1.120 +	enum TMMFGsmConversionFormat
   1.121 +		{
   1.122 +		/** no conversion specified */
   1.123 +		ENone, 
   1.124 +		/** for use in Full rate (06.10) and half rate (GSM 06.20 Half Rate (HR)) Vocoder */
   1.125 +		EALaw8bit, 
   1.126 +		/** for use in Full rate (06.10) and half rate (GSM 06.20 Half Rate (HR)) Vocoder */
   1.127 +		EULaw8bit,
   1.128 +		/** for use in GSM 06.60 Enhanced Full Rate (EFR) Vocoder.*/
   1.129 +		EAlawPCM
   1.130 +		};
   1.131 +		
   1.132 +	/**
   1.133 +	Set the conversion format using the TMMFGsmConversionFormat enum.
   1.134 +	This conversion must be set before the coder/decoder is started.
   1.135 +
   1.136 +	@param aConvFormat - format desired.  For encoding behaviour, format will 
   1.137 +	be the input format and for decoding behaviour format will be the output 
   1.138 +	format.
   1.139 +
   1.140 +	@return KErrNone - Format change supported, KErrNotSupported - Format 
   1.141 +	change not supported, KErrInUse - Format change attempted whilst decoding.
   1.142 +	*/	
   1.143 +	virtual TInt SetConversionFormat(TMMFGsmConversionFormat aConvFormat) = 0;
   1.144 +
   1.145 +	/** 
   1.146 +	Provides the current conversion format.  Can be called at any time.
   1.147 +
   1.148 +	@param aConvFormat - after the call contains the current format.
   1.149 +	For encoding behaviour, format will be the input format and for decoding
   1.150 +	behaviour format will be the output format.
   1.151 +
   1.152 +	@return KErrNone if value returned successfully, 
   1.153 +			KErrUnknown if value has not been successfully configured using
   1.154 +			SetConversionFormat() at least once for the current instance of the
   1.155 +			interface and there is no default value.
   1.156 +			KErrGeneral for all other error scenario.
   1.157 +	*/
   1.158 +	virtual TInt ConversionFormat(TMMFGsmConversionFormat& aConvFormat) const = 0;
   1.159 +	};
   1.160 +
   1.161 +
   1.162 +/*****************************************************************************/
   1.163 +/**
   1.164 +UID associated with the Custom interface MSpeechEncoderConfig
   1.165 +
   1.166 +@publishedPartner
   1.167 +@prototype
   1.168 +*/
   1.169 +const TUid KUidSpeechEncoderConfig = {0x102825FB};
   1.170 +
   1.171 +/**
   1.172 +This class provides an interface to those CMMFHwDevices providing speech encoding. 
   1.173 +This interface is used for querying and configuring the operational modes of speech 
   1.174 +encoders as supported by those specific encoders. 
   1.175 +If a speech encoder does not support a mode provided by the interface, it will return KErrNotSupported.
   1.176 +
   1.177 +@publishedPartner
   1.178 +@prototype
   1.179 +
   1.180 +*/
   1.181 +class MSpeechEncoderConfig 
   1.182 +	{
   1.183 +public:
   1.184 +	/**
   1.185 +	Controls voice activity detection (VAD) mode.
   1.186 +	This method can be called at all times - while actively encoding or not.
   1.187 +	It should be noted that a VAD mode change could also instigate a change in the 
   1.188 +	mode of encoding (fixed rate encoding versus variable rate) e.g. in cases where 
   1.189 +	VAD requires variable rate encoding.
   1.190 +	The effects of activating VAD mode behaviour should be documented in the 
   1.191 +	CMMFHwDevice specification implementing it.
   1.192 +
   1.193 +	@param aVadModeOn ETrue=On, EFalse=Off
   1.194 +	@return KErrNone if successful. KErrNotSupported if this method is not implemented 
   1.195 +	or not supported by the encoder. 
   1.196 +	*/
   1.197 +	virtual TInt SetVadMode(TBool aVadModeOn) = 0;
   1.198 +
   1.199 +	/**
   1.200 +	Gets the current state of the voice activity detection (VAD) mode.
   1.201 +	This method can be called at all times - while actively encoding or not.
   1.202 +
   1.203 +	@param aVadModeOn On output ETrue = On, EFalse = Off
   1.204 +	@return KErrNone if successful, KErrNotSupported if this method is not implemented 
   1.205 +	or not supported by the encoder. 
   1.206 +	*/
   1.207 +	virtual TInt GetVadMode(TBool& aVadModeOn) = 0;
   1.208 +	};
   1.209 +
   1.210 +/*****************************************************************************/
   1.211 +/**
   1.212 +UID associated with the Custom interface MAacDecoderConfig
   1.213 +
   1.214 +@publishedPartner
   1.215 +@prototype
   1.216 +*/
   1.217 +const TUid KUidAacDecoderConfig = {0x102825FD};
   1.218 +
   1.219 +/**
   1.220 +This class provides an interface to the AAC decoder CMMFHwDevice in order 
   1.221 +to provide additional configuration information for decoding raw AAC data blocks. 
   1.222 +
   1.223 +The sample rate can be configured via the CMMFHwDevice::SetConfig() method. 
   1.224 +An extension mechanism will be provided for further functionality as required.
   1.225 +The CMMFHwDevice does not contain Output channel configuration at time of writing. 
   1.226 +The HWA decoders to date have been hardcoded for 2ch (left / right) output. 
   1.227 +Additional configuration information may be provided by using extension mechanisms. 
   1.228 +
   1.229 +@publishedPartner
   1.230 +@prototype
   1.231 +*/
   1.232 +class MAacDecoderConfig 
   1.233 +	{
   1.234 +public: 
   1.235 +
   1.236 +	/**
   1.237 +	This is a class containing an enumerated type that defines the audio object types 
   1.238 +	required for configuring the AAC decoder for decoding raw AACDefined within TAudioConfig.
   1.239 +	*/
   1.240 +	class TAudioConfig
   1.241 +		{
   1.242 +	public:
   1.243 +		/**  The audio object type */
   1.244 +	    enum TAudioObjectType
   1.245 +	    	{
   1.246 +			/** Null */
   1.247 +	       	ENull    = 0,
   1.248 +			/** AacMain */
   1.249 +	       	EAacMain = 1,
   1.250 +			/** AacLc */
   1.251 +	       	EAacLc   = 2,
   1.252 +			/** AacSsr */
   1.253 +	       	EAacSsr  = 3,
   1.254 +			/** AacLtp */
   1.255 +	       	EAacLtp  = 4,
   1.256 +			/** Sbr */
   1.257 +	       	ESbr     = 5
   1.258 +	       	};
   1.259 +		TAudioObjectType iAudioObjectType;
   1.260 +		};	
   1.261 +
   1.262 +public:
   1.263 +	/**
   1.264 +	Sets additional configuration parameters required for decoding raw AAC. 
   1.265 +
   1.266 +	This method can be called when encoding is not active - anytime before the CMMFHwDevice is started. 
   1.267 +	
   1.268 +	For consistent configuration, this method should be called sometime before each 
   1.269 +	start is called on the CMMFHwDevice when decoding raw AAC. That is to say the 
   1.270 +	CMMFHwDevice is not required to retain prior configuration information, detect raw 
   1.271 +	AAC sent to it, and reconfigure the decoder with this saved information after stop 
   1.272 +	is called on the CMMFHwDevice. However, calling pause on the CMMFHwDevice implies 
   1.273 +	that the next start call will be resuming same content. For this condition, this API 
   1.274 +	is not required when restarting the CMMFHwDevice.
   1.275 +	
   1.276 +	@param aAudioConfig The structure containing the additional information required for decoding the raw AAC.
   1.277 +
   1.278 +	@return KErrNone if successful or KErrInUse if this method is used when decoding is active. 
   1.279 +	*/
   1.280 +	virtual TInt SetAudioConfig(TAudioConfig& aAudioConfig) = 0;
   1.281 +
   1.282 +	/**
   1.283 +	Gets additional configuration parameters supported for decoding raw AAC. 
   1.284 +	
   1.285 +	This method is allowable when encoding is not active - anytime before the CMMFHwDevice is started. 
   1.286 +		
   1.287 +	@param aSupportedAudioConfigs An array of structures containing the additional supported configurations.
   1.288 +
   1.289 +	@return KErrNone if successful. 
   1.290 +			KErrInUse if this method is used when decoding is active. 
   1.291 +	*/
   1.292 +	virtual TInt GetSupportedAudioConfigs(RArray<TAudioConfig>& aSupportedAudioConfigs) = 0;
   1.293 +	};
   1.294 +	
   1.295 +/*****************************************************************************/
   1.296 +/**
   1.297 +UID associated with the Custom interface MEAacPlusDecoderIntfc
   1.298 +
   1.299 +@publishedPartner
   1.300 +@prototype
   1.301 +*/
   1.302 +const TUid KUidEAacPlusDecoderIntfc = {0x102825FF};
   1.303 +
   1.304 +/**
   1.305 +This class provides an interface to the eAAC+ decoder hwdevice in order to provide configuration information.
   1.306 +
   1.307 +The Get.. methods can be used to retrieve the last successfully applied configuration parameters.  
   1.308 +A message is not sent to adaptation or the decoder. Instead, a locally saved set of the 
   1.309 +parameters will be updated upon successful use of ApplyConfig(). It is these saved values that 
   1.310 +the proxy maintains that will be returned to the user. For instance, if two interfaces are used 
   1.311 +and one interface is used to modify the settings, the other interface's Get… methods would not 
   1.312 +return those settings.  The Get.. methods will return an error if a successful use of ApplyConfig() 
   1.313 +has not been performed.
   1.314 +
   1.315 +The Set.. methods are used to update a configuration structure within the implementation of the 
   1.316 +interface. When the interface is instantiated, the state of SBR and Downsampled modes will be 
   1.317 +disabled. Therefore it is not necessary to configure these parameters before using 
   1.318 +ApplyConfig() the first time. However, once modified using this instance of the interface, they 
   1.319 +remain in that state until Set.. again.  The values of these items are updated in an internal 
   1.320 +structure when each Set.. is called. 
   1.321 +
   1.322 +The ApplyConfig() method is used to configure the encoder with the parameters specified by 
   1.323 +the Set.. methods. ApplyConfig will send back an error (KErrUnknown) if not all items are 
   1.324 +Set at least once. This check and the parameter values returned will be implemented in the interface proxy 
   1.325 +and will not query the actual decoder. The exception to this is for configuration parameters with defined 
   1.326 +default values (see next paragraph). 
   1.327 +
   1.328 +Calling ApplyConfig() will send these values using a single message to the message handler.
   1.329 +ApplyConfig() should fail if it is used during decoding with a KErrInUse (or, as previously stated, 
   1.330 +KErrUnknown if a value without a default is not set). Since the interface proxy is not aware of decoding state, 
   1.331 +this check would have to be done in the adaptation implementation for this interface.
   1.332 +
   1.333 +@publishedPartner
   1.334 +@prototype
   1.335 +*/
   1.336 +class MEAacPlusDecoderIntfc 
   1.337 +	{
   1.338 +public:
   1.339 +	/**
   1.340 +	Defines additional configuration elements required to decode eAAC+.
   1.341 +	*/
   1.342 +	enum TAudioObjectType
   1.343 +        {
   1.344 +        /** Null */
   1.345 +        ENull    = 0,
   1.346 +        /** AacLc */
   1.347 +        EAacLc   = 2,
   1.348 +        /** AacLtp */
   1.349 +        EAacLtp  = 4
   1.350 +        };
   1.351 +
   1.352 +	/**
   1.353 +	Sets the value of the sampling frequency of the decoder to be configured by the ApplyConfig() 
   1.354 +	method. This is the sample rate of the core decoder, not the output sampling frequency of the decoder.
   1.355 +	This method can be called at all times but if ApplyConfig() is subsequently called 
   1.356 +	after changing this value whilst decoding, a KErrInUse error will result.
   1.357 +
   1.358 +	@param aInputSamplingFrequency  value of the sampling frequency. 
   1.359 +	*/
   1.360 +	virtual void SetInputSamplingFrequency(TUint aInputSamplingFrequency) = 0;
   1.361 +
   1.362 +	/**
   1.363 +	Sets the object type of the core decoder to be configured by the ApplyConfig() method.
   1.364 +
   1.365 +	This method can be called at all times but if ApplyConfig() is subsequently called after 
   1.366 +	changing this value whilst decoding, a KErrInUse error will result.
   1.367 +
   1.368 +	@param  aAudioObjectType TAudioObjectType for core decoder as supported by the decoder.
   1.369 +	*/
   1.370 +	virtual void SetAudioObjectType(TAudioObjectType aAudioObjectType) = 0;
   1.371 +	
   1.372 +	/**
   1.373 +	Sets the number of channels for the output of the decoder to be configured by the ApplyConfig() 
   1.374 +	method. The use of this method is to ensure coordination of output channels rendered by the decoder 
   1.375 +	and channel configuration of the audio system. This method does not imply that stereo to mono downmix 
   1.376 +	is supported by the decoder. The main purpose is for the case considering the presence of PS. A user 
   1.377 +	may not know if the decoder output will be mono or stereo based on header information alone, but may 
   1.378 +	configure the decoder for two channel output to match the audio system configuration. If the user were 
   1.379 +	to set the output to 1 channel and stereo data is present, the decoder may choose only one channel to 
   1.380 +	output or to downmix the stereo to mono. Regarding this interface, it would be more desirable to configure 
   1.381 +	the decoder when it is known to be mono source data and rely on downmix from the audio system instead of 
   1.382 +	from the decoder. The decoder, however, would provide for duplicating mono data into 2 channel data when 
   1.383 +	configured for 2 channels and the source data contains only 1 channel.
   1.384 +	This method is allowable at all times - while actively encoding or not, but using ApplyConfig() 
   1.385 +	if changing this value while encoding will return an error.
   1.386 +		 
   1.387 +	@param aNumOfChannels 1 - output one channel audio  = 0; 2 - output two channel audio.
   1.388 +	 */
   1.389 +	virtual void SetNumOfChannels(TUint aNumOfChannels) = 0;
   1.390 +	
   1.391 +	/**
   1.392 +	Controls the SBR mode of the decoder to be configured by the ApplyConfig() method. 
   1.393 +
   1.394 +	If SBR is enabled and no SBR data is present, the audio data will be upsampled, 
   1.395 +	unless Down Sampled mode is enabled.
   1.396 +
   1.397 +	This method can be called at all times but if ApplyConfig() is subsequently called 
   1.398 +	after changing this value whilst decoding, a KErrInUse error will result.
   1.399 +
   1.400 +	@param aSbrEnabled ETrue - SBR mode enabled, EFalse - SBR mode disabled 
   1.401 +	*/
   1.402 +	virtual void SetSbr(TBool aSbrEnabled) = 0;
   1.403 +
   1.404 +	/**
   1.405 +	Controls the downsampled mode of the decoder to be configured by the ApplyConfig() method. This setting is only meaningful if SBR is enabled.
   1.406 +
   1.407 +	This method can be called at all times but if ApplyConfig() is subsequently called after 
   1.408 +	changing this value whilst decoding, a KErrInUse error will result.
   1.409 +		 
   1.410 +	@param aDsmEnabled ETrue - downsampled mode enabled, EFalse - downsampled mode disabled.
   1.411 +	*/
   1.412 +	virtual void SetDownSampledMode(TBool aDsmEnabled) = 0;
   1.413 +
   1.414 +	/**
   1.415 +	Used to configure the decoder with parameters passed in the Set methods.
   1.416 +
   1.417 +	This method can be called all times but will return an KErrInUse if the configuration 
   1.418 +	parameters would change while decoding (as none of the set parameters can be changed 
   1.419 +	during decoding). This checking operational state of the decoder would be done by the 
   1.420 +	adaptation implementation of this interface since the interface proxy is not aware of 
   1.421 +	the decoder state. The adaptation implementation will return an error if incorrect values 
   1.422 +	are used to configure the decoder.
   1.423 +
   1.424 +	@return KErrNone if successful, KErrNotSupported if this method is not implemented, 
   1.425 +			KErrInUse if encoding in active and values are changed that are not allowed to be 
   1.426 +			changed during encoding, KErrArgument if one of the configuration items is not appropriate or not set. 
   1.427 +	*/
   1.428 +	virtual TInt ApplyConfig() = 0;
   1.429 +
   1.430 +	/**
   1.431 +	Returns the value of the sampling frequency of the decoder that was last successfully 
   1.432 +	configured by the ApplyConfig() method.
   1.433 +	
   1.434 +	This method can be called at all times but must be called after a value has been set via 
   1.435 +	the ApplyConfig
   1.436 +
   1.437 +	@param aInputSamplingFrequency last setting successfully applied using ApplyConfig().
   1.438 +
   1.439 +	@return KErrNone if value returned successfully, 
   1.440 +			KErrUnknown if value has not been successfully configured using ApplyConfig() at 
   1.441 +			least once for the current instance of the interface or 
   1.442 +			KErrInUse if the encoder is active.
   1.443 +	*/
   1.444 +	virtual TInt GetInputSamplingFrequency(TUint& aInputSamplingFrequency) = 0;
   1.445 +	
   1.446 +	/**
   1.447 +	Returns the object type of the core decoder that was last successfully configured by the 
   1.448 +	ApplyConfig() method.
   1.449 +	
   1.450 +	This method can be called at all times. 
   1.451 +		 
   1.452 +	@param aAudioObjectType last setting successfully applied using ApplyConfig().
   1.453 +
   1.454 +	@return KErrNone if value returned successfully, 
   1.455 +			KErrUnknown if value has not been successfully configured using ApplyConfig() 
   1.456 +			at least once for the current instance of the interface.
   1.457 +	*/
   1.458 +	virtual TInt GetAudioObjectType(TAudioObjectType& aAudioObjectType) = 0;
   1.459 +
   1.460 +	/**
   1.461 +	Returns the number of channels that was last successfully configured by the 
   1.462 +	ApplyConfig() method.
   1.463 +
   1.464 +	This method can be called at all times. It will return an error if used before 
   1.465 +	ApplyConfig() has been used successfully.
   1.466 +
   1.467 +	@param aNumOfChannels last setting successfully applied using ApplyConfig().	 
   1.468 +
   1.469 +	@return KErrNone if value returned successfully, 
   1.470 +			KErrUnknown if value has not been successfully configured using ApplyConfig() 
   1.471 +			at least once for the current instance of the interface.
   1.472 +	*/
   1.473 +	virtual TInt GetNumOfChannels(TUint& aNumOfChannels) = 0;
   1.474 +
   1.475 +	/**
   1.476 +	Returns the SBR mode that was last successfully configured by the ApplyConfig() method.
   1.477 +
   1.478 +	This method can be called at all times.  It will return an error if used before 
   1.479 +	ApplyConfig() has been used successfully.
   1.480 +
   1.481 +	@param aSbrEnabled last setting successfully applied using ApplyConfig().
   1.482 +
   1.483 +	@return KErrNone if value returned successfully, 
   1.484 +			KErrUnknown if value has not been successfully configured using ApplyConfig() 
   1.485 +			at least once for the current instance of the interface.	 
   1.486 +	*/
   1.487 +	virtual TInt GetSbr(TBool& aSbrEnabled) = 0;
   1.488 +	
   1.489 +	/**
   1.490 +	Returns the downsampled mode that was last successfully configured by the ApplyConfig() method.
   1.491 +
   1.492 +	This method can be called at all times.  It will return an error if used before 
   1.493 +	ApplyConfig() has been used successfully.
   1.494 +
   1.495 +	@param aDsmEnabled last setting successfully applied using ApplyConfig().	 
   1.496 +
   1.497 +	@return KErrNone if value returned successfully, 
   1.498 +			KErrUnknown if value has not been successfully configured using ApplyConfig() at least 
   1.499 +			once for the current instance of the interface.
   1.500 +	*/
   1.501 +	virtual TInt GetDownSampledMode(TBool& aDsmEnabled) = 0;
   1.502 +	};
   1.503 +	
   1.504 +/*****************************************************************************/
   1.505 +/**
   1.506 +UID associated with the Custom interface MSbcEncoderIntfc
   1.507 +
   1.508 +@publishedPartner
   1.509 +@prototype
   1.510 +*/
   1.511 +const TUid KUidSbcEncoderIntfc = {0x10282600};
   1.512 +
   1.513 +/**
   1.514 +This class provides an interface to the SBC encoder hwdevice in order to provide configuration information.
   1.515 +
   1.516 +The Get... supported methods can be used to check capabilities of the encoder by retrieving 
   1.517 +the last successfully applied configuration parameters. The purpose of the Get 
   1.518 +functions is to return the last successfully applied configuration of decoder by this 
   1.519 +interface. A message is not sent to adaptation or the decoder. Instead, a locally saved set 
   1.520 +of the parameters will be updated upon successful use of ApplyConfig(). The Get.. methods 
   1.521 +return an error (KErrUnknown ) if a successful use of ApplyConfig() has not been performed 
   1.522 +apart from the following methods, which return the range of properties supported by the 
   1.523 +implementation ( GetSupportedSamplingFrequencies, GetSupportedChannelModes, 
   1.524 +GetSupportedNumOfSubbands, GetSupportedAllocationMethods, GetSupportedNumOfBlocks, 
   1.525 +GetSupportedBitpoolRange).  These methods do not have setter functions as they are not 
   1.526 +configurable and hence will return valid data at all times.
   1.527 +
   1.528 +ApplyConfig() will send these values using one message with these values in the internally 
   1.529 +defined structure. The message handler should define this structure in the SBC messages 
   1.530 +header file.   ApplyConfig() should fail (KErrInUse) if it is used during encoding and any 
   1.531 +values are changed other than bitpool value. Since the interface proxy is not aware of 
   1.532 +encoding state, this check would have to be done in the adaptation implementation for 
   1.533 +this interface.  The Bitpool can be updated during encoding to change the bitrate. This would 
   1.534 +require the use of the SetBitpoolSize() and ApplyConfig() methods.  Any other parameters can 
   1.535 +be changed but will result in a KErrInUse when ApplyConfig() is called.
   1.536 +
   1.537 +The Set... methods are used update a client-side maintained configuration structure within the 
   1.538 +implementation of the interface.  When the structure is completed, ApplyConfig() should be called 
   1.539 +to send these client side settings to the actual hwdevice implementation.  There are no default 
   1.540 +values for the configuration parameters (hence all values must be set before ApplyConfig() is 
   1.541 +called or an error (KErrArgument) will result).
   1.542 +
   1.543 +@note  This constraint is only true for configurations 
   1.544 +where this is supported (e.g. If GetSupportedChannelModes returns KErrNotSupported then SetChannelMode 
   1.545 +does not need to be set before ApplyConfig() is called). This check and the parameter values 
   1.546 +returned will be implemented in the interface proxy and will not query the actual encoder. If 
   1.547 +multiple instances of the interface are created, each would have this requirement.  
   1.548 +
   1.549 +@publishedPartner
   1.550 +@prototype
   1.551 +*/
   1.552 +class MSbcEncoderIntfc 
   1.553 +	{
   1.554 +public:
   1.555 +	/**
   1.556 +	Defines the channel modes for the SBC encoder
   1.557 +	*/
   1.558 +	enum TSbcChannelMode
   1.559 +        {
   1.560 +        /** SbcChannelMono */
   1.561 +    	ESbcChannelMono,
   1.562 +        /** SbcChannelDual */
   1.563 +		ESbcChannelDual,
   1.564 +        /** SbcChannelStereo */
   1.565 +   	 	ESbcChannelStereo,
   1.566 +        /** SbcChannelJointStereo */
   1.567 +    	ESbcChannelJointStereo
   1.568 +        };
   1.569 +
   1.570 +	/**	
   1.571 +	This type defines the allocation methods for the SBC encoder.
   1.572 +	*/
   1.573 +	enum TSbcAllocationMethod
   1.574 +       	{
   1.575 +        /** SbcAllocationSNR */
   1.576 +    	ESbcAllocationSNR,
   1.577 +        /** SbcAllocationLoudness */
   1.578 +    	ESbcAllocationLoudness
   1.579 +        };
   1.580 +
   1.581 +	/**
   1.582 +	Retrieves the sampling frequencies supported by the encoder. See the class comments for details.
   1.583 +	This method can be called at all times.
   1.584 +	
   1.585 +	@param aSamplingFrequencies Reference to the location to store the array of supported 
   1.586 +	sampling frequencies.
   1.587 +	 
   1.588 +	@return KErrNone if successful, KErrNotSupported if this method is not supported.
   1.589 +	*/
   1.590 +	virtual TInt GetSupportedSamplingFrequencies(RArray<TUint>& aSamplingFrequencies) = 0;
   1.591 +	
   1.592 +	/**
   1.593 +	Retrieves the channel encoding supported by the encoder. See the class comments for details.
   1.594 +	
   1.595 +	This method can be called at all times.
   1.596 +
   1.597 +	@param aChannelModes Reference to the location to store the array of supported channel encoding modes.
   1.598 +
   1.599 +	@return KErrNone if successful, KErrNotSupported if this method is not supported.
   1.600 +	*/
   1.601 +	virtual TInt GetSupportedChannelModes(RArray<TSbcChannelMode>& aChannelModes) = 0;
   1.602 +	
   1.603 +	/**
   1.604 +	Retrieves the number of subbands supported by the encoder. See the class comments for details.
   1.605 +	
   1.606 +	This method can be called at all times.
   1.607 +
   1.608 +	@param aNumOfSubbands Reference to the location to store the array of supported number of subbands.
   1.609 +
   1.610 +	@return KErrNone if successful, KErrNotSupported if this method is not supported.
   1.611 +	*/
   1.612 +	virtual TInt GetSupportedNumOfSubbands(RArray<TUint>& aNumOfSubbands) = 0; 
   1.613 +
   1.614 +	/**
   1.615 +	Retrieves the allocation methods supported by the encoder. See the class comments for details.
   1.616 +	
   1.617 +	This method can be called at all times.
   1.618 +
   1.619 +	@param aAllocationMethods Reference to the location to store the array of supported allocation methods.
   1.620 +
   1.621 +	@return KErrNone if successful, KErrNotSupported if this method is not supported.
   1.622 +	*/
   1.623 +	virtual TInt GetSupportedAllocationMethods(RArray<TSbcAllocationMethod>& aAllocationMethods) = 0;
   1.624 +	
   1.625 +	/**
   1.626 +	Retrieves the number of blocks supported by the encoder. See the class comments for details.
   1.627 +	
   1.628 +	This method can be called at all times but if ApplyConfig() is subsequently called 
   1.629 +	after changing this value whilst encoding, a KErrInUse error will result.
   1.630 +
   1.631 +	@param aNumOfBlocks Reference to the location to store the array of supported number of blocks.
   1.632 +
   1.633 +	@return KErrNone if successful, KErrNotSupported if this method is not supported.
   1.634 +	*/
   1.635 +	virtual TInt GetSupportedNumOfBlocks(RArray<TUint>& aNumOfBlocks) = 0;
   1.636 +	
   1.637 +	/**
   1.638 +	Retrieves the min and max bitpool values supported by the encoder. See the class comments for details.
   1.639 +	
   1.640 +	This method can be called at all times but and ApplyConfig() can be called to change the value whilst encoding.
   1.641 +
   1.642 +	@param aMinSupportedBitpoolSize minimum bitpool value allowed by the encoder.
   1.643 +	@param aMaxSupportedBitpoolSize maximum bitpool value allowed by the encoder.
   1.644 +
   1.645 +	@return KErrNone if successful, KErrNotSupported if this method is not supported.
   1.646 +	*/
   1.647 +	virtual TInt GetSupportedBitpoolRange(TUint& aMinSupportedBitpoolSize, TUint& aMaxSupportedBitpoolSize) = 0;
   1.648 +
   1.649 +	/**
   1.650 +	Sets the value of the sampling frequency of the encoder to be configured by the ApplyConfig() method.
   1.651 +
   1.652 +	This method can be called at all times but if ApplyConfig() is subsequently called 
   1.653 +	after changing this value whilst encoding, a KErrInUse error will result.
   1.654 +
   1.655 +	@param aSamplingFrequency values according to standard and supported by encoder.
   1.656 + 	*/
   1.657 +	virtual void SetSamplingFrequency(TUint aSamplingFrequency) = 0;
   1.658 +
   1.659 +	/**
   1.660 +	Sets the channel mode of the encoder to be configured by the ApplyConfig() method. 
   1.661 +	See the class comments for details.
   1.662 +	
   1.663 +	This method can be called at all times but if ApplyConfig() is subsequently called after 
   1.664 +	changing this value whilst encoding, a KErrInUse error will result.
   1.665 +
   1.666 +	@param aChannelMode (ESbcChannelMono, ESbcChannelDual, ESbcChannelStereo, 
   1.667 +			ESbcChannelJointStereo) when supported by encoder.	 
   1.668 +
   1.669 +	*/
   1.670 +	virtual void SetChannelMode(TSbcChannelMode aChannelMode) = 0;
   1.671 +
   1.672 +	/**
   1.673 +	Sets the channel mode of the encoder to be configured by the ApplyConfig() method.  
   1.674 +
   1.675 +	This method can be called at all times but if ApplyConfig() is subsequently called after 
   1.676 +	changing this value whilst encoding, a KErrInUse error will result.
   1.677 +
   1.678 +	@param aNumOfSubbands values according to standard and supported by encoder.	
   1.679 +
   1.680 +	*/
   1.681 +	virtual void SetNumOfSubbands(TUint aNumOfSubbands) = 0;
   1.682 +
   1.683 +	/**
   1.684 +	Sets the allocation method of the encoder to be configured by the ApplyConfig() method.
   1.685 +
   1.686 +	This method can be called at all times but if ApplyConfig() is subsequently called after 
   1.687 +	changing this value whilst encoding, a KErrInUse error will result.
   1.688 +		 
   1.689 +	@param aAllocationMethod ESbcAllocationSNR, ESbcAllocationLoudness when supported by encoder
   1.690 +
   1.691 +	*/
   1.692 +	virtual void SetAllocationMethod(TSbcAllocationMethod aAllocationMethod) = 0;
   1.693 +
   1.694 +	/**
   1.695 +	Sets the number of blocks of the encoder to be configured by the ApplyConfig() method.
   1.696 +
   1.697 +	This method can be called at all times but if ApplyConfig() is subsequently called after 
   1.698 +	changing this value whilst encoding, a KErrInUse error will result.
   1.699 +		
   1.700 +	@param aNumOfBlocks values according to standard and supported by encoder.	  	 
   1.701 +	*/
   1.702 +	virtual void SetNumOfBlocks(TUint aNumOfBlocks) = 0;
   1.703 +	
   1.704 +	/**
   1.705 +	Sets the size of the bitpool of the encoder to be configured by the ApplyConfig() method.  
   1.706 +
   1.707 +	This method is allowable at all times - while actively encoding or not.
   1.708 +
   1.709 +	@param aBitpoolSize values according to standard and supported by encoder.
   1.710 +
   1.711 +	*/
   1.712 +	virtual void SetBitpoolSize(TUint aBitpoolSize) = 0;
   1.713 +
   1.714 +	/**
   1.715 +	Used to configure the encoder with parameters passed in the Set… methods.
   1.716 +	This method can be called at all times - while actively encoding or not. 
   1.717 +	An error (KErrInUse) will be returned if any configuration parameter, other 
   1.718 +	than bitpool size, is changed while encoding. This checking operational 
   1.719 +	state of the encoder would be done by the adaptation implementation of this 
   1.720 +	interface since the interface proxy is not aware of the encoder state. Also, 
   1.721 +	the adaptation implementation will return an error if incorrect values are 
   1.722 +	used to configure the encoder.
   1.723 +	
   1.724 +	@note  Even though some preliminary checking is done in the set methods (to see 
   1.725 +	if it is valid to set the values at all) it is expected that 
   1.726 +
   1.727 +	@return KErrNone if successful, 
   1.728 +			KErrNotSupported if this method is not implemented, 
   1.729 +			KErrInUse if encoding in active and values are changed that are not 
   1.730 +			allowed to be changed during encoding, 
   1.731 +			KErrArgument if one of the configuration items is not appropriate or 
   1.732 +			if all the values are not set (unless some of the values are not 
   1.733 +			supported, in which case these values should be ignored).	 
   1.734 +	*/
   1.735 +	virtual TInt ApplyConfig() = 0;
   1.736 +
   1.737 +	/**
   1.738 +	Gets the value of the sampling frequency of the encoder that was last successfully 
   1.739 +	configured by the ApplyConfig() method.
   1.740 +
   1.741 +	This method can be called at all times - while actively encoding or not, but will 
   1.742 +	return an error if used before ApplyConfig() has been used successfully.
   1.743 +
   1.744 +	@param aSamplingFrequency last setting successfully applied using ApplyConfig().
   1.745 +
   1.746 +	@return KErrNone if value returned successfully, 
   1.747 +			KErrUnknown if value has not been successfully configured using ApplyConfig() 
   1.748 +			at least once for the current instance of the interface, 
   1.749 +			KErrNotSupported if this method is not implemented (to match its set and 
   1.750 +			getsupported methods).
   1.751 +	*/
   1.752 +	virtual TInt GetSamplingFrequency(TUint& aSamplingFrequency) = 0;
   1.753 +
   1.754 +	/**
   1.755 +	Gets the channel mode of the encoder that was last successfully configured by the 
   1.756 +	ApplyConfig() method.
   1.757 +
   1.758 +	This method can be called at all times - while actively encoding or not, but will 
   1.759 +	return an error if used before ApplyConfig() has been used successfully.
   1.760 +
   1.761 +	@param aChannelMode last setting successfully applied using ApplyConfig(). 
   1.762 +
   1.763 +	@return KErrNone if value returned successfully, 
   1.764 +			KErrUnknown if value has not been successfully configured using ApplyConfig() 
   1.765 +			at least once for the current instance of the interface.
   1.766 +	*/
   1.767 +	virtual TInt GetChannelMode(TSbcChannelMode& aChannelMode) = 0;
   1.768 +
   1.769 +	/**
   1.770 +	Gets the channel mode of the encoder that was last successfully configured by the 
   1.771 +	ApplyConfig() method.
   1.772 +
   1.773 +	This method can be called at all times - while actively encoding or not, 
   1.774 +	but will return an error if used before ApplyConfig() has been used successfully.
   1.775 +		 
   1.776 +	@param aNumOfSubbands last setting successfully applied using ApplyConfig().
   1.777 +	
   1.778 +	@return KErrNone if value returned successfully, 
   1.779 +			KErrUnknown if value has not been successfully configured using ApplyConfig() 
   1.780 +			at least once for the current instance of the interface, 
   1.781 +			KErrNotSupported if this method is not implemented (to match its set and 
   1.782 +			getsupported methods)
   1.783 +	*/
   1.784 +	virtual TInt GetNumOfSubbands(TUint& aNumOfSubbands) = 0;
   1.785 +	
   1.786 +	/**
   1.787 +	Gets the number of blocks of the encoder that was last successfully configured by 
   1.788 +	the ApplyConfig() method.
   1.789 +
   1.790 +	This method can be called at all times - while actively encoding or not, but will 
   1.791 +	return an error if used before ApplyConfig() has been used successfully.
   1.792 +
   1.793 +	@param aNumOfBlocks last setting successfully applied using ApplyConfig().
   1.794 +
   1.795 +	@return KErrNone if value returned successfully, 
   1.796 +			KErrUnknown if value has not been successfully configured using ApplyConfig() 
   1.797 +			at least once for the current instance of the interface, 
   1.798 +			KErrNotSupported if this method is not implemented (to match its set and 
   1.799 +			getsupported methods)
   1.800 +	*/
   1.801 +	virtual TInt GetNumOfBlocks(TUint& aNumOfBlocks) = 0;
   1.802 +
   1.803 +	/**
   1.804 +	Gets the allocation method of the encoder that was last successfully configured 
   1.805 +	by the ApplyConfig() method.
   1.806 +
   1.807 +	This method can be called at all times - while actively encoding or not, but will 
   1.808 +	return an error if used before ApplyConfig() has been used successfully.
   1.809 +	@param aAllocationMethod last setting successfully applied using ApplyConfig().
   1.810 +
   1.811 +	@return KErrNone if value returned successfully, 
   1.812 +			KErrUnknown if value has not been successfully configured using ApplyConfig() 
   1.813 +			at least once for the current instance of the interface, 
   1.814 +			KErrNotSupported if this method is not implemented (to match its set and 
   1.815 +			getsupported methods).
   1.816 +	*/
   1.817 +	virtual TInt GetAllocationMethod(TSbcAllocationMethod& aAllocationMethod) = 0;
   1.818 +
   1.819 +	/**
   1.820 +	Gets the size of the bitpool of the encoder that was last successfully 
   1.821 +	configured by the ApplyConfig() method.
   1.822 +
   1.823 +	This method can be called at all times - while actively encoding or not, but 
   1.824 +	will return an error if used before ApplyConfig() has been used successfully.
   1.825 +
   1.826 +	@param aBitpoolSize last setting successfully applied using ApplyConfig().
   1.827 +
   1.828 +	@return KErrNone if value returned successfully, 
   1.829 +			KErrUnknown if value has not been successfully configured using ApplyConfig() 
   1.830 +			at least once for the current instance of the interface, 
   1.831 +			KErrNotSupported if this method is not implemented (to match its set and 
   1.832 +			getsupported methods).
   1.833 +	*/
   1.834 +	virtual TInt GetBitpoolSize(TUint& aBitpoolSize) = 0;
   1.835 +	}; 
   1.836 +
   1.837 +/*****************************************************************************/
   1.838 +/**
   1.839 +UID associated with the Custom interface MG711DecoderIntfc
   1.840 +
   1.841 +@publishedPartner
   1.842 +@prototype
   1.843 +*/
   1.844 +const TUid KUidG711DecoderIntfc = {0x10282601};
   1.845 +
   1.846 +/**
   1.847 +This class provides an interface to the G711 decoder CMMFHwDevice in order to provide 
   1.848 +additional configuration information.
   1.849 +
   1.850 +@publishedPartner
   1.851 +@prototype
   1.852 +*/
   1.853 +class MG711DecoderIntfc 
   1.854 +	{
   1.855 +public:
   1.856 +	/** The Decoder mode */
   1.857 +	enum TDecodeMode
   1.858 +        {
   1.859 +        /** DecALaw */
   1.860 +        EDecALaw,
   1.861 +        /** DecULaw */
   1.862 +        EDecULaw
   1.863 +        };
   1.864 +
   1.865 +	/**
   1.866 +	Informs the decoder of the encoded data format that will be sent to it.
   1.867 +
   1.868 +	This method can be called when decoding is not active - anytime before started 
   1.869 +	or after stopped. 
   1.870 +	@param 	aDecodeMode the decode mode.
   1.871 +
   1.872 +	@return KErrNone if successful. 
   1.873 +			KErrInUse if this method is used when encoding is active. 
   1.874 +			KErrNotSupported if this method is not implemented. 
   1.875 +	*/
   1.876 +	virtual TInt SetDecoderMode(TDecodeMode aDecodeMode) = 0;
   1.877 +	
   1.878 +	/**
   1.879 +	Queries the decoder of the encoded data format that has been active.
   1.880 +
   1.881 +	This method can be called at all times.
   1.882 +	@param 	aDecodeMode the decode mode.
   1.883 +
   1.884 +	@return KErrNone if successful. 
   1.885 +			KErrInUse if this method is used when encoding is active. 
   1.886 +			KErrNotSupported if this method is not implemented. 
   1.887 +	*/
   1.888 +	virtual TInt GetDecoderMode(TDecodeMode& aDecodeMode) = 0;
   1.889 +
   1.890 +	/** 	
   1.891 +	Used to enable and disable the comfort noise generation capability.
   1.892 +
   1.893 +	This method can be called when decoding is not active - anytime before started 
   1.894 +	or after stopped. 
   1.895 +	
   1.896 +	@param 	aCng ETrue = Comfort Noise Generation enabled; EFalse = Comfort Noise 
   1.897 +	Generation disabled
   1.898 +	
   1.899 +	@return	KErrNone if successful. 
   1.900 +			KErrInUse if this method is used when encoding is active. 
   1.901 +			KErrNotSupported if this method is not implemented. 
   1.902 +	*/
   1.903 +	virtual TInt SetComfortNoiseGeneration(TBool aCng) = 0;
   1.904 +
   1.905 +	/** 	
   1.906 +	Used to find out if comfort noise generation is enabled or not.
   1.907 +
   1.908 +	This method can be called when decoding is not active - anytime before started 
   1.909 +	or after stopped. 
   1.910 +
   1.911 +	@param 	aCng ETrue = Comfort Noise Generation enabled; EFalse = Comfort Noise 
   1.912 +	Generation disabled
   1.913 +
   1.914 +	@return	KErrNone if successful. 
   1.915 +			KErrInUse if this method is used when encoding is active. 
   1.916 +			KErrNotSupported if this method is not implemented. 
   1.917 +	*/
   1.918 +	virtual TInt GetComfortNoiseGeneration(TBool& aCng) = 0;
   1.919 +
   1.920 +	/**
   1.921 +	Used to enable and disable the packet loss concealment capability.
   1.922 +
   1.923 +	This can be called when decoding is not active - anytime before started or after 
   1.924 +	stopped. 
   1.925 +
   1.926 +	@param	aPlc ETrue = plc enabled; EFalse = plc disabled
   1.927 +
   1.928 +	@return KErrNone if successful. KErrInUse if this method is used when encoding is 
   1.929 +	active. KErrNotSupported if this method is not implemented.
   1.930 +	*/
   1.931 +	virtual TInt SetPacketLossConcealment(TBool aPlc) = 0;
   1.932 +
   1.933 +	/** 	
   1.934 +	Used to find out if packet loss concealment capability is enabled or not.
   1.935 +
   1.936 +	This method can be called when decoding is not active - anytime before started or 
   1.937 +	after stopped. 
   1.938 +
   1.939 +	@param 	aPlc ETrue = packet loss concealment enabled; EFalse = packet loss 
   1.940 +	concealment disabled
   1.941 +
   1.942 +	@return	KErrNone if successful. KErrInUse if this method is used when encoding is active. 
   1.943 +			KErrNotSupported if this method is not implemented. 
   1.944 +	*/
   1.945 +	virtual TInt GetPacketLossConcealment(TBool& aPlc) = 0;
   1.946 +
   1.947 +	};
   1.948 +	
   1.949 +/*****************************************************************************/
   1.950 +/**
   1.951 +UID associated with the Custom interface MG711EncoderIntfc
   1.952 +
   1.953 +@publishedPartner
   1.954 +@prototype
   1.955 +*/
   1.956 +const TUid KUidG711EncoderIntfc = {0x10282602};
   1.957 +
   1.958 +/**
   1.959 +This class provides an interface to the G711 encoder CMMFHwDevice in order to provide 
   1.960 +additional configuration information.
   1.961 +
   1.962 +@publishedPartner
   1.963 +@prototype
   1.964 +*/
   1.965 +class MG711EncoderIntfc 
   1.966 +	{
   1.967 +public:
   1.968 +	/** The encoder mode */
   1.969 +	enum TEncodeMode
   1.970 +        {
   1.971 +        /** EncALaw */
   1.972 +        EEncALaw,
   1.973 +        /** EncULaw */
   1.974 +        EEncULaw
   1.975 +        };
   1.976 +
   1.977 +	/** 	
   1.978 +	Configures the encoder's encoding format.
   1.979 +
   1.980 +	This method can be called when decoding is not active - anytime before started or 
   1.981 +	after stopped. 
   1.982 +
   1.983 +	@param 	aEncodeMode the encode mode.
   1.984 +
   1.985 +	@return	KErrNone if successful. KErrInUse if this method is used when encoding is active. 
   1.986 +			KErrNotSupported if this method is not implemented. 
   1.987 +	*/
   1.988 +	virtual TInt SetEncoderMode(TEncodeMode aEncodeMode) = 0;
   1.989 +
   1.990 +	/** 	
   1.991 +	Controls voice activity detection (VAD) mode.
   1.992 +
   1.993 +	This method can be called at all times.
   1.994 +
   1.995 +	@param 	aVadModeOn ETrue=On, EFalse=Off
   1.996 +
   1.997 +	@return	KErrNone if successful, 
   1.998 +			KErrNotSupported if this method is not implemented or not supported by the encoder
   1.999 +	*/
  1.1000 +	virtual TInt SetVadMode(TBool aVadModeOn) = 0;
  1.1001 +
  1.1002 +	/** 
  1.1003 +	Gets the current state of the voice activity detection (VAD) mode.
  1.1004 +
  1.1005 +	This method can be called at all times - while actively encoding or not.
  1.1006 +
  1.1007 +	@param 	aVadModeOn On output ETrue=On, EFalse=Off
  1.1008 +
  1.1009 +	@return	KErrNone if successful. 
  1.1010 +			KErrNotSupported if this method is not implemented or VAD is not supported by the encoder. 
  1.1011 +	*/
  1.1012 +	virtual TInt GetVadMode(TBool& aVadModeOn) = 0;
  1.1013 +	};
  1.1014 +
  1.1015 +/*****************************************************************************/
  1.1016 +/**
  1.1017 +UID associated with the Custom interface MG729DecoderIntfc
  1.1018 +
  1.1019 +@publishedPartner
  1.1020 +@prototype
  1.1021 +*/
  1.1022 +const TUid KUidG729DecoderIntfc = {0x10282603};
  1.1023 +
  1.1024 +/**
  1.1025 +This class provides an interface to the G729 decoder CMMFHwDevice in order to provide additional 
  1.1026 +configuration information.
  1.1027 +
  1.1028 +@publishedPartner
  1.1029 +@prototype
  1.1030 +*/
  1.1031 +class MG729DecoderIntfc
  1.1032 +	{
  1.1033 +public:
  1.1034 +	/**
  1.1035 +	Informs the decoder that the next buffer sent to it will contain bad LSF data.
  1.1036 +
  1.1037 +	This method can be called when decoding is active.
  1.1038 + 
  1.1039 +	This method will be called after a buffer has been received from the CMMFHwDevice, 
  1.1040 +	and before it is returned to the CMMFHwDevice.
  1.1041 +
  1.1042 +	@return	KErrNone if successful. 
  1.1043 +			KErrInUse if this method is used out of sequence. 
  1.1044 +			KErrNotSupported if this method is not implemented. 
  1.1045 +	*/
  1.1046 +	virtual	TInt BadLsfNextBuffer() = 0;
  1.1047 +	};
  1.1048 +
  1.1049 +/*****************************************************************************/
  1.1050 +/**
  1.1051 +UID associated with the Custom interface MG729EncoderIntfc
  1.1052 +
  1.1053 +@publishedPartner
  1.1054 +@prototype
  1.1055 +*/
  1.1056 +const TUid KUidG729EncoderIntfc = {0x10282604};
  1.1057 +
  1.1058 +/**
  1.1059 +This class provides an interface to the G729 encoder CMMFHwDevice in order to provide 
  1.1060 +additional configuration information.
  1.1061 +
  1.1062 +@publishedPartner
  1.1063 +@prototype
  1.1064 +*/
  1.1065 +class MG729EncoderIntfc
  1.1066 +	{
  1.1067 +public:
  1.1068 +	/** 
  1.1069 +	Controls voice activity detection (VAD) mode.
  1.1070 +
  1.1071 +	This method is allowable at all times - while actively encoding or not.
  1.1072 +	@param 	aVadModeOn ETrue=On, EFalse=Off
  1.1073 +
  1.1074 +	@return	KErrNone if successful. KErrNotSupported if this method is not implemented 
  1.1075 +	or not supported by the encoder. 
  1.1076 +	*/
  1.1077 +	virtual TInt SetVadMode(TBool aVadModeOn) = 0;
  1.1078 +
  1.1079 +	/**
  1.1080 +	Gets the current state of the voice activity detection (VAD) mode.
  1.1081 +
  1.1082 +	This method can be called at all times - while actively encoding or not.
  1.1083 +
  1.1084 +	@param 	aVadModeOn On output ETrue=On, EFalse=Off
  1.1085 +	@return	KErrNone if successful. KErrNotSupported if this method is not implemented 
  1.1086 +	or VAD is not supported by the encoder. 
  1.1087 +	*/
  1.1088 +	virtual TInt GetVadMode(TBool& aVadModeOn) = 0;
  1.1089 +	};
  1.1090 +
  1.1091 +/*****************************************************************************/
  1.1092 +/**
  1.1093 +UID associated with the Custom interface MIlbcDecoderIntfc
  1.1094 +
  1.1095 +@publishedPartner
  1.1096 +@prototype
  1.1097 +*/
  1.1098 +const TUid KUidIlbcDecoderIntfc = {0x10282605};
  1.1099 +
  1.1100 +/**
  1.1101 +This class provides an interface to the Ilbc decoder CMMFHwDevice in order to provide 
  1.1102 +additional configuration information.
  1.1103 +
  1.1104 +@publishedPartner
  1.1105 +@prototype
  1.1106 +*/
  1.1107 +class MIlbcDecoderIntfc
  1.1108 +	{
  1.1109 +public:
  1.1110 +	/** The Ibc decoder mode */
  1.1111 +	enum TDecodeMode
  1.1112 +        {
  1.1113 +        /** 20msFrame */
  1.1114 +        E20msFrame,
  1.1115 +        /** 30msFrame */
  1.1116 +        E30msFrame
  1.1117 +        };
  1.1118 +
  1.1119 +	/**
  1.1120 +	Informs the decoder of the encoded data format that will be sent to it.
  1.1121 +
  1.1122 +	This method can be called when decoding is not active - anytime before started or 
  1.1123 +	after stopped. 
  1.1124 +
  1.1125 +	@param 	aDecodeMode the decode mode.
  1.1126 +
  1.1127 +	@return	KErrNone if successful. 
  1.1128 +			KErrInUse if this method is used when decoding is active. 
  1.1129 +			KErrNotSupported if this method is not implemented.
  1.1130 +	*/
  1.1131 +	virtual TInt SetDecoderMode(TDecodeMode aDecodeMode) = 0;
  1.1132 +
  1.1133 +	/**
  1.1134 +	Used to enable and disable the comfort noise generation capability.
  1.1135 +
  1.1136 +	This method is allowable when decoding is not active - anytime before started or 
  1.1137 +	after stopped. 
  1.1138 +
  1.1139 +	@param 	aCng ETrue = comfort noise generation enabled; EFalse = comfort noise 
  1.1140 +	generation disabled
  1.1141 +
  1.1142 +	@return	KErrNone if successful. 
  1.1143 +			KErrInUse if this method is used when encoding is active. 
  1.1144 +			KErrNotSupported if this method is not implemented. 
  1.1145 +	*/
  1.1146 +	virtual TInt SetComfortNoiseGeneration(TBool aCng) = 0;
  1.1147 +
  1.1148 +	/**
  1.1149 +	Used to find out if comfort noise generation is enabled or not.
  1.1150 +
  1.1151 +	This method is allowable when decoding is not active - anytime before started or 
  1.1152 +	after stopped. 
  1.1153 +
  1.1154 +	@param 	aCng On output ETrue = comfort noise generation enabled; EFalse = comfort 
  1.1155 +	noise generation disabled
  1.1156 +
  1.1157 +	@return	KErrNone if successful. 
  1.1158 +			KErrInUse if this method is used when encoding is active. 
  1.1159 +			KErrNotSupported if this method is not implemented. 
  1.1160 +	*/
  1.1161 +	virtual TInt GetComfortNoiseGeneration(TBool& aCng) = 0;
  1.1162 +	};
  1.1163 +
  1.1164 +/*****************************************************************************/
  1.1165 +/**
  1.1166 +UID associated with the Custom interface MIlbcEncoderIntfc
  1.1167 +
  1.1168 +@publishedPartner
  1.1169 +@prototype
  1.1170 +*/
  1.1171 +const TUid KUidIlbcEncoderIntfc = {0x10282606};
  1.1172 +
  1.1173 +/**
  1.1174 +This class provides an interface to the Ilbc encoder CMMFHwDevice in order to provide 
  1.1175 +additional configuration information.
  1.1176 +
  1.1177 +@publishedPartner
  1.1178 +@prototype
  1.1179 +*/
  1.1180 +class MIlbcEncoderIntfc
  1.1181 +	{
  1.1182 +public:
  1.1183 +	/** The Ibc encoder mode*/
  1.1184 +	enum TEncodeMode
  1.1185 +        {
  1.1186 +        /** 20msFrame */
  1.1187 +        E20msFrame,
  1.1188 +        /** 30msFrame */
  1.1189 +        E30msFrame
  1.1190 +        };
  1.1191 +
  1.1192 +	/**
  1.1193 +	Configures the encoder's encoding format.
  1.1194 +
  1.1195 +	This method is allowable when encoding is not active - anytime before started or 
  1.1196 +	after stopped. 
  1.1197 +
  1.1198 +	@param 	aEncodeMode the encode mode.
  1.1199 +
  1.1200 +	@return	KErrNone if successful. 
  1.1201 +			KErrInUse if this method is used when encoding is active. 
  1.1202 +			KErrNotSupported if this method is not implemented. 
  1.1203 +	*/
  1.1204 +	virtual TInt SetEncoderMode(TEncodeMode aEncodeMode) = 0;
  1.1205 +
  1.1206 +	/**
  1.1207 +	Controls voice activity detection (VAD) mode.
  1.1208 +
  1.1209 +	This method is allowable at all times - while actively encoding or not.
  1.1210 +
  1.1211 +	@param 	aVadModeOn ETrue=On, EFalse=Off
  1.1212 +
  1.1213 +	@return	KErrNone if successful. 
  1.1214 +			KErrNotSupported if this method is not implemented or not supported by the encoder. 
  1.1215 +	*/
  1.1216 +	virtual TInt SetVadMode(TBool aVadModeOn) = 0;
  1.1217 +
  1.1218 +	/**
  1.1219 +	Gets the encoder's current encoding format.
  1.1220 +
  1.1221 +	This method is allowable when encoding is not active - anytime before started or 
  1.1222 +	after stopped. 
  1.1223 +
  1.1224 +	@param 	&aEncodeMode the encode mode.
  1.1225 +
  1.1226 +	@return	KErrNone if successful. 
  1.1227 +			KErrInUse if this method is used when encoding is active. 
  1.1228 +			KErrNotSupported if this method is not implemented. 
  1.1229 +	*/
  1.1230 +	virtual TInt GetEncoderMode(TEncodeMode &aEncodeMode) = 0;
  1.1231 +
  1.1232 +	/**
  1.1233 +	Gets the current state of the voice activity detection (VAD) mode.
  1.1234 +
  1.1235 +	This method is allowable at all times - while actively encoding or not.
  1.1236 +
  1.1237 +	@param 	aVadModeOn On output ETrue=On, EFalse=Off
  1.1238 +
  1.1239 +	@return	KErrNone if successful. 
  1.1240 +			KErrNotSupported if this method is not implemented or VAD is not supported 
  1.1241 +			by the encoder. 
  1.1242 +	*/
  1.1243 +	virtual TInt GetVadMode(TBool& aVadModeOn) = 0;
  1.1244 +	};
  1.1245 +
  1.1246 +/*****************************************************************************/
  1.1247 +/**
  1.1248 +UID associated with the Custom interface MMMFErrorConcealmentIntfc
  1.1249 +
  1.1250 +@publishedPartner
  1.1251 +@prototype
  1.1252 +*/
  1.1253 +const TUid KUidErrorConcealmentIntfc = {0x10282607};
  1.1254 +
  1.1255 +/**
  1.1256 +This custom interface can be used to indicate that data has been lost. Typical usage 
  1.1257 +would be during streaming. Lost packets of audio data would not get played, but the 
  1.1258 +video data may still be available for playback. If video playback is synchronized to 
  1.1259 +audio then this API can be used to indicate that audio data is lost so that video 
  1.1260 +playback can continue. It could also be used for an audio-only source to maintain 
  1.1261 +synchronization in time if data is lost.
  1.1262 +
  1.1263 +@publishedPartner
  1.1264 +@prototype
  1.1265 +*/
  1.1266 +class MMMFErrorConcealmentIntfc
  1.1267 +	{
  1.1268 +public:
  1.1269 +	/**
  1.1270 +	Indicates that next buffer sent to CMMFHwDevice will not contain any valid data, 
  1.1271 +	and that a single frame of data has been lost, and that error concealment should 
  1.1272 +	be provided for that lost frame. This method will be called after a buffer has been 
  1.1273 +	received from the Hardware Device, and before it is returned to the Hardware Device.
  1.1274 +
  1.1275 +	@return	KErrNone if successful. 
  1.1276 +			KErrInUse if this method is used out of sequence. 
  1.1277 +			KErrNotSupported if this method is not implemented.
  1.1278 +	*/
  1.1279 +	virtual TInt ConcealErrorForNextBuffer() = 0;
  1.1280 +	/**
  1.1281 +	Puts the CMMFHwDevice into frame-based operation. This may be required in cases where
  1.1282 +	 the decoder only supports error concealment in a frame-based mode of operation. 
  1.1283 +	 Operating in frame-based mode means that the decoder requires that each buffer it 
  1.1284 +	 receives contains only complete data frames. 
  1.1285 +
  1.1286 +	Frame mode is limited to a single frame per buffer. The alternative to frame-based mode 
  1.1287 +	is buffer-based mode, the default interface for CMMFHwDevices and decoders. 
  1.1288 +
  1.1289 +	In buffer-based mode, complete data frames are not required to be contained within a 
  1.1290 +	single buffer. A data frame may span consecutive data buffers in buffer-based mode. 
  1.1291 +
  1.1292 +	As it is less efficient than buffer-based mode, Frame-based mode should be used as a 
  1.1293 +	less-preferred option where errors are present and the CMMFHwDevice implementation would 
  1.1294 +	not be tolerant to buffer-based mode error.  This condition would be indicated by 
  1.1295 +	FrameModeRqrdForEC resulting in its parameter being set to ETrue.
  1.1296 +  
  1.1297 +	This method can be called when decoding is not active - anytime before the CMMFHwDevice 
  1.1298 +	is started, or after it is stopped.
  1.1299 +
  1.1300 +	@param	aFrameModeOn ETrue = frame mode on; EFalse = frame mode off.
  1.1301 +	
  1.1302 +	@return KErrNone if successful. 
  1.1303 +			KErrInUse if this method is used out of sequence. 
  1.1304 +			KErrNotSupported if this method is not implemented.	
  1.1305 +	*/
  1.1306 +	virtual TInt SetFrameMode(TBool aFrameModeOn) = 0;
  1.1307 +
  1.1308 +	/**
  1.1309 +	Queries the CMMFHwDevice to find out if frame mode is required by the implementing 
  1.1310 +	CMMFHwDevice in order for it to support error concealment.
  1.1311 +	
  1.1312 +	This method is allowable when decoding is not active - anytime before the CMMFHwDevice 
  1.1313 +	is started, or after it is stopped.
  1.1314 +	@param	aFrameModeRqrd ETrue = frame mode required; EFalse = frame mode not required
  1.1315 +	@return	KErrNone if successful. 
  1.1316 +			KErrInUse if this method is used during decoding. 
  1.1317 +			KErrNotSupported if this method is not implemented. 
  1.1318 +	*/
  1.1319 +	virtual TInt FrameModeRqrdForEC(TBool& aFrameModeRqrd) = 0;
  1.1320 +	};
  1.1321 +
  1.1322 +/*****************************************************************************/
  1.1323 +/**
  1.1324 +UID associated with the Custom interface MAudioVibraControl
  1.1325 +
  1.1326 +@publishedPartner
  1.1327 +@prototype
  1.1328 +*/
  1.1329 +const TUid KUidAudioVibraControl = {0x10282608};
  1.1330 +
  1.1331 +/**
  1.1332 +This class provides an interface for controlling vibra. DevSound should interpret the 
  1.1333 +instantiation of this interface as a vibra control request by the user. The default vibra 
  1.1334 +behavior implemented by the DevSound for the associated stream will not be performed while 
  1.1335 +the user has control, In other words whilst this interface is instantiated. DevSound default vibra behavior 
  1.1336 +for the associated stream will return once this interface is deleted. Other instances of 
  1.1337 +DevSound may be instantiated for other audio streams at the same time. When multiple instances 
  1.1338 +of DevSound are instantiated, priority and preference values are used to determine which audio 
  1.1339 +streams are rendered. Prioritization of vibra control is determined by adaptation. Due to 
  1.1340 +resource conflicts, and prioritization by adaptation, it may be possible that an audio stream 
  1.1341 +is played, but not the vibra that accompanies that audio. For instance, if audio is mixed and 
  1.1342 +two audio streams are rendered, vibra playback might not be mixed. Vibra playback may be 
  1.1343 +prioritized by adaptation to a single controller. The behavior in these cases would be based 
  1.1344 +on adaptation implementation. The user is not notified if vibra is not played.
  1.1345 +
  1.1346 +@publishedPartner
  1.1347 +@prototype
  1.1348 +*/
  1.1349 +class MAudioVibraControl 
  1.1350 +	{
  1.1351 +public:
  1.1352 +	/** 
  1.1353 +	Turns vibra on.
  1.1354 +
  1.1355 +	@return	KErrNone if successful KErrNotSupported if this method is not implemented.	
  1.1356 +	*/
  1.1357 +	virtual TInt StartVibra() = 0;
  1.1358 +	
  1.1359 +	/** 
  1.1360 +	Turns vibra off.
  1.1361 +	
  1.1362 +	@return	KErrNone if successful. KErrNotSupported if this method is not implemented.	
  1.1363 +	*/
  1.1364 +	virtual TInt StopVibra() = 0;
  1.1365 +	};
  1.1366 +
  1.1367 +/*****************************************************************************/
  1.1368 +/**
  1.1369 +UID associated with the Custom interface MMMFSampleBuffering
  1.1370 +
  1.1371 +@publishedPartner
  1.1372 +@prototype
  1.1373 +*/
  1.1374 +const TUid KUidSampleBuffering = {0x10282609};
  1.1375 +
  1.1376 +/**
  1.1377 +Custom interface class to allow DevSound to support buffering of samples before playback begins. 
  1.1378 +This allows playback to be more robust to underflow errors when playback begins at the expense 
  1.1379 +of higher latency before playback starts.
  1.1380 +
  1.1381 +@publishedPartner
  1.1382 +@prototype
  1.1383 +*/
  1.1384 +class MMMFSampleBuffering
  1.1385 +	{
  1.1386 +public:
  1.1387 +	/**
  1.1388 +	Enables buffering up of samples before playback begins. This function is only effective before 
  1.1389 +	CMMFDevSound::PlayInit() is called - calling the function after this will have no effect.
  1.1390 +	@return  "This method may return one of the system-wide error codes."
  1.1391 +	*/
  1.1392 +	virtual TInt MmsbEnableSampleBufferingBeforePlayback() = 0;
  1.1393 +	
  1.1394 +	/**
  1.1395 +	Disables buffering up of samples before playback begins. This function is only effective before 
  1.1396 +	CMMFDevSound::PlayInit() is called - calling the function after this will have no effect.
  1.1397 +	@return  "This method may return one of the system-wide error codes."
  1.1398 +	*/
  1.1399 +	virtual TInt MmsbDisableSampleBufferingBeforePlayback() = 0;
  1.1400 +
  1.1401 +	/**
  1.1402 +	Asynchronous request that completes when Playback actually starts.
  1.1403 +	@param	"aStatus" "TRequestStatus that will be completed when play actually starts"
  1.1404 +	*/
  1.1405 +	virtual void MmsbNotifyPlayStarted(TRequestStatus& aStatus) = 0;
  1.1406 +
  1.1407 +	/**
  1.1408 +	Cancel any outstanding asynchronous NotifyPlayStarted requests.
  1.1409 +	*/
  1.1410 +	virtual void MmsbCancelNotifyPlayStarted() = 0;
  1.1411 +	};
  1.1412 +
  1.1413 +/*****************************************************************************/
  1.1414 +/**
  1.1415 +UID associated with the Custom interface MMMFPlaybackStatus.
  1.1416 +
  1.1417 +@publishedPartner
  1.1418 +@prototype
  1.1419 +*/
  1.1420 +const TUid KUidPlaybackStatus = {0x10273811};
  1.1421 +
  1.1422 +/**
  1.1423 +Custom interface class to enable access to the DevSound implementation to report the number of 
  1.1424 +consumed input bytes, number of successfully decoded samples, samples played, system time and
  1.1425 +total samples played.
  1.1426 +
  1.1427 +@publishedPartner
  1.1428 +@prototype
  1.1429 +*/	
  1.1430 +class MMMFPlaybackStatus
  1.1431 +	{
  1.1432 +public:
  1.1433 +	/**  Play back status information */
  1.1434 +	struct TMMFPlaybackStatus
  1.1435 +		{
  1.1436 +		/** Number of consumed input bytes */
  1.1437 +		TInt64	aInputBytes;	
  1.1438 +		/** Number of successfully decoded samples */
  1.1439 +		TInt64	aDecodedSamples;		 
  1.1440 +		/** Number of decoded samples played */
  1.1441 +		TInt64	aDecodedSamplesPlayed;	
  1.1442 +		/** Current system time */
  1.1443 +		TInt64	aSystemTime;
  1.1444 +		/**  Total samples played */
  1.1445 +		TInt64 aTotalSamplesPlayed;
  1.1446 +		};
  1.1447 +	/**
  1.1448 +	A method to query for detailed status information from a playing DevSound.
  1.1449 +	including timestamp information from the DSP.
  1.1450 +	@param  aStatus the current playback status.
  1.1451 +	@return  "This method may return one of the system-wide error codes."
  1.1452 +	*/
  1.1453 +	virtual TInt MmpsGetPlaybackStatusInformation(TMMFPlaybackStatus& aStatus)= 0;
  1.1454 +
  1.1455 +	/**
  1.1456 +	Request notification of loss of sync during decode - the notification will be received 
  1.1457 +	in the DevSound client callback SendEventToClient with the	event type set to KMMFEventLossOfDecodeSync. 
  1.1458 +	
  1.1459 +	@return  "This method may return one of the system-wide error codes."
  1.1460 +	*/
  1.1461 +	virtual TInt MmpsRequestLossOfSyncNotification() = 0;
  1.1462 +	
  1.1463 +	/**
  1.1464 +	Cancel the request for notification of loss of sync.
  1.1465 +	
  1.1466 +	@return  "This method may return one of the system-wide error codes."
  1.1467 +	*/
  1.1468 +	virtual TInt MmpsCancelLossOfSyncNotification() = 0;
  1.1469 +	};
  1.1470 +
  1.1471 +/*****************************************************************************/
  1.1472 +/**
  1.1473 +UID associated with the Custom interface MMMFDSPControl
  1.1474 +
  1.1475 +@publishedPartner
  1.1476 +@prototype
  1.1477 +*/
  1.1478 +const TUid KUidDSPControl = {0x1028260A};
  1.1479 +
  1.1480 +/**
  1.1481 +Custom interface class to allow control of DSP behaviour.
  1.1482 +
  1.1483 +@publishedPartner
  1.1484 +@prototype
  1.1485 +*/		
  1.1486 +class MMMFDSPControl
  1.1487 +	{
  1.1488 +public:
  1.1489 +	
  1.1490 +	/**
  1.1491 +	Get the timestamp information from the DSP
  1.1492 +	
  1.1493 +	@param aSamplesPlayed - number of audio samples played so far.
  1.1494 +	@param aSystemTime - current system time 
  1.1495 +	@param aB - bytes consumed by the decoder
  1.1496 +	@param aT - bytes successfully decoded by the decoder.
  1.1497 +
  1.1498 +	@return  "This method may return one of the system-wide error codes."
  1.1499 +	*/
  1.1500 +	virtual TInt MmdspcGetAudioPlaybackInfo(TInt64& aSamplesPlayed, TInt64& aSystemTime, TUint& aB, TUint& aT) = 0;
  1.1501 +
  1.1502 +	/**
  1.1503 +	Place DevSound in a mode where overflow/underflow errors on recording are ignored.
  1.1504 +	@return "This method may return one of the system-wide error codes."
  1.1505 +	*/
  1.1506 +	virtual TInt MmdspcAcceptRecordBuffersInvalidFollowingStop() = 0;
  1.1507 +
  1.1508 +	/**
  1.1509 +	Place DevSound in a mode where overflow/underflow errors on playing are ignored.
  1.1510 +	@return "This method may return one of the system-wide error codes."
  1.1511 +	*/
  1.1512 +	virtual TInt MmdspcAcceptPlaybackBuffersInvalidFollowingStop() = 0;
  1.1513 +	};
  1.1514 +	
  1.1515 +/*****************************************************************************/
  1.1516 +/**
  1.1517 +UID associated with the Custom interface MMMFUnderflowAutoStopControl
  1.1518 +
  1.1519 +@publishedPartner
  1.1520 +@prototype
  1.1521 +*/
  1.1522 +const TUid KUidUnderflowAutoStopControl = {0x1028260B};
  1.1523 +
  1.1524 +/**
  1.1525 +Custom interface class to control underflow behaviour.
  1.1526 +
  1.1527 +@publishedPartner
  1.1528 +@prototype
  1.1529 +*/	
  1.1530 +class MMMFUnderflowAutoStopControl
  1.1531 +	{	
  1.1532 +public:
  1.1533 +	/**
  1.1534 +	Turn off the default DevSound behaviour of automatically Stopping when an underflow 
  1.1535 +	occurs. The underflow will be reported but play can continue when the client sends 
  1.1536 +	more data - it is up to the client to call stop even in the case of end of file.
  1.1537 +	
  1.1538 +	@return  "This method may return one of the system-wide error codes."
  1.1539 +	*/
  1.1540 +	virtual TInt MmuascTurnOffUnderflowAutoStop() = 0;
  1.1541 +	};
  1.1542 +
  1.1543 +/*****************************************************************************/
  1.1544 +/**
  1.1545 +UID associated with the Custom interface MMMFSetDRMProtected
  1.1546 +
  1.1547 +@publishedPartner
  1.1548 +@prototype
  1.1549 +*/
  1.1550 +const TUid KUidSetDRMProtected = {0x1028260C};
  1.1551 +
  1.1552 +/**
  1.1553 +This class provides an interface to mark data being played as DRM protected.
  1.1554 +
  1.1555 +@publishedPartner
  1.1556 +@prototype
  1.1557 +*/	
  1.1558 +class MMMFSetDRMProtected
  1.1559 +	{
  1.1560 +public:
  1.1561 +	/**
  1.1562 +	Indicate whether the data being played is DRM protected or not
  1.1563 +	 
  1.1564 +	@param  aDRMProtected the required DRM state.
  1.1565 +	@return  "This method may return one of the system-wide error codes."
  1.1566 +	*/
  1.1567 +	virtual TInt MmsdpMarkDataAsDRMProtected(TBool aDRMProtected) = 0;
  1.1568 +	};
  1.1569 +
  1.1570 +/*****************************************************************************/
  1.1571 +/**
  1.1572 +UID associated with the Custom interface MMMFBufferFramesConfig.
  1.1573 +
  1.1574 +@publishedPartner
  1.1575 +@prototype
  1.1576 +*/
  1.1577 +const TUid KUidBufferFramesConfig = {0x1028260D};
  1.1578 +
  1.1579 +/**
  1.1580 +This class provides an interface to configure and retrive the buffer frames.
  1.1581 +
  1.1582 +@publishedPartner
  1.1583 +@prototype
  1.1584 +*/		
  1.1585 +class MMMFBufferFramesConfig
  1.1586 +	{
  1.1587 +public:
  1.1588 +	/**
  1.1589 +	For use when encoding to set the number of encoded frames contained in each buffer 
  1.1590 +	sent back to the client. The method should be called after CMMFDevSound::InitilaizeL 
  1.1591 +	but before RecordInitL.
  1.1592 +
  1.1593 +	@param aFrameCount - Number of frames per buffer 
  1.1594 +	@param aSamplesPerFrame - numer of samples per frame
  1.1595 +	@return  "This method may return one of the system-wide error codes."
  1.1596 +	*/
  1.1597 +	virtual TInt MmbfcSetNumberOfFramesPerInputBuffer(TInt aFrameCount, TInt aSamplesPerFrame)=0;
  1.1598 +	
  1.1599 +	/**
  1.1600 +	For use when decoding to set the number of encoded frames contained in each buffer sent 
  1.1601 +	down to DevsSund for playback. The method should be called after CMMFDevSound::InitilaizeL 
  1.1602 +	but before PlayInitL.
  1.1603 +
  1.1604 +	@param aFrameCount - Number of frames per buffer 
  1.1605 +	@param aSamplesPerFrame - numer of samples per frame
  1.1606 +	
  1.1607 +	@return  "This method may return one of the system-wide error codes."
  1.1608 +	*/
  1.1609 +	virtual TInt MmbfcSetNumberOfFramesPerOutputBuffer(TInt aFrameCount, TInt aSamplesPerFrame)=0;
  1.1610 +	};
  1.1611 +
  1.1612 +/*****************************************************************************/
  1.1613 +/**
  1.1614 +UID associated with the Custom interface MMMFGetTimestamps
  1.1615 +
  1.1616 +@publishedPartner
  1.1617 +@prototype
  1.1618 +*/
  1.1619 +const TUid KUidGetTimestamps = {0x1028260E};
  1.1620 +
  1.1621 +/**
  1.1622 +This class provides an interface to configure and retrive time stamps.
  1.1623 +
  1.1624 +@publishedPartner
  1.1625 +@prototype
  1.1626 +*/	
  1.1627 +class MMMFGetTimestamps
  1.1628 +	{
  1.1629 +public:
  1.1630 +	/**
  1.1631 +	Enable or disable support for system timestamps during recording, used for Audio / Video sync. 
  1.1632 +	This method can only be called after recording has been initialised, but before recording 
  1.1633 +	has started. Once recording is underway, the setting cannot be changed.
  1.1634 +
  1.1635 +	@param aEnable ETrue to enable recording timestamps, EFalse to disable it.
  1.1636 +
  1.1637 +	@return KErrNotReady if DevSound has not yet been initialised, KErrNotSupported if 
  1.1638 +	DevSound is not in recording mode or KErrInUse if recording is already underway.
  1.1639 +	*/
  1.1640 +	virtual TInt MmgtSetRecordSystemTimestampsEnabled(TBool aEnable) = 0;
  1.1641 +
  1.1642 +	/**
  1.1643 +	This method returns the system timestamp corresponding to the CMMFDataBuffer with the 
  1.1644 +	given position within the recording stream. This timestamp is the system time at which 
  1.1645 +	the buffers timestamp, as returned by CMMFBuffer::TimeToPlay, was valid.
  1.1646 +	This method can only be used if the recording timestamps were enabled before recording 
  1.1647 +	started using the SetRecordSystemTimestampsEnabled method.
  1.1648 +
  1.1649 +	@param aBufferPosition The timestamp from the buffer, as returned by CMMFBuffer::TimeToPlay.
  1.1650 +	@param aTimestamp Returns the corresponding system time, in universal time.
  1.1651 +
  1.1652 +	@return A System error code. 
  1.1653 +			KErrNotSupported if recording is not ongoing; 
  1.1654 +			KErrNotReady if DevSound is not initialized, or TimeStamps have not been enabled; 
  1.1655 +			KErrNotFound if the timestamp given does not correspond to a recent record buffer.
  1.1656 +	*/
  1.1657 +	virtual TInt MmgtGetSystemTimestampForBuffer(const TTimeIntervalMicroSeconds& aBufferPosition, 
  1.1658 +	                                                   TTime& aTimestamp) const = 0;
  1.1659 +	};
  1.1660 +
  1.1661 +/*****************************************************************************/
  1.1662 +/**
  1.1663 +UID associated with the Custom interface MMMFAdvancedAACEncodeSettings
  1.1664 +
  1.1665 +@publishedPartner
  1.1666 +@prototype
  1.1667 +*/
  1.1668 +const TUid KUidAdvancedAACEncoderSettings = {0x102825FE};
  1.1669 +
  1.1670 +/**
  1.1671 +Advanced AAC Encode Bit-rate Configuration
  1.1672 +
  1.1673 +@publishedPartner
  1.1674 +@prototype
  1.1675 +*/
  1.1676 +class MMMFAdvancedAACEncodeSettings
  1.1677 +	{
  1.1678 +public:
  1.1679 +	/** AAC BItrate mode */
  1.1680 +	enum TAACBitrateMode
  1.1681 +		{
  1.1682 +		/** AACBitrateModeNone */
  1.1683 +		EAACBitrateModeNone,
  1.1684 +		/** AACBitrateModeAbsolute */
  1.1685 +		EAACBitrateModeAbsolute,
  1.1686 +		/** AACBitrateModeVariable */
  1.1687 +		EAACBitrateModeVariable,
  1.1688 +		/** AACBitrateModeFixed */
  1.1689 +		EAACBitrateModeFixed
  1.1690 +		};
  1.1691 +	/**
  1.1692 +	SetAACEncodeBitrateMode
  1.1693 +
  1.1694 +	Set the bitrate mode for AAC encoding. This must be called before the encoding starts.
  1.1695 +
  1.1696 +	@param aBitrateMode the structure containing the additional information required for decoding the raw AAC.
  1.1697 +	@return KErrNone if successful. KErrInUse if this method is used when decoding is active. 
  1.1698 +	*/
  1.1699 +	virtual TInt SetAACEncodeBitrateMode(TAACBitrateMode aBitrateMode)=0;
  1.1700 +
  1.1701 +	/**
  1.1702 +	This interface returns the current AACEncoding bitrate mode.
  1.1703 +
  1.1704 +	@param  aBitrateMode the structure containing the additional information.
  1.1705 +	@return  KErrNone if successful. KErrNotSupported if this method is not implemented.
  1.1706 +	*/
  1.1707 +	virtual TInt GetAACEncodeBitrateMode(TAACBitrateMode& aBitrateMode) = 0;
  1.1708 +	};
  1.1709 +	
  1.1710 +/*****************************************************************************/
  1.1711 +
  1.1712 +	
  1.1713 +#endif 
  1.1714 +