epoc32/include/mmf/server/devsoundstandardcustominterfaces.h
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
       
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // 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
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __DEVSOUNDSTANDARDCUSTOMINTERFACES_H__
       
    17 #define __DEVSOUNDSTANDARDCUSTOMINTERFACES_H__
       
    18 
       
    19 #include <e32std.h>
       
    20 
       
    21 /*****************************************************************************/
       
    22 /**
       
    23 UID associated with the custom interface MMMFDevSoundCustomInterfaceBitRate.
       
    24 @publishedAll
       
    25 @released
       
    26 */
       
    27 const TUid KUidCustomInterfaceDevSoundBitRate = {0x101F7DD5};
       
    28 
       
    29 
       
    30 
       
    31 /**
       
    32 This class provides an interface to set and retrive the DevSound bit rate.
       
    33 
       
    34 @publishedAll
       
    35 @released
       
    36 */
       
    37 class MMMFDevSoundCustomInterfaceBitRate
       
    38 	{	
       
    39 public:
       
    40 	
       
    41 	/**
       
    42 	Gets the bit rates that are supported by DevSound in its current configuration.
       
    43 
       
    44 	@param  aSupportedBitRates
       
    45 	The supported bit rates, in bits per second, shall be appended to this array. Note that 
       
    46 	the array shall be reset by this method.
       
    47 	*/
       
    48 	virtual void GetSupportedBitRatesL(RArray<TInt>& aSupportedBitRates) = 0;
       
    49 
       
    50 	/**
       
    51 	Returns	the current bit rate.
       
    52 
       
    53 	@return	The current bit rate, in bits per second.
       
    54 	*/
       
    55 	virtual TInt BitRateL() = 0;
       
    56 
       
    57 	/**
       
    58 	Sets the bit rate to a new value.
       
    59 
       
    60 	@param  aBitRate
       
    61 	The new bit rate, in bits per second.
       
    62 	*/
       
    63 	virtual void SetBitRateL(TInt aBitRate) = 0;
       
    64 	};
       
    65 
       
    66 
       
    67 /*****************************************************************************/
       
    68 /**
       
    69 UID associated with the Custom interface MMMFDevSoundCustomInterfaceFileBlockLength.
       
    70 
       
    71 @publishedPartner
       
    72 @prototype
       
    73 
       
    74 */
       
    75 const TUid KUidCustomInterfaceDevSoundFileBlockLength = {0x10273806};
       
    76 
       
    77 /**
       
    78 Custom interface class for setting the file's block length on the hwdevice. 
       
    79 
       
    80 Note also that this interface is just a simple interface to 
       
    81 set file's block length. No checking is perfomed on the values sent (hence the
       
    82 Set methods do not return an error code).
       
    83 
       
    84 @publishedPartner
       
    85 @prototype
       
    86 */
       
    87 class MMMFDevSoundCustomInterfaceFileBlockLength
       
    88 	{
       
    89 public:
       
    90 	/**
       
    91 	Sets the file's block length on the hwdevice
       
    92 	@param aBlockAlign
       
    93 	       The file's block length 
       
    94 	*/
       
    95 	virtual void SetFileBlockLength(TUint aBlockAlign)=0;
       
    96 	};
       
    97 
       
    98 /*****************************************************************************/
       
    99 /**
       
   100 UID associated with the Custom interface MMMFGsmConfig
       
   101 
       
   102 @publishedPartner
       
   103 @prototype
       
   104 */
       
   105 const TUid KUidGsmConfig = {0x102825FC};
       
   106 
       
   107 /**
       
   108 This class provides an interface to set and retrive the GSM conversion format.
       
   109 
       
   110 @publishedPartner
       
   111 @prototype
       
   112 */
       
   113 class MMMFGsmConfig
       
   114 	{
       
   115 public: 
       
   116 	/** The GSM conversion format */
       
   117 	enum TMMFGsmConversionFormat
       
   118 		{
       
   119 		/** no conversion specified */
       
   120 		ENone, 
       
   121 		/** for use in Full rate (06.10) and half rate (GSM 06.20 Half Rate (HR)) Vocoder */
       
   122 		EALaw8bit, 
       
   123 		/** for use in Full rate (06.10) and half rate (GSM 06.20 Half Rate (HR)) Vocoder */
       
   124 		EULaw8bit,
       
   125 		/** for use in GSM 06.60 Enhanced Full Rate (EFR) Vocoder.*/
       
   126 		EAlawPCM
       
   127 		};
       
   128 		
       
   129 	/**
       
   130 	Set the conversion format using the TMMFGsmConversionFormat enum.
       
   131 	This conversion must be set before the coder/decoder is started.
       
   132 
       
   133 	@param aConvFormat - format desired.  For encoding behaviour, format will 
       
   134 	be the input format and for decoding behaviour format will be the output 
       
   135 	format.
       
   136 
       
   137 	@return KErrNone - Format change supported, KErrNotSupported - Format 
       
   138 	change not supported, KErrInUse - Format change attempted whilst decoding.
       
   139 	*/	
       
   140 	virtual TInt SetConversionFormat(TMMFGsmConversionFormat aConvFormat) = 0;
       
   141 
       
   142 	/** 
       
   143 	Provides the current conversion format.  Can be called at any time.
       
   144 
       
   145 	@param aConvFormat - after the call contains the current format.
       
   146 	For encoding behaviour, format will be the input format and for decoding
       
   147 	behaviour format will be the output format.
       
   148 
       
   149 	@return KErrNone if value returned successfully, 
       
   150 			KErrUnknown if value has not been successfully configured using
       
   151 			SetConversionFormat() at least once for the current instance of the
       
   152 			interface and there is no default value.
       
   153 			KErrGeneral for all other error scenario.
       
   154 	*/
       
   155 	virtual TInt ConversionFormat(TMMFGsmConversionFormat& aConvFormat) const = 0;
       
   156 	};
       
   157 
       
   158 
       
   159 /*****************************************************************************/
       
   160 /**
       
   161 UID associated with the Custom interface MSpeechEncoderConfig
       
   162 
       
   163 @publishedPartner
       
   164 @prototype
       
   165 */
       
   166 const TUid KUidSpeechEncoderConfig = {0x102825FB};
       
   167 
       
   168 /**
       
   169 This class provides an interface to those CMMFHwDevices providing speech encoding. 
       
   170 This interface is used for querying and configuring the operational modes of speech 
       
   171 encoders as supported by those specific encoders. 
       
   172 If a speech encoder does not support a mode provided by the interface, it will return KErrNotSupported.
       
   173 
       
   174 @publishedPartner
       
   175 @prototype
       
   176 
       
   177 */
       
   178 class MSpeechEncoderConfig 
       
   179 	{
       
   180 public:
       
   181 	/**
       
   182 	Controls voice activity detection (VAD) mode.
       
   183 	This method can be called at all times - while actively encoding or not.
       
   184 	It should be noted that a VAD mode change could also instigate a change in the 
       
   185 	mode of encoding (fixed rate encoding versus variable rate) e.g. in cases where 
       
   186 	VAD requires variable rate encoding.
       
   187 	The effects of activating VAD mode behaviour should be documented in the 
       
   188 	CMMFHwDevice specification implementing it.
       
   189 
       
   190 	@param aVadModeOn ETrue=On, EFalse=Off
       
   191 	@return KErrNone if successful. KErrNotSupported if this method is not implemented 
       
   192 	or not supported by the encoder. 
       
   193 	*/
       
   194 	virtual TInt SetVadMode(TBool aVadModeOn) = 0;
       
   195 
       
   196 	/**
       
   197 	Gets the current state of the voice activity detection (VAD) mode.
       
   198 	This method can be called at all times - while actively encoding or not.
       
   199 
       
   200 	@param aVadModeOn On output ETrue = On, EFalse = Off
       
   201 	@return KErrNone if successful, KErrNotSupported if this method is not implemented 
       
   202 	or not supported by the encoder. 
       
   203 	*/
       
   204 	virtual TInt GetVadMode(TBool& aVadModeOn) = 0;
       
   205 	};
       
   206 
       
   207 /*****************************************************************************/
       
   208 /**
       
   209 UID associated with the Custom interface MAacDecoderConfig
       
   210 
       
   211 @publishedPartner
       
   212 @prototype
       
   213 */
       
   214 const TUid KUidAacDecoderConfig = {0x102825FD};
       
   215 
       
   216 /**
       
   217 This class provides an interface to the AAC decoder CMMFHwDevice in order 
       
   218 to provide additional configuration information for decoding raw AAC data blocks. 
       
   219 
       
   220 The sample rate can be configured via the CMMFHwDevice::SetConfig() method. 
       
   221 An extension mechanism will be provided for further functionality as required.
       
   222 The CMMFHwDevice does not contain Output channel configuration at time of writing. 
       
   223 The HWA decoders to date have been hardcoded for 2ch (left / right) output. 
       
   224 Additional configuration information may be provided by using extension mechanisms. 
       
   225 
       
   226 @publishedPartner
       
   227 @prototype
       
   228 */
       
   229 class MAacDecoderConfig 
       
   230 	{
       
   231 public: 
       
   232 
       
   233 	/**
       
   234 	This is a class containing an enumerated type that defines the audio object types 
       
   235 	required for configuring the AAC decoder for decoding raw AACDefined within TAudioConfig.
       
   236 	*/
       
   237 	class TAudioConfig
       
   238 		{
       
   239 	public:
       
   240 		/**  The audio object type */
       
   241 	    enum TAudioObjectType
       
   242 	    	{
       
   243 			/** Null */
       
   244 	       	ENull    = 0,
       
   245 			/** AacMain */
       
   246 	       	EAacMain = 1,
       
   247 			/** AacLc */
       
   248 	       	EAacLc   = 2,
       
   249 			/** AacSsr */
       
   250 	       	EAacSsr  = 3,
       
   251 			/** AacLtp */
       
   252 	       	EAacLtp  = 4,
       
   253 			/** Sbr */
       
   254 	       	ESbr     = 5
       
   255 	       	};
       
   256 		TAudioObjectType iAudioObjectType;
       
   257 		};	
       
   258 
       
   259 public:
       
   260 	/**
       
   261 	Sets additional configuration parameters required for decoding raw AAC. 
       
   262 
       
   263 	This method can be called when encoding is not active - anytime before the CMMFHwDevice is started. 
       
   264 	
       
   265 	For consistent configuration, this method should be called sometime before each 
       
   266 	start is called on the CMMFHwDevice when decoding raw AAC. That is to say the 
       
   267 	CMMFHwDevice is not required to retain prior configuration information, detect raw 
       
   268 	AAC sent to it, and reconfigure the decoder with this saved information after stop 
       
   269 	is called on the CMMFHwDevice. However, calling pause on the CMMFHwDevice implies 
       
   270 	that the next start call will be resuming same content. For this condition, this API 
       
   271 	is not required when restarting the CMMFHwDevice.
       
   272 	
       
   273 	@param aAudioConfig The structure containing the additional information required for decoding the raw AAC.
       
   274 
       
   275 	@return KErrNone if successful or KErrInUse if this method is used when decoding is active. 
       
   276 	*/
       
   277 	virtual TInt SetAudioConfig(TAudioConfig& aAudioConfig) = 0;
       
   278 
       
   279 	/**
       
   280 	Gets additional configuration parameters supported for decoding raw AAC. 
       
   281 	
       
   282 	This method is allowable when encoding is not active - anytime before the CMMFHwDevice is started. 
       
   283 		
       
   284 	@param aSupportedAudioConfigs An array of structures containing the additional supported configurations.
       
   285 
       
   286 	@return KErrNone if successful. 
       
   287 			KErrInUse if this method is used when decoding is active. 
       
   288 	*/
       
   289 	virtual TInt GetSupportedAudioConfigs(RArray<TAudioConfig>& aSupportedAudioConfigs) = 0;
       
   290 	};
       
   291 	
       
   292 /*****************************************************************************/
       
   293 /**
       
   294 UID associated with the Custom interface MEAacPlusDecoderIntfc
       
   295 
       
   296 @publishedPartner
       
   297 @prototype
       
   298 */
       
   299 const TUid KUidEAacPlusDecoderIntfc = {0x102825FF};
       
   300 
       
   301 /**
       
   302 This class provides an interface to the eAAC+ decoder hwdevice in order to provide configuration information.
       
   303 
       
   304 The Get.. methods can be used to retrieve the last successfully applied configuration parameters.  
       
   305 A message is not sent to adaptation or the decoder. Instead, a locally saved set of the 
       
   306 parameters will be updated upon successful use of ApplyConfig(). It is these saved values that 
       
   307 the proxy maintains that will be returned to the user. For instance, if two interfaces are used 
       
   308 and one interface is used to modify the settings, the other interface's Get… methods would not 
       
   309 return those settings.  The Get.. methods will return an error if a successful use of ApplyConfig() 
       
   310 has not been performed.
       
   311 
       
   312 The Set.. methods are used to update a configuration structure within the implementation of the 
       
   313 interface. When the interface is instantiated, the state of SBR and Downsampled modes will be 
       
   314 disabled. Therefore it is not necessary to configure these parameters before using 
       
   315 ApplyConfig() the first time. However, once modified using this instance of the interface, they 
       
   316 remain in that state until Set.. again.  The values of these items are updated in an internal 
       
   317 structure when each Set.. is called. 
       
   318 
       
   319 The ApplyConfig() method is used to configure the encoder with the parameters specified by 
       
   320 the Set.. methods. ApplyConfig will send back an error (KErrUnknown) if not all items are 
       
   321 Set at least once. This check and the parameter values returned will be implemented in the interface proxy 
       
   322 and will not query the actual decoder. The exception to this is for configuration parameters with defined 
       
   323 default values (see next paragraph). 
       
   324 
       
   325 Calling ApplyConfig() will send these values using a single message to the message handler.
       
   326 ApplyConfig() should fail if it is used during decoding with a KErrInUse (or, as previously stated, 
       
   327 KErrUnknown if a value without a default is not set). Since the interface proxy is not aware of decoding state, 
       
   328 this check would have to be done in the adaptation implementation for this interface.
       
   329 
       
   330 @publishedPartner
       
   331 @prototype
       
   332 */
       
   333 class MEAacPlusDecoderIntfc 
       
   334 	{
       
   335 public:
       
   336 	/**
       
   337 	Defines additional configuration elements required to decode eAAC+.
       
   338 	*/
       
   339 	enum TAudioObjectType
       
   340         {
       
   341         /** Null */
       
   342         ENull    = 0,
       
   343         /** AacLc */
       
   344         EAacLc   = 2,
       
   345         /** AacLtp */
       
   346         EAacLtp  = 4
       
   347         };
       
   348 
       
   349 	/**
       
   350 	Sets the value of the sampling frequency of the decoder to be configured by the ApplyConfig() 
       
   351 	method. This is the sample rate of the core decoder, not the output sampling frequency of the decoder.
       
   352 	This method can be called at all times but if ApplyConfig() is subsequently called 
       
   353 	after changing this value whilst decoding, a KErrInUse error will result.
       
   354 
       
   355 	@param aInputSamplingFrequency  value of the sampling frequency. 
       
   356 	*/
       
   357 	virtual void SetInputSamplingFrequency(TUint aInputSamplingFrequency) = 0;
       
   358 
       
   359 	/**
       
   360 	Sets the object type of the core decoder to be configured by the ApplyConfig() method.
       
   361 
       
   362 	This method can be called at all times but if ApplyConfig() is subsequently called after 
       
   363 	changing this value whilst decoding, a KErrInUse error will result.
       
   364 
       
   365 	@param  aAudioObjectType TAudioObjectType for core decoder as supported by the decoder.
       
   366 	*/
       
   367 	virtual void SetAudioObjectType(TAudioObjectType aAudioObjectType) = 0;
       
   368 	
       
   369 	/**
       
   370 	Sets the number of channels for the output of the decoder to be configured by the ApplyConfig() 
       
   371 	method. The use of this method is to ensure coordination of output channels rendered by the decoder 
       
   372 	and channel configuration of the audio system. This method does not imply that stereo to mono downmix 
       
   373 	is supported by the decoder. The main purpose is for the case considering the presence of PS. A user 
       
   374 	may not know if the decoder output will be mono or stereo based on header information alone, but may 
       
   375 	configure the decoder for two channel output to match the audio system configuration. If the user were 
       
   376 	to set the output to 1 channel and stereo data is present, the decoder may choose only one channel to 
       
   377 	output or to downmix the stereo to mono. Regarding this interface, it would be more desirable to configure 
       
   378 	the decoder when it is known to be mono source data and rely on downmix from the audio system instead of 
       
   379 	from the decoder. The decoder, however, would provide for duplicating mono data into 2 channel data when 
       
   380 	configured for 2 channels and the source data contains only 1 channel.
       
   381 	This method is allowable at all times - while actively encoding or not, but using ApplyConfig() 
       
   382 	if changing this value while encoding will return an error.
       
   383 		 
       
   384 	@param aNumOfChannels 1 - output one channel audio  = 0; 2 - output two channel audio.
       
   385 	 */
       
   386 	virtual void SetNumOfChannels(TUint aNumOfChannels) = 0;
       
   387 	
       
   388 	/**
       
   389 	Controls the SBR mode of the decoder to be configured by the ApplyConfig() method. 
       
   390 
       
   391 	If SBR is enabled and no SBR data is present, the audio data will be upsampled, 
       
   392 	unless Down Sampled mode is enabled.
       
   393 
       
   394 	This method can be called at all times but if ApplyConfig() is subsequently called 
       
   395 	after changing this value whilst decoding, a KErrInUse error will result.
       
   396 
       
   397 	@param aSbrEnabled ETrue - SBR mode enabled, EFalse - SBR mode disabled 
       
   398 	*/
       
   399 	virtual void SetSbr(TBool aSbrEnabled) = 0;
       
   400 
       
   401 	/**
       
   402 	Controls the downsampled mode of the decoder to be configured by the ApplyConfig() method. This setting is only meaningful if SBR is enabled.
       
   403 
       
   404 	This method can be called at all times but if ApplyConfig() is subsequently called after 
       
   405 	changing this value whilst decoding, a KErrInUse error will result.
       
   406 		 
       
   407 	@param aDsmEnabled ETrue - downsampled mode enabled, EFalse - downsampled mode disabled.
       
   408 	*/
       
   409 	virtual void SetDownSampledMode(TBool aDsmEnabled) = 0;
       
   410 
       
   411 	/**
       
   412 	Used to configure the decoder with parameters passed in the Set methods.
       
   413 
       
   414 	This method can be called all times but will return an KErrInUse if the configuration 
       
   415 	parameters would change while decoding (as none of the set parameters can be changed 
       
   416 	during decoding). This checking operational state of the decoder would be done by the 
       
   417 	adaptation implementation of this interface since the interface proxy is not aware of 
       
   418 	the decoder state. The adaptation implementation will return an error if incorrect values 
       
   419 	are used to configure the decoder.
       
   420 
       
   421 	@return KErrNone if successful, KErrNotSupported if this method is not implemented, 
       
   422 			KErrInUse if encoding in active and values are changed that are not allowed to be 
       
   423 			changed during encoding, KErrArgument if one of the configuration items is not appropriate or not set. 
       
   424 	*/
       
   425 	virtual TInt ApplyConfig() = 0;
       
   426 
       
   427 	/**
       
   428 	Returns the value of the sampling frequency of the decoder that was last successfully 
       
   429 	configured by the ApplyConfig() method.
       
   430 	
       
   431 	This method can be called at all times but must be called after a value has been set via 
       
   432 	the ApplyConfig
       
   433 
       
   434 	@param aInputSamplingFrequency last setting successfully applied using ApplyConfig().
       
   435 
       
   436 	@return KErrNone if value returned successfully, 
       
   437 			KErrUnknown if value has not been successfully configured using ApplyConfig() at 
       
   438 			least once for the current instance of the interface or 
       
   439 			KErrInUse if the encoder is active.
       
   440 	*/
       
   441 	virtual TInt GetInputSamplingFrequency(TUint& aInputSamplingFrequency) = 0;
       
   442 	
       
   443 	/**
       
   444 	Returns the object type of the core decoder that was last successfully configured by the 
       
   445 	ApplyConfig() method.
       
   446 	
       
   447 	This method can be called at all times. 
       
   448 		 
       
   449 	@param aAudioObjectType last setting successfully applied using ApplyConfig().
       
   450 
       
   451 	@return KErrNone if value returned successfully, 
       
   452 			KErrUnknown if value has not been successfully configured using ApplyConfig() 
       
   453 			at least once for the current instance of the interface.
       
   454 	*/
       
   455 	virtual TInt GetAudioObjectType(TAudioObjectType& aAudioObjectType) = 0;
       
   456 
       
   457 	/**
       
   458 	Returns the number of channels that was last successfully configured by the 
       
   459 	ApplyConfig() method.
       
   460 
       
   461 	This method can be called at all times. It will return an error if used before 
       
   462 	ApplyConfig() has been used successfully.
       
   463 
       
   464 	@param aNumOfChannels last setting successfully applied using ApplyConfig().	 
       
   465 
       
   466 	@return KErrNone if value returned successfully, 
       
   467 			KErrUnknown if value has not been successfully configured using ApplyConfig() 
       
   468 			at least once for the current instance of the interface.
       
   469 	*/
       
   470 	virtual TInt GetNumOfChannels(TUint& aNumOfChannels) = 0;
       
   471 
       
   472 	/**
       
   473 	Returns the SBR mode that was last successfully configured by the ApplyConfig() method.
       
   474 
       
   475 	This method can be called at all times.  It will return an error if used before 
       
   476 	ApplyConfig() has been used successfully.
       
   477 
       
   478 	@param aSbrEnabled last setting successfully applied using ApplyConfig().
       
   479 
       
   480 	@return KErrNone if value returned successfully, 
       
   481 			KErrUnknown if value has not been successfully configured using ApplyConfig() 
       
   482 			at least once for the current instance of the interface.	 
       
   483 	*/
       
   484 	virtual TInt GetSbr(TBool& aSbrEnabled) = 0;
       
   485 	
       
   486 	/**
       
   487 	Returns the downsampled mode that was last successfully configured by the ApplyConfig() method.
       
   488 
       
   489 	This method can be called at all times.  It will return an error if used before 
       
   490 	ApplyConfig() has been used successfully.
       
   491 
       
   492 	@param aDsmEnabled last setting successfully applied using ApplyConfig().	 
       
   493 
       
   494 	@return KErrNone if value returned successfully, 
       
   495 			KErrUnknown if value has not been successfully configured using ApplyConfig() at least 
       
   496 			once for the current instance of the interface.
       
   497 	*/
       
   498 	virtual TInt GetDownSampledMode(TBool& aDsmEnabled) = 0;
       
   499 	};
       
   500 	
       
   501 /*****************************************************************************/
       
   502 /**
       
   503 UID associated with the Custom interface MSbcEncoderIntfc
       
   504 
       
   505 @publishedPartner
       
   506 @prototype
       
   507 */
       
   508 const TUid KUidSbcEncoderIntfc = {0x10282600};
       
   509 
       
   510 /**
       
   511 This class provides an interface to the SBC encoder hwdevice in order to provide configuration information.
       
   512 
       
   513 The Get... supported methods can be used to check capabilities of the encoder by retrieving 
       
   514 the last successfully applied configuration parameters. The purpose of the Get 
       
   515 functions is to return the last successfully applied configuration of decoder by this 
       
   516 interface. A message is not sent to adaptation or the decoder. Instead, a locally saved set 
       
   517 of the parameters will be updated upon successful use of ApplyConfig(). The Get.. methods 
       
   518 return an error (KErrUnknown ) if a successful use of ApplyConfig() has not been performed 
       
   519 apart from the following methods, which return the range of properties supported by the 
       
   520 implementation ( GetSupportedSamplingFrequencies, GetSupportedChannelModes, 
       
   521 GetSupportedNumOfSubbands, GetSupportedAllocationMethods, GetSupportedNumOfBlocks, 
       
   522 GetSupportedBitpoolRange).  These methods do not have setter functions as they are not 
       
   523 configurable and hence will return valid data at all times.
       
   524 
       
   525 ApplyConfig() will send these values using one message with these values in the internally 
       
   526 defined structure. The message handler should define this structure in the SBC messages 
       
   527 header file.   ApplyConfig() should fail (KErrInUse) if it is used during encoding and any 
       
   528 values are changed other than bitpool value. Since the interface proxy is not aware of 
       
   529 encoding state, this check would have to be done in the adaptation implementation for 
       
   530 this interface.  The Bitpool can be updated during encoding to change the bitrate. This would 
       
   531 require the use of the SetBitpoolSize() and ApplyConfig() methods.  Any other parameters can 
       
   532 be changed but will result in a KErrInUse when ApplyConfig() is called.
       
   533 
       
   534 The Set... methods are used update a client-side maintained configuration structure within the 
       
   535 implementation of the interface.  When the structure is completed, ApplyConfig() should be called 
       
   536 to send these client side settings to the actual hwdevice implementation.  There are no default 
       
   537 values for the configuration parameters (hence all values must be set before ApplyConfig() is 
       
   538 called or an error (KErrArgument) will result).
       
   539 
       
   540 @note  This constraint is only true for configurations 
       
   541 where this is supported (e.g. If GetSupportedChannelModes returns KErrNotSupported then SetChannelMode 
       
   542 does not need to be set before ApplyConfig() is called). This check and the parameter values 
       
   543 returned will be implemented in the interface proxy and will not query the actual encoder. If 
       
   544 multiple instances of the interface are created, each would have this requirement.  
       
   545 
       
   546 @publishedPartner
       
   547 @prototype
       
   548 */
       
   549 class MSbcEncoderIntfc 
       
   550 	{
       
   551 public:
       
   552 	/**
       
   553 	Defines the channel modes for the SBC encoder
       
   554 	*/
       
   555 	enum TSbcChannelMode
       
   556         {
       
   557         /** SbcChannelMono */
       
   558     	ESbcChannelMono,
       
   559         /** SbcChannelDual */
       
   560 		ESbcChannelDual,
       
   561         /** SbcChannelStereo */
       
   562    	 	ESbcChannelStereo,
       
   563         /** SbcChannelJointStereo */
       
   564     	ESbcChannelJointStereo
       
   565         };
       
   566 
       
   567 	/**	
       
   568 	This type defines the allocation methods for the SBC encoder.
       
   569 	*/
       
   570 	enum TSbcAllocationMethod
       
   571        	{
       
   572         /** SbcAllocationSNR */
       
   573     	ESbcAllocationSNR,
       
   574         /** SbcAllocationLoudness */
       
   575     	ESbcAllocationLoudness
       
   576         };
       
   577 
       
   578 	/**
       
   579 	Retrieves the sampling frequencies supported by the encoder. See the class comments for details.
       
   580 	This method can be called at all times.
       
   581 	
       
   582 	@param aSamplingFrequencies Reference to the location to store the array of supported 
       
   583 	sampling frequencies.
       
   584 	 
       
   585 	@return KErrNone if successful, KErrNotSupported if this method is not supported.
       
   586 	*/
       
   587 	virtual TInt GetSupportedSamplingFrequencies(RArray<TUint>& aSamplingFrequencies) = 0;
       
   588 	
       
   589 	/**
       
   590 	Retrieves the channel encoding supported by the encoder. See the class comments for details.
       
   591 	
       
   592 	This method can be called at all times.
       
   593 
       
   594 	@param aChannelModes Reference to the location to store the array of supported channel encoding modes.
       
   595 
       
   596 	@return KErrNone if successful, KErrNotSupported if this method is not supported.
       
   597 	*/
       
   598 	virtual TInt GetSupportedChannelModes(RArray<TSbcChannelMode>& aChannelModes) = 0;
       
   599 	
       
   600 	/**
       
   601 	Retrieves the number of subbands supported by the encoder. See the class comments for details.
       
   602 	
       
   603 	This method can be called at all times.
       
   604 
       
   605 	@param aNumOfSubbands Reference to the location to store the array of supported number of subbands.
       
   606 
       
   607 	@return KErrNone if successful, KErrNotSupported if this method is not supported.
       
   608 	*/
       
   609 	virtual TInt GetSupportedNumOfSubbands(RArray<TUint>& aNumOfSubbands) = 0; 
       
   610 
       
   611 	/**
       
   612 	Retrieves the allocation methods supported by the encoder. See the class comments for details.
       
   613 	
       
   614 	This method can be called at all times.
       
   615 
       
   616 	@param aAllocationMethods Reference to the location to store the array of supported allocation methods.
       
   617 
       
   618 	@return KErrNone if successful, KErrNotSupported if this method is not supported.
       
   619 	*/
       
   620 	virtual TInt GetSupportedAllocationMethods(RArray<TSbcAllocationMethod>& aAllocationMethods) = 0;
       
   621 	
       
   622 	/**
       
   623 	Retrieves the number of blocks supported by the encoder. See the class comments for details.
       
   624 	
       
   625 	This method can be called at all times but if ApplyConfig() is subsequently called 
       
   626 	after changing this value whilst encoding, a KErrInUse error will result.
       
   627 
       
   628 	@param aNumOfBlocks Reference to the location to store the array of supported number of blocks.
       
   629 
       
   630 	@return KErrNone if successful, KErrNotSupported if this method is not supported.
       
   631 	*/
       
   632 	virtual TInt GetSupportedNumOfBlocks(RArray<TUint>& aNumOfBlocks) = 0;
       
   633 	
       
   634 	/**
       
   635 	Retrieves the min and max bitpool values supported by the encoder. See the class comments for details.
       
   636 	
       
   637 	This method can be called at all times but and ApplyConfig() can be called to change the value whilst encoding.
       
   638 
       
   639 	@param aMinSupportedBitpoolSize minimum bitpool value allowed by the encoder.
       
   640 	@param aMaxSupportedBitpoolSize maximum bitpool value allowed by the encoder.
       
   641 
       
   642 	@return KErrNone if successful, KErrNotSupported if this method is not supported.
       
   643 	*/
       
   644 	virtual TInt GetSupportedBitpoolRange(TUint& aMinSupportedBitpoolSize, TUint& aMaxSupportedBitpoolSize) = 0;
       
   645 
       
   646 	/**
       
   647 	Sets the value of the sampling frequency of the encoder to be configured by the ApplyConfig() method.
       
   648 
       
   649 	This method can be called at all times but if ApplyConfig() is subsequently called 
       
   650 	after changing this value whilst encoding, a KErrInUse error will result.
       
   651 
       
   652 	@param aSamplingFrequency values according to standard and supported by encoder.
       
   653  	*/
       
   654 	virtual void SetSamplingFrequency(TUint aSamplingFrequency) = 0;
       
   655 
       
   656 	/**
       
   657 	Sets the channel mode of the encoder to be configured by the ApplyConfig() method. 
       
   658 	See the class comments for details.
       
   659 	
       
   660 	This method can be called at all times but if ApplyConfig() is subsequently called after 
       
   661 	changing this value whilst encoding, a KErrInUse error will result.
       
   662 
       
   663 	@param aChannelMode (ESbcChannelMono, ESbcChannelDual, ESbcChannelStereo, 
       
   664 			ESbcChannelJointStereo) when supported by encoder.	 
       
   665 
       
   666 	*/
       
   667 	virtual void SetChannelMode(TSbcChannelMode aChannelMode) = 0;
       
   668 
       
   669 	/**
       
   670 	Sets the channel mode of the encoder to be configured by the ApplyConfig() method.  
       
   671 
       
   672 	This method can be called at all times but if ApplyConfig() is subsequently called after 
       
   673 	changing this value whilst encoding, a KErrInUse error will result.
       
   674 
       
   675 	@param aNumOfSubbands values according to standard and supported by encoder.	
       
   676 
       
   677 	*/
       
   678 	virtual void SetNumOfSubbands(TUint aNumOfSubbands) = 0;
       
   679 
       
   680 	/**
       
   681 	Sets the allocation method of the encoder to be configured by the ApplyConfig() method.
       
   682 
       
   683 	This method can be called at all times but if ApplyConfig() is subsequently called after 
       
   684 	changing this value whilst encoding, a KErrInUse error will result.
       
   685 		 
       
   686 	@param aAllocationMethod ESbcAllocationSNR, ESbcAllocationLoudness when supported by encoder
       
   687 
       
   688 	*/
       
   689 	virtual void SetAllocationMethod(TSbcAllocationMethod aAllocationMethod) = 0;
       
   690 
       
   691 	/**
       
   692 	Sets the number of blocks of the encoder to be configured by the ApplyConfig() method.
       
   693 
       
   694 	This method can be called at all times but if ApplyConfig() is subsequently called after 
       
   695 	changing this value whilst encoding, a KErrInUse error will result.
       
   696 		
       
   697 	@param aNumOfBlocks values according to standard and supported by encoder.	  	 
       
   698 	*/
       
   699 	virtual void SetNumOfBlocks(TUint aNumOfBlocks) = 0;
       
   700 	
       
   701 	/**
       
   702 	Sets the size of the bitpool of the encoder to be configured by the ApplyConfig() method.  
       
   703 
       
   704 	This method is allowable at all times - while actively encoding or not.
       
   705 
       
   706 	@param aBitpoolSize values according to standard and supported by encoder.
       
   707 
       
   708 	*/
       
   709 	virtual void SetBitpoolSize(TUint aBitpoolSize) = 0;
       
   710 
       
   711 	/**
       
   712 	Used to configure the encoder with parameters passed in the Set… methods.
       
   713 	This method can be called at all times - while actively encoding or not. 
       
   714 	An error (KErrInUse) will be returned if any configuration parameter, other 
       
   715 	than bitpool size, is changed while encoding. This checking operational 
       
   716 	state of the encoder would be done by the adaptation implementation of this 
       
   717 	interface since the interface proxy is not aware of the encoder state. Also, 
       
   718 	the adaptation implementation will return an error if incorrect values are 
       
   719 	used to configure the encoder.
       
   720 	
       
   721 	@note  Even though some preliminary checking is done in the set methods (to see 
       
   722 	if it is valid to set the values at all) it is expected that 
       
   723 
       
   724 	@return KErrNone if successful, 
       
   725 			KErrNotSupported if this method is not implemented, 
       
   726 			KErrInUse if encoding in active and values are changed that are not 
       
   727 			allowed to be changed during encoding, 
       
   728 			KErrArgument if one of the configuration items is not appropriate or 
       
   729 			if all the values are not set (unless some of the values are not 
       
   730 			supported, in which case these values should be ignored).	 
       
   731 	*/
       
   732 	virtual TInt ApplyConfig() = 0;
       
   733 
       
   734 	/**
       
   735 	Gets the value of the sampling frequency of the encoder that was last successfully 
       
   736 	configured by the ApplyConfig() method.
       
   737 
       
   738 	This method can be called at all times - while actively encoding or not, but will 
       
   739 	return an error if used before ApplyConfig() has been used successfully.
       
   740 
       
   741 	@param aSamplingFrequency last setting successfully applied using ApplyConfig().
       
   742 
       
   743 	@return KErrNone if value returned successfully, 
       
   744 			KErrUnknown if value has not been successfully configured using ApplyConfig() 
       
   745 			at least once for the current instance of the interface, 
       
   746 			KErrNotSupported if this method is not implemented (to match its set and 
       
   747 			getsupported methods).
       
   748 	*/
       
   749 	virtual TInt GetSamplingFrequency(TUint& aSamplingFrequency) = 0;
       
   750 
       
   751 	/**
       
   752 	Gets the channel mode of the encoder that was last successfully configured by the 
       
   753 	ApplyConfig() method.
       
   754 
       
   755 	This method can be called at all times - while actively encoding or not, but will 
       
   756 	return an error if used before ApplyConfig() has been used successfully.
       
   757 
       
   758 	@param aChannelMode last setting successfully applied using ApplyConfig(). 
       
   759 
       
   760 	@return KErrNone if value returned successfully, 
       
   761 			KErrUnknown if value has not been successfully configured using ApplyConfig() 
       
   762 			at least once for the current instance of the interface.
       
   763 	*/
       
   764 	virtual TInt GetChannelMode(TSbcChannelMode& aChannelMode) = 0;
       
   765 
       
   766 	/**
       
   767 	Gets the channel mode of the encoder that was last successfully configured by the 
       
   768 	ApplyConfig() method.
       
   769 
       
   770 	This method can be called at all times - while actively encoding or not, 
       
   771 	but will return an error if used before ApplyConfig() has been used successfully.
       
   772 		 
       
   773 	@param aNumOfSubbands last setting successfully applied using ApplyConfig().
       
   774 	
       
   775 	@return KErrNone if value returned successfully, 
       
   776 			KErrUnknown if value has not been successfully configured using ApplyConfig() 
       
   777 			at least once for the current instance of the interface, 
       
   778 			KErrNotSupported if this method is not implemented (to match its set and 
       
   779 			getsupported methods)
       
   780 	*/
       
   781 	virtual TInt GetNumOfSubbands(TUint& aNumOfSubbands) = 0;
       
   782 	
       
   783 	/**
       
   784 	Gets the number of blocks of the encoder that was last successfully configured by 
       
   785 	the ApplyConfig() method.
       
   786 
       
   787 	This method can be called at all times - while actively encoding or not, but will 
       
   788 	return an error if used before ApplyConfig() has been used successfully.
       
   789 
       
   790 	@param aNumOfBlocks last setting successfully applied using ApplyConfig().
       
   791 
       
   792 	@return KErrNone if value returned successfully, 
       
   793 			KErrUnknown if value has not been successfully configured using ApplyConfig() 
       
   794 			at least once for the current instance of the interface, 
       
   795 			KErrNotSupported if this method is not implemented (to match its set and 
       
   796 			getsupported methods)
       
   797 	*/
       
   798 	virtual TInt GetNumOfBlocks(TUint& aNumOfBlocks) = 0;
       
   799 
       
   800 	/**
       
   801 	Gets the allocation method of the encoder that was last successfully configured 
       
   802 	by the ApplyConfig() method.
       
   803 
       
   804 	This method can be called at all times - while actively encoding or not, but will 
       
   805 	return an error if used before ApplyConfig() has been used successfully.
       
   806 	@param aAllocationMethod last setting successfully applied using ApplyConfig().
       
   807 
       
   808 	@return KErrNone if value returned successfully, 
       
   809 			KErrUnknown if value has not been successfully configured using ApplyConfig() 
       
   810 			at least once for the current instance of the interface, 
       
   811 			KErrNotSupported if this method is not implemented (to match its set and 
       
   812 			getsupported methods).
       
   813 	*/
       
   814 	virtual TInt GetAllocationMethod(TSbcAllocationMethod& aAllocationMethod) = 0;
       
   815 
       
   816 	/**
       
   817 	Gets the size of the bitpool of the encoder that was last successfully 
       
   818 	configured by the ApplyConfig() method.
       
   819 
       
   820 	This method can be called at all times - while actively encoding or not, but 
       
   821 	will return an error if used before ApplyConfig() has been used successfully.
       
   822 
       
   823 	@param aBitpoolSize last setting successfully applied using ApplyConfig().
       
   824 
       
   825 	@return KErrNone if value returned successfully, 
       
   826 			KErrUnknown if value has not been successfully configured using ApplyConfig() 
       
   827 			at least once for the current instance of the interface, 
       
   828 			KErrNotSupported if this method is not implemented (to match its set and 
       
   829 			getsupported methods).
       
   830 	*/
       
   831 	virtual TInt GetBitpoolSize(TUint& aBitpoolSize) = 0;
       
   832 	}; 
       
   833 
       
   834 /*****************************************************************************/
       
   835 /**
       
   836 UID associated with the Custom interface MG711DecoderIntfc
       
   837 
       
   838 @publishedPartner
       
   839 @prototype
       
   840 */
       
   841 const TUid KUidG711DecoderIntfc = {0x10282601};
       
   842 
       
   843 /**
       
   844 This class provides an interface to the G711 decoder CMMFHwDevice in order to provide 
       
   845 additional configuration information.
       
   846 
       
   847 @publishedPartner
       
   848 @prototype
       
   849 */
       
   850 class MG711DecoderIntfc 
       
   851 	{
       
   852 public:
       
   853 	/** The Decoder mode */
       
   854 	enum TDecodeMode
       
   855         {
       
   856         /** DecALaw */
       
   857         EDecALaw,
       
   858         /** DecULaw */
       
   859         EDecULaw
       
   860         };
       
   861 
       
   862 	/**
       
   863 	Informs the decoder of the encoded data format that will be sent to it.
       
   864 
       
   865 	This method can be called when decoding is not active - anytime before started 
       
   866 	or after stopped. 
       
   867 	@param 	aDecodeMode the decode mode.
       
   868 
       
   869 	@return KErrNone if successful. 
       
   870 			KErrInUse if this method is used when encoding is active. 
       
   871 			KErrNotSupported if this method is not implemented. 
       
   872 	*/
       
   873 	virtual TInt SetDecoderMode(TDecodeMode aDecodeMode) = 0;
       
   874 	
       
   875 	/**
       
   876 	Queries the decoder of the encoded data format that has been active.
       
   877 
       
   878 	This method can be called at all times.
       
   879 	@param 	aDecodeMode the decode mode.
       
   880 
       
   881 	@return KErrNone if successful. 
       
   882 			KErrInUse if this method is used when encoding is active. 
       
   883 			KErrNotSupported if this method is not implemented. 
       
   884 	*/
       
   885 	virtual TInt GetDecoderMode(TDecodeMode& aDecodeMode) = 0;
       
   886 
       
   887 	/** 	
       
   888 	Used to enable and disable the comfort noise generation capability.
       
   889 
       
   890 	This method can be called when decoding is not active - anytime before started 
       
   891 	or after stopped. 
       
   892 	
       
   893 	@param 	aCng ETrue = Comfort Noise Generation enabled; EFalse = Comfort Noise 
       
   894 	Generation disabled
       
   895 	
       
   896 	@return	KErrNone if successful. 
       
   897 			KErrInUse if this method is used when encoding is active. 
       
   898 			KErrNotSupported if this method is not implemented. 
       
   899 	*/
       
   900 	virtual TInt SetComfortNoiseGeneration(TBool aCng) = 0;
       
   901 
       
   902 	/** 	
       
   903 	Used to find out if comfort noise generation is enabled or not.
       
   904 
       
   905 	This method can be called when decoding is not active - anytime before started 
       
   906 	or after stopped. 
       
   907 
       
   908 	@param 	aCng ETrue = Comfort Noise Generation enabled; EFalse = Comfort Noise 
       
   909 	Generation disabled
       
   910 
       
   911 	@return	KErrNone if successful. 
       
   912 			KErrInUse if this method is used when encoding is active. 
       
   913 			KErrNotSupported if this method is not implemented. 
       
   914 	*/
       
   915 	virtual TInt GetComfortNoiseGeneration(TBool& aCng) = 0;
       
   916 
       
   917 	/**
       
   918 	Used to enable and disable the packet loss concealment capability.
       
   919 
       
   920 	This can be called when decoding is not active - anytime before started or after 
       
   921 	stopped. 
       
   922 
       
   923 	@param	aPlc ETrue = plc enabled; EFalse = plc disabled
       
   924 
       
   925 	@return KErrNone if successful. KErrInUse if this method is used when encoding is 
       
   926 	active. KErrNotSupported if this method is not implemented.
       
   927 	*/
       
   928 	virtual TInt SetPacketLossConcealment(TBool aPlc) = 0;
       
   929 
       
   930 	/** 	
       
   931 	Used to find out if packet loss concealment capability is enabled or not.
       
   932 
       
   933 	This method can be called when decoding is not active - anytime before started or 
       
   934 	after stopped. 
       
   935 
       
   936 	@param 	aPlc ETrue = packet loss concealment enabled; EFalse = packet loss 
       
   937 	concealment disabled
       
   938 
       
   939 	@return	KErrNone if successful. KErrInUse if this method is used when encoding is active. 
       
   940 			KErrNotSupported if this method is not implemented. 
       
   941 	*/
       
   942 	virtual TInt GetPacketLossConcealment(TBool& aPlc) = 0;
       
   943 
       
   944 	};
       
   945 	
       
   946 /*****************************************************************************/
       
   947 /**
       
   948 UID associated with the Custom interface MG711EncoderIntfc
       
   949 
       
   950 @publishedPartner
       
   951 @prototype
       
   952 */
       
   953 const TUid KUidG711EncoderIntfc = {0x10282602};
       
   954 
       
   955 /**
       
   956 This class provides an interface to the G711 encoder CMMFHwDevice in order to provide 
       
   957 additional configuration information.
       
   958 
       
   959 @publishedPartner
       
   960 @prototype
       
   961 */
       
   962 class MG711EncoderIntfc 
       
   963 	{
       
   964 public:
       
   965 	/** The encoder mode */
       
   966 	enum TEncodeMode
       
   967         {
       
   968         /** EncALaw */
       
   969         EEncALaw,
       
   970         /** EncULaw */
       
   971         EEncULaw
       
   972         };
       
   973 
       
   974 	/** 	
       
   975 	Configures the encoder's encoding format.
       
   976 
       
   977 	This method can be called when decoding is not active - anytime before started or 
       
   978 	after stopped. 
       
   979 
       
   980 	@param 	aEncodeMode the encode mode.
       
   981 
       
   982 	@return	KErrNone if successful. KErrInUse if this method is used when encoding is active. 
       
   983 			KErrNotSupported if this method is not implemented. 
       
   984 	*/
       
   985 	virtual TInt SetEncoderMode(TEncodeMode aEncodeMode) = 0;
       
   986 
       
   987 	/** 	
       
   988 	Controls voice activity detection (VAD) mode.
       
   989 
       
   990 	This method can be called at all times.
       
   991 
       
   992 	@param 	aVadModeOn ETrue=On, EFalse=Off
       
   993 
       
   994 	@return	KErrNone if successful, 
       
   995 			KErrNotSupported if this method is not implemented or not supported by the encoder
       
   996 	*/
       
   997 	virtual TInt SetVadMode(TBool aVadModeOn) = 0;
       
   998 
       
   999 	/** 
       
  1000 	Gets the current state of the voice activity detection (VAD) mode.
       
  1001 
       
  1002 	This method can be called at all times - while actively encoding or not.
       
  1003 
       
  1004 	@param 	aVadModeOn On output ETrue=On, EFalse=Off
       
  1005 
       
  1006 	@return	KErrNone if successful. 
       
  1007 			KErrNotSupported if this method is not implemented or VAD is not supported by the encoder. 
       
  1008 	*/
       
  1009 	virtual TInt GetVadMode(TBool& aVadModeOn) = 0;
       
  1010 	};
       
  1011 
       
  1012 /*****************************************************************************/
       
  1013 /**
       
  1014 UID associated with the Custom interface MG729DecoderIntfc
       
  1015 
       
  1016 @publishedPartner
       
  1017 @prototype
       
  1018 */
       
  1019 const TUid KUidG729DecoderIntfc = {0x10282603};
       
  1020 
       
  1021 /**
       
  1022 This class provides an interface to the G729 decoder CMMFHwDevice in order to provide additional 
       
  1023 configuration information.
       
  1024 
       
  1025 @publishedPartner
       
  1026 @prototype
       
  1027 */
       
  1028 class MG729DecoderIntfc
       
  1029 	{
       
  1030 public:
       
  1031 	/**
       
  1032 	Informs the decoder that the next buffer sent to it will contain bad LSF data.
       
  1033 
       
  1034 	This method can be called when decoding is active.
       
  1035  
       
  1036 	This method will be called after a buffer has been received from the CMMFHwDevice, 
       
  1037 	and before it is returned to the CMMFHwDevice.
       
  1038 
       
  1039 	@return	KErrNone if successful. 
       
  1040 			KErrInUse if this method is used out of sequence. 
       
  1041 			KErrNotSupported if this method is not implemented. 
       
  1042 	*/
       
  1043 	virtual	TInt BadLsfNextBuffer() = 0;
       
  1044 	};
       
  1045 
       
  1046 /*****************************************************************************/
       
  1047 /**
       
  1048 UID associated with the Custom interface MG729EncoderIntfc
       
  1049 
       
  1050 @publishedPartner
       
  1051 @prototype
       
  1052 */
       
  1053 const TUid KUidG729EncoderIntfc = {0x10282604};
       
  1054 
       
  1055 /**
       
  1056 This class provides an interface to the G729 encoder CMMFHwDevice in order to provide 
       
  1057 additional configuration information.
       
  1058 
       
  1059 @publishedPartner
       
  1060 @prototype
       
  1061 */
       
  1062 class MG729EncoderIntfc
       
  1063 	{
       
  1064 public:
       
  1065 	/** 
       
  1066 	Controls voice activity detection (VAD) mode.
       
  1067 
       
  1068 	This method is allowable at all times - while actively encoding or not.
       
  1069 	@param 	aVadModeOn ETrue=On, EFalse=Off
       
  1070 
       
  1071 	@return	KErrNone if successful. KErrNotSupported if this method is not implemented 
       
  1072 	or not supported by the encoder. 
       
  1073 	*/
       
  1074 	virtual TInt SetVadMode(TBool aVadModeOn) = 0;
       
  1075 
       
  1076 	/**
       
  1077 	Gets the current state of the voice activity detection (VAD) mode.
       
  1078 
       
  1079 	This method can be called at all times - while actively encoding or not.
       
  1080 
       
  1081 	@param 	aVadModeOn On output ETrue=On, EFalse=Off
       
  1082 	@return	KErrNone if successful. KErrNotSupported if this method is not implemented 
       
  1083 	or VAD is not supported by the encoder. 
       
  1084 	*/
       
  1085 	virtual TInt GetVadMode(TBool& aVadModeOn) = 0;
       
  1086 	};
       
  1087 
       
  1088 /*****************************************************************************/
       
  1089 /**
       
  1090 UID associated with the Custom interface MIlbcDecoderIntfc
       
  1091 
       
  1092 @publishedPartner
       
  1093 @prototype
       
  1094 */
       
  1095 const TUid KUidIlbcDecoderIntfc = {0x10282605};
       
  1096 
       
  1097 /**
       
  1098 This class provides an interface to the Ilbc decoder CMMFHwDevice in order to provide 
       
  1099 additional configuration information.
       
  1100 
       
  1101 @publishedPartner
       
  1102 @prototype
       
  1103 */
       
  1104 class MIlbcDecoderIntfc
       
  1105 	{
       
  1106 public:
       
  1107 	/** The Ibc decoder mode */
       
  1108 	enum TDecodeMode
       
  1109         {
       
  1110         /** 20msFrame */
       
  1111         E20msFrame,
       
  1112         /** 30msFrame */
       
  1113         E30msFrame
       
  1114         };
       
  1115 
       
  1116 	/**
       
  1117 	Informs the decoder of the encoded data format that will be sent to it.
       
  1118 
       
  1119 	This method can be called when decoding is not active - anytime before started or 
       
  1120 	after stopped. 
       
  1121 
       
  1122 	@param 	aDecodeMode the decode mode.
       
  1123 
       
  1124 	@return	KErrNone if successful. 
       
  1125 			KErrInUse if this method is used when decoding is active. 
       
  1126 			KErrNotSupported if this method is not implemented.
       
  1127 	*/
       
  1128 	virtual TInt SetDecoderMode(TDecodeMode aDecodeMode) = 0;
       
  1129 
       
  1130 	/**
       
  1131 	Used to enable and disable the comfort noise generation capability.
       
  1132 
       
  1133 	This method is allowable when decoding is not active - anytime before started or 
       
  1134 	after stopped. 
       
  1135 
       
  1136 	@param 	aCng ETrue = comfort noise generation enabled; EFalse = comfort noise 
       
  1137 	generation disabled
       
  1138 
       
  1139 	@return	KErrNone if successful. 
       
  1140 			KErrInUse if this method is used when encoding is active. 
       
  1141 			KErrNotSupported if this method is not implemented. 
       
  1142 	*/
       
  1143 	virtual TInt SetComfortNoiseGeneration(TBool aCng) = 0;
       
  1144 
       
  1145 	/**
       
  1146 	Used to find out if comfort noise generation is enabled or not.
       
  1147 
       
  1148 	This method is allowable when decoding is not active - anytime before started or 
       
  1149 	after stopped. 
       
  1150 
       
  1151 	@param 	aCng On output ETrue = comfort noise generation enabled; EFalse = comfort 
       
  1152 	noise generation disabled
       
  1153 
       
  1154 	@return	KErrNone if successful. 
       
  1155 			KErrInUse if this method is used when encoding is active. 
       
  1156 			KErrNotSupported if this method is not implemented. 
       
  1157 	*/
       
  1158 	virtual TInt GetComfortNoiseGeneration(TBool& aCng) = 0;
       
  1159 	};
       
  1160 
       
  1161 /*****************************************************************************/
       
  1162 /**
       
  1163 UID associated with the Custom interface MIlbcEncoderIntfc
       
  1164 
       
  1165 @publishedPartner
       
  1166 @prototype
       
  1167 */
       
  1168 const TUid KUidIlbcEncoderIntfc = {0x10282606};
       
  1169 
       
  1170 /**
       
  1171 This class provides an interface to the Ilbc encoder CMMFHwDevice in order to provide 
       
  1172 additional configuration information.
       
  1173 
       
  1174 @publishedPartner
       
  1175 @prototype
       
  1176 */
       
  1177 class MIlbcEncoderIntfc
       
  1178 	{
       
  1179 public:
       
  1180 	/** The Ibc encoder mode*/
       
  1181 	enum TEncodeMode
       
  1182         {
       
  1183         /** 20msFrame */
       
  1184         E20msFrame,
       
  1185         /** 30msFrame */
       
  1186         E30msFrame
       
  1187         };
       
  1188 
       
  1189 	/**
       
  1190 	Configures the encoder's encoding format.
       
  1191 
       
  1192 	This method is allowable when encoding is not active - anytime before started or 
       
  1193 	after stopped. 
       
  1194 
       
  1195 	@param 	aEncodeMode the encode mode.
       
  1196 
       
  1197 	@return	KErrNone if successful. 
       
  1198 			KErrInUse if this method is used when encoding is active. 
       
  1199 			KErrNotSupported if this method is not implemented. 
       
  1200 	*/
       
  1201 	virtual TInt SetEncoderMode(TEncodeMode aEncodeMode) = 0;
       
  1202 
       
  1203 	/**
       
  1204 	Controls voice activity detection (VAD) mode.
       
  1205 
       
  1206 	This method is allowable at all times - while actively encoding or not.
       
  1207 
       
  1208 	@param 	aVadModeOn ETrue=On, EFalse=Off
       
  1209 
       
  1210 	@return	KErrNone if successful. 
       
  1211 			KErrNotSupported if this method is not implemented or not supported by the encoder. 
       
  1212 	*/
       
  1213 	virtual TInt SetVadMode(TBool aVadModeOn) = 0;
       
  1214 
       
  1215 	/**
       
  1216 	Gets the encoder's current encoding format.
       
  1217 
       
  1218 	This method is allowable when encoding is not active - anytime before started or 
       
  1219 	after stopped. 
       
  1220 
       
  1221 	@param 	&aEncodeMode the encode mode.
       
  1222 
       
  1223 	@return	KErrNone if successful. 
       
  1224 			KErrInUse if this method is used when encoding is active. 
       
  1225 			KErrNotSupported if this method is not implemented. 
       
  1226 	*/
       
  1227 	virtual TInt GetEncoderMode(TEncodeMode &aEncodeMode) = 0;
       
  1228 
       
  1229 	/**
       
  1230 	Gets the current state of the voice activity detection (VAD) mode.
       
  1231 
       
  1232 	This method is allowable at all times - while actively encoding or not.
       
  1233 
       
  1234 	@param 	aVadModeOn On output ETrue=On, EFalse=Off
       
  1235 
       
  1236 	@return	KErrNone if successful. 
       
  1237 			KErrNotSupported if this method is not implemented or VAD is not supported 
       
  1238 			by the encoder. 
       
  1239 	*/
       
  1240 	virtual TInt GetVadMode(TBool& aVadModeOn) = 0;
       
  1241 	};
       
  1242 
       
  1243 /*****************************************************************************/
       
  1244 /**
       
  1245 UID associated with the Custom interface MMMFErrorConcealmentIntfc
       
  1246 
       
  1247 @publishedPartner
       
  1248 @prototype
       
  1249 */
       
  1250 const TUid KUidErrorConcealmentIntfc = {0x10282607};
       
  1251 
       
  1252 /**
       
  1253 This custom interface can be used to indicate that data has been lost. Typical usage 
       
  1254 would be during streaming. Lost packets of audio data would not get played, but the 
       
  1255 video data may still be available for playback. If video playback is synchronized to 
       
  1256 audio then this API can be used to indicate that audio data is lost so that video 
       
  1257 playback can continue. It could also be used for an audio-only source to maintain 
       
  1258 synchronization in time if data is lost.
       
  1259 
       
  1260 @publishedPartner
       
  1261 @prototype
       
  1262 */
       
  1263 class MMMFErrorConcealmentIntfc
       
  1264 	{
       
  1265 public:
       
  1266 	/**
       
  1267 	Indicates that next buffer sent to CMMFHwDevice will not contain any valid data, 
       
  1268 	and that a single frame of data has been lost, and that error concealment should 
       
  1269 	be provided for that lost frame. This method will be called after a buffer has been 
       
  1270 	received from the Hardware Device, and before it is returned to the Hardware Device.
       
  1271 
       
  1272 	@return	KErrNone if successful. 
       
  1273 			KErrInUse if this method is used out of sequence. 
       
  1274 			KErrNotSupported if this method is not implemented.
       
  1275 	*/
       
  1276 	virtual TInt ConcealErrorForNextBuffer() = 0;
       
  1277 	/**
       
  1278 	Puts the CMMFHwDevice into frame-based operation. This may be required in cases where
       
  1279 	 the decoder only supports error concealment in a frame-based mode of operation. 
       
  1280 	 Operating in frame-based mode means that the decoder requires that each buffer it 
       
  1281 	 receives contains only complete data frames. 
       
  1282 
       
  1283 	Frame mode is limited to a single frame per buffer. The alternative to frame-based mode 
       
  1284 	is buffer-based mode, the default interface for CMMFHwDevices and decoders. 
       
  1285 
       
  1286 	In buffer-based mode, complete data frames are not required to be contained within a 
       
  1287 	single buffer. A data frame may span consecutive data buffers in buffer-based mode. 
       
  1288 
       
  1289 	As it is less efficient than buffer-based mode, Frame-based mode should be used as a 
       
  1290 	less-preferred option where errors are present and the CMMFHwDevice implementation would 
       
  1291 	not be tolerant to buffer-based mode error.  This condition would be indicated by 
       
  1292 	FrameModeRqrdForEC resulting in its parameter being set to ETrue.
       
  1293   
       
  1294 	This method can be called when decoding is not active - anytime before the CMMFHwDevice 
       
  1295 	is started, or after it is stopped.
       
  1296 
       
  1297 	@param	aFrameModeOn ETrue = frame mode on; EFalse = frame mode off.
       
  1298 	
       
  1299 	@return KErrNone if successful. 
       
  1300 			KErrInUse if this method is used out of sequence. 
       
  1301 			KErrNotSupported if this method is not implemented.	
       
  1302 	*/
       
  1303 	virtual TInt SetFrameMode(TBool aFrameModeOn) = 0;
       
  1304 
       
  1305 	/**
       
  1306 	Queries the CMMFHwDevice to find out if frame mode is required by the implementing 
       
  1307 	CMMFHwDevice in order for it to support error concealment.
       
  1308 	
       
  1309 	This method is allowable when decoding is not active - anytime before the CMMFHwDevice 
       
  1310 	is started, or after it is stopped.
       
  1311 	@param	aFrameModeRqrd ETrue = frame mode required; EFalse = frame mode not required
       
  1312 	@return	KErrNone if successful. 
       
  1313 			KErrInUse if this method is used during decoding. 
       
  1314 			KErrNotSupported if this method is not implemented. 
       
  1315 	*/
       
  1316 	virtual TInt FrameModeRqrdForEC(TBool& aFrameModeRqrd) = 0;
       
  1317 	};
       
  1318 
       
  1319 /*****************************************************************************/
       
  1320 /**
       
  1321 UID associated with the Custom interface MAudioVibraControl
       
  1322 
       
  1323 @publishedPartner
       
  1324 @prototype
       
  1325 */
       
  1326 const TUid KUidAudioVibraControl = {0x10282608};
       
  1327 
       
  1328 /**
       
  1329 This class provides an interface for controlling vibra. DevSound should interpret the 
       
  1330 instantiation of this interface as a vibra control request by the user. The default vibra 
       
  1331 behavior implemented by the DevSound for the associated stream will not be performed while 
       
  1332 the user has control, In other words whilst this interface is instantiated. DevSound default vibra behavior 
       
  1333 for the associated stream will return once this interface is deleted. Other instances of 
       
  1334 DevSound may be instantiated for other audio streams at the same time. When multiple instances 
       
  1335 of DevSound are instantiated, priority and preference values are used to determine which audio 
       
  1336 streams are rendered. Prioritization of vibra control is determined by adaptation. Due to 
       
  1337 resource conflicts, and prioritization by adaptation, it may be possible that an audio stream 
       
  1338 is played, but not the vibra that accompanies that audio. For instance, if audio is mixed and 
       
  1339 two audio streams are rendered, vibra playback might not be mixed. Vibra playback may be 
       
  1340 prioritized by adaptation to a single controller. The behavior in these cases would be based 
       
  1341 on adaptation implementation. The user is not notified if vibra is not played.
       
  1342 
       
  1343 @publishedPartner
       
  1344 @prototype
       
  1345 */
       
  1346 class MAudioVibraControl 
       
  1347 	{
       
  1348 public:
       
  1349 	/** 
       
  1350 	Turns vibra on.
       
  1351 
       
  1352 	@return	KErrNone if successful KErrNotSupported if this method is not implemented.	
       
  1353 	*/
       
  1354 	virtual TInt StartVibra() = 0;
       
  1355 	
       
  1356 	/** 
       
  1357 	Turns vibra off.
       
  1358 	
       
  1359 	@return	KErrNone if successful. KErrNotSupported if this method is not implemented.	
       
  1360 	*/
       
  1361 	virtual TInt StopVibra() = 0;
       
  1362 	};
       
  1363 
       
  1364 /*****************************************************************************/
       
  1365 /**
       
  1366 UID associated with the Custom interface MMMFSampleBuffering
       
  1367 
       
  1368 @publishedPartner
       
  1369 @prototype
       
  1370 */
       
  1371 const TUid KUidSampleBuffering = {0x10282609};
       
  1372 
       
  1373 /**
       
  1374 Custom interface class to allow DevSound to support buffering of samples before playback begins. 
       
  1375 This allows playback to be more robust to underflow errors when playback begins at the expense 
       
  1376 of higher latency before playback starts.
       
  1377 
       
  1378 @publishedPartner
       
  1379 @prototype
       
  1380 */
       
  1381 class MMMFSampleBuffering
       
  1382 	{
       
  1383 public:
       
  1384 	/**
       
  1385 	Enables buffering up of samples before playback begins. This function is only effective before 
       
  1386 	CMMFDevSound::PlayInit() is called - calling the function after this will have no effect.
       
  1387 	@return  "This method may return one of the system-wide error codes."
       
  1388 	*/
       
  1389 	virtual TInt MmsbEnableSampleBufferingBeforePlayback() = 0;
       
  1390 	
       
  1391 	/**
       
  1392 	Disables buffering up of samples before playback begins. This function is only effective before 
       
  1393 	CMMFDevSound::PlayInit() is called - calling the function after this will have no effect.
       
  1394 	@return  "This method may return one of the system-wide error codes."
       
  1395 	*/
       
  1396 	virtual TInt MmsbDisableSampleBufferingBeforePlayback() = 0;
       
  1397 
       
  1398 	/**
       
  1399 	Asynchronous request that completes when Playback actually starts.
       
  1400 	@param	"aStatus" "TRequestStatus that will be completed when play actually starts"
       
  1401 	*/
       
  1402 	virtual void MmsbNotifyPlayStarted(TRequestStatus& aStatus) = 0;
       
  1403 
       
  1404 	/**
       
  1405 	Cancel any outstanding asynchronous NotifyPlayStarted requests.
       
  1406 	*/
       
  1407 	virtual void MmsbCancelNotifyPlayStarted() = 0;
       
  1408 	};
       
  1409 
       
  1410 /*****************************************************************************/
       
  1411 /**
       
  1412 UID associated with the Custom interface MMMFPlaybackStatus.
       
  1413 
       
  1414 @publishedPartner
       
  1415 @prototype
       
  1416 */
       
  1417 const TUid KUidPlaybackStatus = {0x10273811};
       
  1418 
       
  1419 /**
       
  1420 Custom interface class to enable access to the DevSound implementation to report the number of 
       
  1421 consumed input bytes, number of successfully decoded samples, samples played, system time and
       
  1422 total samples played.
       
  1423 
       
  1424 @publishedPartner
       
  1425 @prototype
       
  1426 */	
       
  1427 class MMMFPlaybackStatus
       
  1428 	{
       
  1429 public:
       
  1430 	/**  Play back status information */
       
  1431 	struct TMMFPlaybackStatus
       
  1432 		{
       
  1433 		/** Number of consumed input bytes */
       
  1434 		TInt64	aInputBytes;	
       
  1435 		/** Number of successfully decoded samples */
       
  1436 		TInt64	aDecodedSamples;		 
       
  1437 		/** Number of decoded samples played */
       
  1438 		TInt64	aDecodedSamplesPlayed;	
       
  1439 		/** Current system time */
       
  1440 		TInt64	aSystemTime;
       
  1441 		/**  Total samples played */
       
  1442 		TInt64 aTotalSamplesPlayed;
       
  1443 		};
       
  1444 	/**
       
  1445 	A method to query for detailed status information from a playing DevSound.
       
  1446 	including timestamp information from the DSP.
       
  1447 	@param  aStatus the current playback status.
       
  1448 	@return  "This method may return one of the system-wide error codes."
       
  1449 	*/
       
  1450 	virtual TInt MmpsGetPlaybackStatusInformation(TMMFPlaybackStatus& aStatus)= 0;
       
  1451 
       
  1452 	/**
       
  1453 	Request notification of loss of sync during decode - the notification will be received 
       
  1454 	in the DevSound client callback SendEventToClient with the	event type set to KMMFEventLossOfDecodeSync. 
       
  1455 	
       
  1456 	@return  "This method may return one of the system-wide error codes."
       
  1457 	*/
       
  1458 	virtual TInt MmpsRequestLossOfSyncNotification() = 0;
       
  1459 	
       
  1460 	/**
       
  1461 	Cancel the request for notification of loss of sync.
       
  1462 	
       
  1463 	@return  "This method may return one of the system-wide error codes."
       
  1464 	*/
       
  1465 	virtual TInt MmpsCancelLossOfSyncNotification() = 0;
       
  1466 	};
       
  1467 
       
  1468 /*****************************************************************************/
       
  1469 /**
       
  1470 UID associated with the Custom interface MMMFDSPControl
       
  1471 
       
  1472 @publishedPartner
       
  1473 @prototype
       
  1474 */
       
  1475 const TUid KUidDSPControl = {0x1028260A};
       
  1476 
       
  1477 /**
       
  1478 Custom interface class to allow control of DSP behaviour.
       
  1479 
       
  1480 @publishedPartner
       
  1481 @prototype
       
  1482 */		
       
  1483 class MMMFDSPControl
       
  1484 	{
       
  1485 public:
       
  1486 	
       
  1487 	/**
       
  1488 	Get the timestamp information from the DSP
       
  1489 	
       
  1490 	@param aSamplesPlayed - number of audio samples played so far.
       
  1491 	@param aSystemTime - current system time 
       
  1492 	@param aB - bytes consumed by the decoder
       
  1493 	@param aT - bytes successfully decoded by the decoder.
       
  1494 
       
  1495 	@return  "This method may return one of the system-wide error codes."
       
  1496 	*/
       
  1497 	virtual TInt MmdspcGetAudioPlaybackInfo(TInt64& aSamplesPlayed, TInt64& aSystemTime, TUint& aB, TUint& aT) = 0;
       
  1498 
       
  1499 	/**
       
  1500 	Place DevSound in a mode where overflow/underflow errors on recording are ignored.
       
  1501 	@return "This method may return one of the system-wide error codes."
       
  1502 	*/
       
  1503 	virtual TInt MmdspcAcceptRecordBuffersInvalidFollowingStop() = 0;
       
  1504 
       
  1505 	/**
       
  1506 	Place DevSound in a mode where overflow/underflow errors on playing are ignored.
       
  1507 	@return "This method may return one of the system-wide error codes."
       
  1508 	*/
       
  1509 	virtual TInt MmdspcAcceptPlaybackBuffersInvalidFollowingStop() = 0;
       
  1510 	};
       
  1511 	
       
  1512 /*****************************************************************************/
       
  1513 /**
       
  1514 UID associated with the Custom interface MMMFUnderflowAutoStopControl
       
  1515 
       
  1516 @publishedPartner
       
  1517 @prototype
       
  1518 */
       
  1519 const TUid KUidUnderflowAutoStopControl = {0x1028260B};
       
  1520 
       
  1521 /**
       
  1522 Custom interface class to control underflow behaviour.
       
  1523 
       
  1524 @publishedPartner
       
  1525 @prototype
       
  1526 */	
       
  1527 class MMMFUnderflowAutoStopControl
       
  1528 	{	
       
  1529 public:
       
  1530 	/**
       
  1531 	Turn off the default DevSound behaviour of automatically Stopping when an underflow 
       
  1532 	occurs. The underflow will be reported but play can continue when the client sends 
       
  1533 	more data - it is up to the client to call stop even in the case of end of file.
       
  1534 	
       
  1535 	@return  "This method may return one of the system-wide error codes."
       
  1536 	*/
       
  1537 	virtual TInt MmuascTurnOffUnderflowAutoStop() = 0;
       
  1538 	};
       
  1539 
       
  1540 /*****************************************************************************/
       
  1541 /**
       
  1542 UID associated with the Custom interface MMMFSetDRMProtected
       
  1543 
       
  1544 @publishedPartner
       
  1545 @prototype
       
  1546 */
       
  1547 const TUid KUidSetDRMProtected = {0x1028260C};
       
  1548 
       
  1549 /**
       
  1550 This class provides an interface to mark data being played as DRM protected.
       
  1551 
       
  1552 @publishedPartner
       
  1553 @prototype
       
  1554 */	
       
  1555 class MMMFSetDRMProtected
       
  1556 	{
       
  1557 public:
       
  1558 	/**
       
  1559 	Indicate whether the data being played is DRM protected or not
       
  1560 	 
       
  1561 	@param  aDRMProtected the required DRM state.
       
  1562 	@return  "This method may return one of the system-wide error codes."
       
  1563 	*/
       
  1564 	virtual TInt MmsdpMarkDataAsDRMProtected(TBool aDRMProtected) = 0;
       
  1565 	};
       
  1566 
       
  1567 /*****************************************************************************/
       
  1568 /**
       
  1569 UID associated with the Custom interface MMMFBufferFramesConfig.
       
  1570 
       
  1571 @publishedPartner
       
  1572 @prototype
       
  1573 */
       
  1574 const TUid KUidBufferFramesConfig = {0x1028260D};
       
  1575 
       
  1576 /**
       
  1577 This class provides an interface to configure and retrive the buffer frames.
       
  1578 
       
  1579 @publishedPartner
       
  1580 @prototype
       
  1581 */		
       
  1582 class MMMFBufferFramesConfig
       
  1583 	{
       
  1584 public:
       
  1585 	/**
       
  1586 	For use when encoding to set the number of encoded frames contained in each buffer 
       
  1587 	sent back to the client. The method should be called after CMMFDevSound::InitilaizeL 
       
  1588 	but before RecordInitL.
       
  1589 
       
  1590 	@param aFrameCount - Number of frames per buffer 
       
  1591 	@param aSamplesPerFrame - numer of samples per frame
       
  1592 	@return  "This method may return one of the system-wide error codes."
       
  1593 	*/
       
  1594 	virtual TInt MmbfcSetNumberOfFramesPerInputBuffer(TInt aFrameCount, TInt aSamplesPerFrame)=0;
       
  1595 	
       
  1596 	/**
       
  1597 	For use when decoding to set the number of encoded frames contained in each buffer sent 
       
  1598 	down to DevsSund for playback. The method should be called after CMMFDevSound::InitilaizeL 
       
  1599 	but before PlayInitL.
       
  1600 
       
  1601 	@param aFrameCount - Number of frames per buffer 
       
  1602 	@param aSamplesPerFrame - numer of samples per frame
       
  1603 	
       
  1604 	@return  "This method may return one of the system-wide error codes."
       
  1605 	*/
       
  1606 	virtual TInt MmbfcSetNumberOfFramesPerOutputBuffer(TInt aFrameCount, TInt aSamplesPerFrame)=0;
       
  1607 	};
       
  1608 
       
  1609 /*****************************************************************************/
       
  1610 /**
       
  1611 UID associated with the Custom interface MMMFGetTimestamps
       
  1612 
       
  1613 @publishedPartner
       
  1614 @prototype
       
  1615 */
       
  1616 const TUid KUidGetTimestamps = {0x1028260E};
       
  1617 
       
  1618 /**
       
  1619 This class provides an interface to configure and retrive time stamps.
       
  1620 
       
  1621 @publishedPartner
       
  1622 @prototype
       
  1623 */	
       
  1624 class MMMFGetTimestamps
       
  1625 	{
       
  1626 public:
       
  1627 	/**
       
  1628 	Enable or disable support for system timestamps during recording, used for Audio / Video sync. 
       
  1629 	This method can only be called after recording has been initialised, but before recording 
       
  1630 	has started. Once recording is underway, the setting cannot be changed.
       
  1631 
       
  1632 	@param aEnable ETrue to enable recording timestamps, EFalse to disable it.
       
  1633 
       
  1634 	@return KErrNotReady if DevSound has not yet been initialised, KErrNotSupported if 
       
  1635 	DevSound is not in recording mode or KErrInUse if recording is already underway.
       
  1636 	*/
       
  1637 	virtual TInt MmgtSetRecordSystemTimestampsEnabled(TBool aEnable) = 0;
       
  1638 
       
  1639 	/**
       
  1640 	This method returns the system timestamp corresponding to the CMMFDataBuffer with the 
       
  1641 	given position within the recording stream. This timestamp is the system time at which 
       
  1642 	the buffers timestamp, as returned by CMMFBuffer::TimeToPlay, was valid.
       
  1643 	This method can only be used if the recording timestamps were enabled before recording 
       
  1644 	started using the SetRecordSystemTimestampsEnabled method.
       
  1645 
       
  1646 	@param aBufferPosition The timestamp from the buffer, as returned by CMMFBuffer::TimeToPlay.
       
  1647 	@param aTimestamp Returns the corresponding system time, in universal time.
       
  1648 
       
  1649 	@return A System error code. 
       
  1650 			KErrNotSupported if recording is not ongoing; 
       
  1651 			KErrNotReady if DevSound is not initialized, or TimeStamps have not been enabled; 
       
  1652 			KErrNotFound if the timestamp given does not correspond to a recent record buffer.
       
  1653 	*/
       
  1654 	virtual TInt MmgtGetSystemTimestampForBuffer(const TTimeIntervalMicroSeconds& aBufferPosition, 
       
  1655 	                                                   TTime& aTimestamp) const = 0;
       
  1656 	};
       
  1657 
       
  1658 /*****************************************************************************/
       
  1659 /**
       
  1660 UID associated with the Custom interface MMMFAdvancedAACEncodeSettings
       
  1661 
       
  1662 @publishedPartner
       
  1663 @prototype
       
  1664 */
       
  1665 const TUid KUidAdvancedAACEncoderSettings = {0x102825FE};
       
  1666 
       
  1667 /**
       
  1668 Advanced AAC Encode Bit-rate Configuration
       
  1669 
       
  1670 @publishedPartner
       
  1671 @prototype
       
  1672 */
       
  1673 class MMMFAdvancedAACEncodeSettings
       
  1674 	{
       
  1675 public:
       
  1676 	/** AAC BItrate mode */
       
  1677 	enum TAACBitrateMode
       
  1678 		{
       
  1679 		/** AACBitrateModeNone */
       
  1680 		EAACBitrateModeNone,
       
  1681 		/** AACBitrateModeAbsolute */
       
  1682 		EAACBitrateModeAbsolute,
       
  1683 		/** AACBitrateModeVariable */
       
  1684 		EAACBitrateModeVariable,
       
  1685 		/** AACBitrateModeFixed */
       
  1686 		EAACBitrateModeFixed
       
  1687 		};
       
  1688 	/**
       
  1689 	SetAACEncodeBitrateMode
       
  1690 
       
  1691 	Set the bitrate mode for AAC encoding. This must be called before the encoding starts.
       
  1692 
       
  1693 	@param aBitrateMode the structure containing the additional information required for decoding the raw AAC.
       
  1694 	@return KErrNone if successful. KErrInUse if this method is used when decoding is active. 
       
  1695 	*/
       
  1696 	virtual TInt SetAACEncodeBitrateMode(TAACBitrateMode aBitrateMode)=0;
       
  1697 
       
  1698 	/**
       
  1699 	This interface returns the current AACEncoding bitrate mode.
       
  1700 
       
  1701 	@param  aBitrateMode the structure containing the additional information.
       
  1702 	@return  KErrNone if successful. KErrNotSupported if this method is not implemented.
       
  1703 	*/
       
  1704 	virtual TInt GetAACEncodeBitrateMode(TAACBitrateMode& aBitrateMode) = 0;
       
  1705 	};
       
  1706 	
       
  1707 /*****************************************************************************/
       
  1708 
       
  1709 	
       
  1710 #endif 
       
  1711