epoc32/include/mda/common/audio.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 audio.h
     1 // Copyright (c) 1997-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 // Mda\Common\Audio.h
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __MDA_COMMON_AUDIO_H__
       
    19 #define __MDA_COMMON_AUDIO_H__
       
    20 
       
    21 // Standard EPOC32 includes
       
    22 #include <e32base.h>
       
    23 
       
    24 // Public Media Server includes
       
    25 #include <mda/common/base.h>
       
    26 #include <mda/common/resource.h>
       
    27 //#include <mda/common/controller.h>
       
    28 #include <mda/common/audio.hrh>
       
    29 #include <mda/common/audiostream.hrh>
       
    30 
       
    31 MDA_UID(KUidMdaPrioritySettings)
       
    32 MDA_UID(KUidMdaMediaTypeAudio) // Audio data type Uid
       
    33 MDA_UID(KUidMdaLocalSoundDevice) // Local audio stream location
       
    34 MDA_UID(KUidMdaClipLocationMaxWriteLength)
       
    35 MDA_UID(KUidMdaTelephonySoundDevice) // Telephony audio stream location
       
    36 MDA_UID(KUidMdaClientPCMSoundDevice) // Client PCM audio stream location
       
    37 MDA_UID(KUidMdaToneGeneratorDevice) // Tone Generator Device
       
    38 MDA_UID(KUidMdaClipFormatWav) // Wav Audio Clip Format Uid
       
    39 
       
    40 MDA_UID(KUidMdaAudioOutputStreamDevice) // Output Stream Device
       
    41 
       
    42 MDA_UID(KUidMdaWavCodec) // Wav Codec Type Uid
       
    43 MDA_UID(KUidMdaWavPcmCodec) // Wav Codec Uids
       
    44 MDA_UID(KUidMdaWavAlawCodec) 
       
    45 MDA_UID(KUidMdaWavMulawCodec) 
       
    46 MDA_UID(KUidMdaWavImaAdpcmCodec) 
       
    47 
       
    48 
       
    49 MDA_UID(KUidMdaClipFormatAu) // Sun/Next "Au" Audio Clip format Uid
       
    50 MDA_UID(KUidMdaAuCodec) // Sun/Next "Au" Audio Codec Type Uid
       
    51 MDA_UID(KUidMdaAuMulawCodec) // Sun/Next "Au" Audio Codec Uids
       
    52 MDA_UID(KUidMdaAu8PcmCodec)  
       
    53 MDA_UID(KUidMdaAu16PcmCodec) 
       
    54 MDA_UID(KUidMdaAuAlawCodec)
       
    55 
       
    56 MDA_UID(KUidMdaClipFormatRawAudio) // Raw Audio Clip format Uid
       
    57 MDA_UID(KUidMdaRawAudioCodec) // Raw Audio Codec Type Uid
       
    58 MDA_UID(KUidMdaRawAudioMulawCodec)
       
    59 MDA_UID(KUidMdaRawAudioAlawCodec) 
       
    60 MDA_UID(KUidMdaRawAudioS8PcmCodec) // Signed 8bit
       
    61 MDA_UID(KUidMdaRawAudioU8PcmCodec) // Unsigned 8bit
       
    62 MDA_UID(KUidMdaRawAudioSL16PcmCodec) // Signed little-endian 16bit
       
    63 MDA_UID(KUidMdaRawAudioSB16PcmCodec) // Signed big-endian 16bit
       
    64 MDA_UID(KUidMdaRawAudioUL16PcmCodec) // Unsigned little-endian 16bit
       
    65 MDA_UID(KUidMdaRawAudioUB16PcmCodec) // Unsigned big-endian 16bit
       
    66 
       
    67 MDA_UID(KUidMdaTelephonyStateQuery) // Telephony state query 
       
    68 MDA_UID(KUidMdaAudioStreamVolumeRamp) // Audio stream volume ramp 
       
    69 
       
    70 MDA_UID(KUidMdaDataTypeSettings)
       
    71 
       
    72 MDA_UID(KUidMdaClipFormatRawAmr) // AMR Audio Clip Format Uid
       
    73 MDA_UID(KUidMdaRawAmrCodec) // AMR Codec Type Uid
       
    74 
       
    75 /**
       
    76 @internalComponent
       
    77 */
       
    78 const TInt KMdaClipLocationMaxWriteLengthNone = -1;
       
    79 
       
    80 // Package classes
       
    81 
       
    82 /**
       
    83 @publishedAll
       
    84 @released
       
    85 
       
    86 Generic Audio Parameters
       
    87 */
       
    88 class TMdaPrioritySettings : public TMdaPackage
       
    89 	{
       
    90 public:
       
    91 	inline TMdaPrioritySettings();
       
    92 public:
       
    93 	/**
       
    94 	Absolute priority of a client of the MMF Server.
       
    95 
       
    96 	Used by the policy server to determine which client should gain access to the sound device.
       
    97 
       
    98 	The priority which should be an integer in the range -100 to +100.
       
    99 	*/
       
   100 	TInt iPriority;
       
   101 	/**
       
   102     The priority preference that expresses the nature of the priority that can be none, 
       
   103 	time (or speed), quality or both time and quality.
       
   104 
       
   105 	If this is set to EMdaPriorityPreferenceTime then the audio data is time sensitive. The playback 
       
   106 	operation fails if it cannot happen when requested but degraded output such as mixing or muting 
       
   107 	is allowed.
       
   108 
       
   109 	If this is set to EMdaPriorityPreferenceQuality then the audio data must be played at the best possible 
       
   110 	quality (for example, it must not be degraded by muting or mixing). The playback operation is delayed
       
   111 	until the sound device is available for exclusive use.
       
   112 
       
   113 	If this is set to EMdaPriorityPreferenceTimeAndQuality then the audio data is both time and quality 
       
   114 	sensitive. The playback operation fails if it cannot happen immediately at the highest quality.
       
   115 	*/
       
   116 	TMdaPriorityPreference iPref;
       
   117 	};
       
   118 
       
   119 /**
       
   120 @publishedAll
       
   121 @deprecated
       
   122 
       
   123 Datatype parameters.
       
   124 
       
   125 Base class for specific data type config packages
       
   126 */
       
   127 class TMdaDatatypeSettings : public TMdaPackage
       
   128 	{
       
   129 protected:
       
   130 	inline TMdaDatatypeSettings(TUid aUid,TInt aDerivedSize);
       
   131 	};
       
   132 
       
   133 inline TMdaDatatypeSettings::TMdaDatatypeSettings(TUid aUid,TInt aDerivedSize) :
       
   134 TMdaPackage(KUidMdaDataTypeSettings,aUid,aDerivedSize) {}
       
   135 
       
   136 /**
       
   137 @publishedAll
       
   138 @deprecated
       
   139 
       
   140 The settings for audio data played through the media server.
       
   141 
       
   142 These can be the settings for an audio clip, for streamed audio data, or can be the capabilities
       
   143 of the sound device. The sample rate and number of channels apply to the audio sample, the maximum
       
   144 volume applies to the output device and the volume setting can apply to either, depending on the
       
   145 device. An object of this class is a public data member of class CMdaAudioType and also can be
       
   146 passed to CMdaAudioOutputStream::Open().
       
   147 
       
   148 
       
   149 @see CMdaAudioType
       
   150 @see CMdaAudioOutputStream::Open()
       
   151 */
       
   152 class TMdaAudioDataSettings : public TMdaDatatypeSettings
       
   153 	{
       
   154 public:
       
   155 	/**
       
   156 	Audio capabilities, which include the sample rate and number of channels. The iCaps
       
   157 	member is a combination of these flags.
       
   158 	*/
       
   159 	enum TAudioCaps
       
   160 		{
       
   161 
       
   162 		// Sampled audio capabilities
       
   163 
       
   164 		/** If specified, the sample rate iSampleRate is the only one supported. If not
       
   165 		specified, multiple sample rates may be supported.
       
   166 		*/
       
   167 		ESampleRateFixed =		0x00000001,
       
   168 
       
   169 		/** If specified, all sample rates between the minimum and the maximum are supported.
       
   170 		*/
       
   171 		ESampleRateAnyInRange = 0x00000002,
       
   172 
       
   173 		/** The audio sample supports a sample rate of 8.000KHz.
       
   174 		*/
       
   175 		ESampleRate8000Hz =		0x00000010,
       
   176 
       
   177 		/** The audio sample supports a sample rate of 11.025KHz.
       
   178 		*/
       
   179 		ESampleRate11025Hz =	0x00000040,
       
   180 
       
   181 		/** The audio sample supports a sample rate of 12.000KHz.
       
   182 		*/
       
   183 		ESampleRate12000Hz =	0x00000080,
       
   184 
       
   185 		/** The audio sample supports a sample rate of 16.000KHz.
       
   186 		*/
       
   187 		ESampleRate16000Hz =	0x00000100,
       
   188 
       
   189 		/** The audio sample supports a sample rate of 22.000KHz.
       
   190 		*/
       
   191 		ESampleRate22050Hz =	0x00000400,
       
   192 
       
   193 		/** The audio sample supports a sample rate of 24.000KHz.
       
   194 		*/
       
   195 		ESampleRate24000Hz =	0x00000800,
       
   196 
       
   197 		/** The audio sample supports a sample rate of 32.000KHz.
       
   198 		*/
       
   199 		ESampleRate32000Hz =	0x00001000,
       
   200 
       
   201 		/** The audio sample supports a sample rate of 44.100KHz.
       
   202 		*/
       
   203 		ESampleRate44100Hz =	0x00004000,
       
   204 
       
   205 		/** The audio sample supports a sample rate of 48.000KHz.
       
   206 		*/
       
   207 		ESampleRate48000Hz =	0x00010000,
       
   208 
       
   209 		/** The audio sample supports a sample rate of 96.000KHz.
       
   210 		*/
       
   211 		ESampleRate96000Hz =	0x00020000,
       
   212 
       
   213 		/** The audio sample supports a sample rate of 64.000KHz.
       
   214 		*/
       
   215 		ESampleRate64000Hz =	0x00040000,
       
   216 
       
   217 		// Channel related - applies to sampled
       
   218 
       
   219 		/** The audio sample supports mono.
       
   220 		*/
       
   221 		EChannelsMono =			0x02000000,
       
   222 
       
   223 		/** The audio sample supports stereo.
       
   224 		*/
       
   225 		EChannelsStereo =		0x04000000,
       
   226 
       
   227 		/** Routing related
       
   228 		*/
       
   229 		ERoutingControl =		0x08000000,
       
   230 
       
   231 		/** True if data flow is synchronised with real time (e.g. stream)
       
   232 		*/
       
   233 		ERealTime =				0x10000000
       
   234 		};
       
   235 
       
   236 	/** Mutually exclusive flags that specify whether audio data is sent to the local device (speakers)
       
   237 	or the network (phone line) or both. The iFlags member uses these flags.
       
   238 	*/
       
   239 	enum TAudioFlags
       
   240 		{
       
   241 
       
   242 		/** The sound data is only sent to the network.
       
   243 		*/
       
   244 		ENoLocalRouting =		0x00000001,
       
   245 
       
   246 		/** The sound data is only sent to the local device.
       
   247 		*/
       
   248 		ENoNetworkRouting =		0x00000002
       
   249 		};
       
   250 public:
       
   251 	inline TMdaAudioDataSettings();
       
   252 	inline void Query(); // Call this when you just want to have caps and maxvolume filled
       
   253 public:
       
   254 	// Fixed values - must be queried
       
   255 
       
   256 	/**
       
   257 	Specifies the capabilities of the audio sample. Its value is a combination of the flags
       
   258 	contained in the TAudioCaps enum.
       
   259 	*/
       
   260 	TInt iCaps;
       
   261 
       
   262 	/**
       
   263 	The maximum volume of the audio device.
       
   264 	*/
       
   265 	TInt iMaxVolume; // One means fixed volume (zero not valid)
       
   266 
       
   267 	// Variables
       
   268 	/**
       
   269 	The sample rate of the audio sample.
       
   270 	*/
       
   271 	TInt iSampleRate;
       
   272 
       
   273 	/**
       
   274 	The number of channels for the audio sample.
       
   275 	*/
       
   276 	TInt iChannels;
       
   277 
       
   278 	/**
       
   279 	The volume. Whether this applies to the audio device or to the audio sample is device-dependent.
       
   280 	*/
       
   281 	TInt iVolume;
       
   282 
       
   283 	/**
       
   284 	The flags. Its value can be either of the flags contained in the TAudioFlags enum.
       
   285 	*/
       
   286 	TInt iFlags;
       
   287 	};
       
   288 
       
   289 // Wav Config Packages
       
   290 
       
   291 /**
       
   292 @publishedAll
       
   293 @deprecated
       
   294 
       
   295 The format for .wav audio clips.
       
   296 
       
   297 An object of this type can be passed to CMdaAudioRecorderUtility::OpenL() or CMdaAudioConvertUtility::OpenL().
       
   298 */
       
   299 class TMdaWavClipFormat : public TMdaClipFormat
       
   300 	{
       
   301 public:
       
   302 	inline TMdaWavClipFormat();
       
   303 	};
       
   304 
       
   305 /**
       
   306 @publishedAll
       
   307 @deprecated
       
   308 
       
   309 The base class for codecs used by .wav audio files.
       
   310 
       
   311 An object derived from this class can be used to specify the compression algorithm to use when recording or 
       
   312 converting a .wav audio clip. When playing back a .wav clip, the codec is not specified: the media server
       
   313 identifies the correct one to use.
       
   314 */
       
   315 class TMdaWavCodec : public TMdaPackage
       
   316 	{
       
   317 public:
       
   318 	inline TMdaWavCodec(); // Unknown type
       
   319 protected:
       
   320 	inline TMdaWavCodec(TUid aUid,TInt aDerivedSize);
       
   321 	};
       
   322 
       
   323 /**
       
   324 @publishedAll
       
   325 @deprecated
       
   326 
       
   327 The codec for uncompressed 8 or 16 bit PCM .wav format sound data.
       
   328 
       
   329 This codec copies the data unchanged from source to destination.
       
   330 */
       
   331 class TMdaPcmWavCodec : public TMdaWavCodec
       
   332 	{
       
   333 public:
       
   334 
       
   335 	/**
       
   336 	Indicates whether the sound is sampled using 8 or 16 bits.
       
   337 	*/
       
   338 	enum TBits
       
   339 		{
       
   340    		/** The sound is sampled using 8 bits.
       
   341 		*/
       
   342 		E8BitPcm=0,
       
   343 
       
   344    		/** The sound is sampled using 16 bits.
       
   345 		*/
       
   346 		E16BitPcm=1
       
   347 		};
       
   348 public:
       
   349 	inline TMdaPcmWavCodec(TBits aBits=E16BitPcm);
       
   350 public:
       
   351 	/**
       
   352 	Indicates whether the sound is sampled using 8 or 16 bits.
       
   353 	*/
       
   354 	TBits iBits;
       
   355 	};
       
   356 
       
   357 /**
       
   358 @publishedAll
       
   359 @deprecated
       
   360 
       
   361 The codec for .wav audio data compressed using the A-Law algorithm.
       
   362 */
       
   363 class TMdaAlawWavCodec : public TMdaWavCodec
       
   364 	{
       
   365 public:
       
   366 	inline TMdaAlawWavCodec();
       
   367 	};
       
   368 
       
   369 /**
       
   370 @publishedAll
       
   371 @deprecated
       
   372 
       
   373 The codec for .wav audio data compressed using the mu-law algorithm.
       
   374 */
       
   375 class TMdaMulawWavCodec : public TMdaWavCodec
       
   376 	{
       
   377 public:
       
   378 	inline TMdaMulawWavCodec();
       
   379 	};
       
   380 
       
   381 /**
       
   382 @publishedAll
       
   383 @deprecated
       
   384 
       
   385 The codec for .wav audio data compressed using the IMA-ADPCM algorithm.
       
   386 */
       
   387 class TMdaImaAdpcmWavCodec : public TMdaWavCodec
       
   388 	{
       
   389 public:
       
   390 	inline TMdaImaAdpcmWavCodec();
       
   391 	};
       
   392 
       
   393 
       
   394 // Sun/NeXT "Au" Config Packages
       
   395 /**
       
   396 @publishedAll
       
   397 @deprecated
       
   398 
       
   399 The format for .au audio clips.
       
   400 
       
   401 An object of this type can be passed to CMdaAudioRecorderUtility::OpenL() or CMdaAudioConvertUtility::OpenL().
       
   402 */
       
   403 class TMdaAuClipFormat : public TMdaClipFormat
       
   404 	{
       
   405 public:
       
   406 	inline TMdaAuClipFormat();
       
   407 	};
       
   408 
       
   409 /**
       
   410 @publishedAll
       
   411 @deprecated
       
   412 
       
   413 The base class for codecs used by .au audio files.
       
   414 
       
   415 An object derived from this class can be used to specify the compression algorithm to use when recording
       
   416 or converting a .au audio clip (whose format is TMdaAuClipFormat). When playing back a .au clip, the
       
   417 codec is not specified: the media server identifies the correct one to use.
       
   418 */
       
   419 class TMdaAuCodec : public TMdaPackage
       
   420 	{
       
   421 public:
       
   422 	inline TMdaAuCodec(); // Unknown type
       
   423 protected:
       
   424 	inline TMdaAuCodec(TUid aUid,TInt aDerivedSize);
       
   425 	};
       
   426 
       
   427 /**
       
   428 @publishedAll
       
   429 @deprecated
       
   430 
       
   431 The codec for 8 bit PCM .au audio data.
       
   432 */
       
   433 class TMdaPcm8BitAuCodec : public TMdaAuCodec
       
   434 	{
       
   435 public:
       
   436 	inline TMdaPcm8BitAuCodec();
       
   437 	};
       
   438 
       
   439 /**
       
   440 @publishedAll
       
   441 @deprecated
       
   442 
       
   443 The codec for 16 bit PCM .au audio data.
       
   444 */
       
   445 class TMdaPcm16BitAuCodec : public TMdaAuCodec
       
   446 	{
       
   447 public:
       
   448 	inline TMdaPcm16BitAuCodec();
       
   449 	};
       
   450 
       
   451 /**
       
   452 @publishedAll
       
   453 @deprecated
       
   454 
       
   455 The codec for .au audio data compressed using the A-Law algorithm.
       
   456 */
       
   457 class TMdaAlawAuCodec : public TMdaAuCodec
       
   458 	{
       
   459 public:
       
   460 	inline TMdaAlawAuCodec();
       
   461 	};
       
   462 
       
   463 /**
       
   464 @publishedAll
       
   465 @deprecated
       
   466 
       
   467 The codec for .au audio data compressed using the mu-law algorithm.
       
   468 */
       
   469 class TMdaMulawAuCodec : public TMdaAuCodec
       
   470 	{
       
   471 public:
       
   472 	inline TMdaMulawAuCodec();
       
   473 	};
       
   474 
       
   475 // Raw Audio Config Packages
       
   476 /**
       
   477 @publishedAll
       
   478 @deprecated
       
   479 
       
   480 Audio format for raw audio clips.
       
   481 
       
   482 An object of this type can be passed to CMdaAudioRecorderUtility::OpenL() or CMdaAudioConvertUtility::OpenL().
       
   483 */
       
   484 class TMdaRawAudioClipFormat : public TMdaClipFormat
       
   485 	{
       
   486 public:
       
   487 	inline TMdaRawAudioClipFormat();
       
   488 	};
       
   489 
       
   490 /**
       
   491 @publishedAll
       
   492 @deprecated
       
   493 
       
   494 The base class for raw audio codecs.
       
   495 
       
   496 An object derived from this class can be used to specify the algorithm to use when opening a
       
   497 raw audio clip (whose format is TMdaRawAudioClipFormat).
       
   498 
       
   499 Raw audio clips are have no header information, so that when opening one, the user must supply
       
   500 a codec and a package containing the settings appropriate for the data in the clip.
       
   501 
       
   502 @see TMdaRawAudioClipFormat
       
   503 @see CMdaAudioConvertUtility::OpenL()
       
   504 @see CMdaAudioRecorderUtility::OpenL()
       
   505 */
       
   506 class TMdaRawAudioCodec : public TMdaPackage
       
   507 	{
       
   508 public:
       
   509 	inline TMdaRawAudioCodec(); // Unknown type
       
   510 protected:
       
   511 	inline TMdaRawAudioCodec(TUid aUid,TInt aDerivedSize);
       
   512 	};
       
   513 
       
   514 /**
       
   515 @publishedAll
       
   516 @deprecated
       
   517 
       
   518 The codec for raw audio data compressed using the mu-law algorithm.
       
   519 */
       
   520 class TMdaMulawRawAudioCodec : public TMdaRawAudioCodec
       
   521 	{
       
   522 public:
       
   523 	inline TMdaMulawRawAudioCodec();
       
   524 	};
       
   525 
       
   526 /**
       
   527 @publishedAll
       
   528 @deprecated
       
   529 
       
   530 The codec for raw audio data compressed using the A-Law algorithm.
       
   531 */
       
   532 class TMdaAlawRawAudioCodec : public TMdaRawAudioCodec
       
   533 	{
       
   534 public:
       
   535 	inline TMdaAlawRawAudioCodec();
       
   536 	};
       
   537 
       
   538 /**
       
   539 @publishedAll
       
   540 @deprecated
       
   541 
       
   542 The codec for signed 8 bit PCM raw audio data.
       
   543 */
       
   544 class TMdaS8PcmRawAudioCodec : public TMdaRawAudioCodec
       
   545 	{
       
   546 public:
       
   547 	inline TMdaS8PcmRawAudioCodec();
       
   548 	};
       
   549 
       
   550 /**
       
   551 @publishedAll
       
   552 @deprecated
       
   553 
       
   554 The codec for unsigned 8 bit PCM raw audio data.
       
   555 */
       
   556 class TMdaU8PcmRawAudioCodec : public TMdaRawAudioCodec
       
   557 	{
       
   558 public:
       
   559 	inline TMdaU8PcmRawAudioCodec();
       
   560 	};
       
   561 
       
   562 /**
       
   563 @publishedAll
       
   564 @deprecated
       
   565 
       
   566 The codec for signed little-endian 16 bit PCM raw audio data.
       
   567 */
       
   568 class TMdaSL16RawAudioCodec : public TMdaRawAudioCodec
       
   569 	{
       
   570 public:
       
   571 	inline TMdaSL16RawAudioCodec();
       
   572 	};
       
   573 
       
   574 /**
       
   575 @publishedAll
       
   576 @deprecated
       
   577 
       
   578 The codec for signed big-endian 16 bit PCM raw audio data.
       
   579 */
       
   580 class TMdaSB16RawAudioCodec : public TMdaRawAudioCodec
       
   581 	{
       
   582 public:
       
   583 	inline TMdaSB16RawAudioCodec();
       
   584 	};
       
   585 
       
   586 /**
       
   587 @publishedAll
       
   588 @deprecated
       
   589 
       
   590 The codec for unsigned little-endian 16 bit PCM raw audio data.
       
   591 */
       
   592 class TMdaUL16RawAudioCodec : public TMdaRawAudioCodec
       
   593 	{
       
   594 public:
       
   595 	inline TMdaUL16RawAudioCodec();
       
   596 	};
       
   597 
       
   598 /**
       
   599 @publishedAll
       
   600 @deprecated
       
   601 
       
   602 The codec for unsigned big-endian 16 bit PCM raw audio data.
       
   603 */
       
   604 class TMdaUB16RawAudioCodec : public TMdaRawAudioCodec
       
   605 	{
       
   606 public:
       
   607 	inline TMdaUB16RawAudioCodec();
       
   608 	};
       
   609 
       
   610 /**
       
   611 @publishedAll
       
   612 @deprecated
       
   613 
       
   614 Local Audio Stream Device
       
   615 Control local microphone/speaker audio stream
       
   616 May not function during telephone call
       
   617 */
       
   618 class TMdaLocalAudioDevice : public TMdaStreamDevice
       
   619 	{
       
   620 public:
       
   621 	inline TMdaLocalAudioDevice();
       
   622 	};
       
   623 
       
   624 /**
       
   625 @publishedAll
       
   626 @deprecated
       
   627 
       
   628 Telephony Audio Stream Device
       
   629 Control telephony microphone+downlink/speaker+uplink audio stream
       
   630 Only functional during telephone call
       
   631 */
       
   632 class TMdaTelephonyAudioDevice : public TMdaStreamDevice
       
   633 	{
       
   634 public:
       
   635 	inline TMdaTelephonyAudioDevice();
       
   636 	};
       
   637 
       
   638 /**
       
   639 @publishedAll
       
   640 @deprecated
       
   641 
       
   642 This class is used in a ResourceConfig on a telephony port
       
   643 to determine the current state of telephony
       
   644 */
       
   645 class TMdaTelephonyStateQuery : public TMdaPackage
       
   646 	{
       
   647 public:
       
   648 	inline TMdaTelephonyStateQuery();
       
   649 public:
       
   650 	TBool iIsTelephonyActive;
       
   651 	};
       
   652 
       
   653 /**
       
   654 @publishedAll
       
   655 @deprecated
       
   656 
       
   657 Client PCM Audio Stream Device
       
   658 Used to configure a 16bit PCM audio stream to/from client
       
   659 */
       
   660 class TMdaClientPCMAudioDevice : public TMdaStreamDevice
       
   661 	{
       
   662 public:
       
   663 	inline TMdaClientPCMAudioDevice();
       
   664 	};
       
   665 
       
   666 
       
   667 /**
       
   668 @publishedAll
       
   669 @deprecated
       
   670 
       
   671 Volume ramping control on audio stream devices
       
   672 */
       
   673 class TMdaAudioStreamVolumeRamp : public TMdaPackage
       
   674 	{
       
   675 public:
       
   676 	inline TMdaAudioStreamVolumeRamp();
       
   677 public:
       
   678 	TTimeIntervalMicroSeconds iDuration;
       
   679 	};
       
   680 
       
   681 
       
   682 // Inlines
       
   683 
       
   684 /** 
       
   685 Default constructor. The member data is not initialised.
       
   686 */
       
   687 inline TMdaAudioDataSettings::TMdaAudioDataSettings() :
       
   688 TMdaDatatypeSettings(KUidMdaMediaTypeAudio,sizeof(TMdaAudioDataSettings)) 
       
   689 	{
       
   690 	Mem::FillZ(&iSampleRate,sizeof(TInt)*4);
       
   691 	}
       
   692 
       
   693 /**
       
   694 Sets the number of channels, the sample rate and the volume to KMdaUnknown (–1). Call this function when you 
       
   695 only want to have the iCaps and iMaxVolume members filled.
       
   696 */
       
   697 inline void TMdaAudioDataSettings::Query()
       
   698 	{
       
   699 	iChannels = KMdaUnknown;
       
   700 	iSampleRate = KMdaUnknown;
       
   701 	iVolume = KMdaUnknown;
       
   702 	}// Call this when you just want to have caps and maxvolume filled
       
   703 
       
   704 /**
       
   705 The default constructor initialises the object so that it can be identified by the media server.
       
   706 */
       
   707 inline TMdaWavClipFormat::TMdaWavClipFormat() :
       
   708 TMdaClipFormat(KUidMdaClipFormatWav,sizeof(TMdaWavClipFormat)) {}
       
   709 
       
   710 /**
       
   711 The default constructor initialises the package so that it can be identified by the media server.
       
   712 */
       
   713 inline TMdaWavCodec::TMdaWavCodec() :
       
   714 TMdaPackage(KUidMdaWavCodec,KNullUid,sizeof(TMdaWavCodec)) {}
       
   715 
       
   716 inline TMdaWavCodec::TMdaWavCodec(TUid aUid, TInt aDerivedSize) :
       
   717 TMdaPackage(KUidMdaWavCodec,aUid,aDerivedSize) {}
       
   718 
       
   719 /**
       
   720 Constructs the package with a flag that indicates whether the sound is sampled using 8 or 16 bits.
       
   721 
       
   722 @param  aBits
       
   723         Indicates whether the sound is sampled using 8 or 16 bits.
       
   724 */
       
   725 inline TMdaPcmWavCodec::TMdaPcmWavCodec(TBits aBits) :
       
   726 TMdaWavCodec(KUidMdaWavPcmCodec,sizeof(TMdaPcmWavCodec)), iBits(aBits) {}
       
   727 
       
   728 /**
       
   729 The default constructor initialises the package so that it can be identified by the media server.
       
   730 */
       
   731 inline TMdaAlawWavCodec::TMdaAlawWavCodec() :
       
   732 TMdaWavCodec(KUidMdaWavAlawCodec,sizeof(TMdaAlawWavCodec)) {}
       
   733 
       
   734 /**
       
   735 The default constructor initialises the object so that it can be identified by the media server.
       
   736 */
       
   737 inline TMdaMulawWavCodec::TMdaMulawWavCodec() :
       
   738 TMdaWavCodec(KUidMdaWavMulawCodec,sizeof(TMdaMulawWavCodec)) {}
       
   739 
       
   740 /**
       
   741 The default constructor initialises the package so that it can be identified by the media server.
       
   742 */
       
   743 inline TMdaImaAdpcmWavCodec::TMdaImaAdpcmWavCodec() :
       
   744 TMdaWavCodec(KUidMdaWavImaAdpcmCodec,sizeof(TMdaImaAdpcmWavCodec)) {}
       
   745 
       
   746 /**
       
   747 The default constructor initialises the object so that it can be identified by the media server.
       
   748 */
       
   749 inline TMdaAuClipFormat::TMdaAuClipFormat() :
       
   750 TMdaClipFormat(KUidMdaClipFormatAu,sizeof(TMdaAuClipFormat)) {}
       
   751 
       
   752 /**
       
   753 The default constructor initialises the package so that it can be identified by the media server.
       
   754 */
       
   755 inline TMdaAuCodec::TMdaAuCodec() :
       
   756 TMdaPackage(KUidMdaAuCodec,KNullUid,sizeof(TMdaAuCodec)) {}
       
   757 
       
   758 inline TMdaAuCodec::TMdaAuCodec(TUid aUid,TInt aDerivedSize) :
       
   759 TMdaPackage(KUidMdaAuCodec,aUid,aDerivedSize) {}
       
   760 
       
   761 /**
       
   762 The default constructor initialises the package so that it can be identified by the media server.
       
   763 */
       
   764 inline TMdaPcm16BitAuCodec::TMdaPcm16BitAuCodec() :
       
   765 TMdaAuCodec(KUidMdaAu16PcmCodec,sizeof(TMdaPcm16BitAuCodec)) {}
       
   766 
       
   767 /**
       
   768 The default constructor initialises the package so that it can be identified by the media server.
       
   769 */
       
   770 inline TMdaPcm8BitAuCodec::TMdaPcm8BitAuCodec() :
       
   771 TMdaAuCodec(KUidMdaAu8PcmCodec,sizeof(TMdaPcm8BitAuCodec)) {}
       
   772 
       
   773 /**
       
   774 The default constructor initialises the package so that it can be identified by the media server.
       
   775 */
       
   776 inline TMdaAlawAuCodec::TMdaAlawAuCodec() :
       
   777 TMdaAuCodec(KUidMdaAuAlawCodec,sizeof(TMdaAlawAuCodec)) {}
       
   778 
       
   779 /**
       
   780 The default constructor initialises the object so that it can be identified by the media server.
       
   781 */
       
   782 inline TMdaMulawAuCodec::TMdaMulawAuCodec() :
       
   783 TMdaAuCodec(KUidMdaAuMulawCodec,sizeof(TMdaMulawAuCodec)) {}
       
   784 
       
   785 /**
       
   786 The default constructor initialises the object so that it can be identified by the media server.
       
   787 */
       
   788 inline TMdaRawAudioClipFormat::TMdaRawAudioClipFormat() :
       
   789 TMdaClipFormat(KUidMdaClipFormatRawAudio,sizeof(TMdaRawAudioClipFormat)) {}
       
   790 
       
   791 /**
       
   792 The default constructor initialises the package so that it can be identified by the media server.
       
   793 */
       
   794 inline TMdaRawAudioCodec::TMdaRawAudioCodec() :
       
   795 TMdaPackage(KUidMdaRawAudioCodec,KNullUid,sizeof(TMdaRawAudioCodec)) {}
       
   796 
       
   797 inline TMdaRawAudioCodec::TMdaRawAudioCodec(TUid aUid,TInt aDerivedSize) :
       
   798 TMdaPackage(KUidMdaRawAudioCodec,aUid,aDerivedSize) {}
       
   799 
       
   800 /**
       
   801 The default constructor initialises the object so that it can be identified by the media server.
       
   802 */
       
   803 inline TMdaMulawRawAudioCodec::TMdaMulawRawAudioCodec() :
       
   804 TMdaRawAudioCodec(KUidMdaRawAudioMulawCodec,sizeof(TMdaMulawRawAudioCodec)) {}
       
   805 
       
   806 /**
       
   807 The default constructor initialises the package so that it can be identified by the media server.
       
   808 */
       
   809 inline TMdaAlawRawAudioCodec::TMdaAlawRawAudioCodec() :
       
   810 TMdaRawAudioCodec(KUidMdaRawAudioAlawCodec,sizeof(TMdaAlawRawAudioCodec)) {}
       
   811 
       
   812 /**
       
   813 The default constructor initialises the package so that it can be identified by the media server.
       
   814 */
       
   815 inline TMdaS8PcmRawAudioCodec::TMdaS8PcmRawAudioCodec() :
       
   816 TMdaRawAudioCodec(KUidMdaRawAudioS8PcmCodec,sizeof(TMdaS8PcmRawAudioCodec)) {}
       
   817 
       
   818 /**
       
   819 The default constructor initialises the package so that it can be identified by the media server.
       
   820 */
       
   821 inline TMdaU8PcmRawAudioCodec::TMdaU8PcmRawAudioCodec() :
       
   822 TMdaRawAudioCodec(KUidMdaRawAudioU8PcmCodec,sizeof(TMdaU8PcmRawAudioCodec)) {}
       
   823 
       
   824 /**
       
   825 The default constructor initialises the package so that it can be identified by the media server.
       
   826 */
       
   827 inline TMdaSL16RawAudioCodec::TMdaSL16RawAudioCodec() :
       
   828 TMdaRawAudioCodec(KUidMdaRawAudioSL16PcmCodec,sizeof(TMdaSL16RawAudioCodec)) {}
       
   829 
       
   830 /**
       
   831 The default constructor initialises the package so that it can be identified by the media server.
       
   832 */
       
   833 inline TMdaSB16RawAudioCodec::TMdaSB16RawAudioCodec() :
       
   834 TMdaRawAudioCodec(KUidMdaRawAudioSB16PcmCodec,sizeof(TMdaSB16RawAudioCodec)) {}
       
   835 
       
   836 /**
       
   837 The default constructor initialises the package so that it can be identified by the media server.
       
   838 */
       
   839 inline TMdaUL16RawAudioCodec::TMdaUL16RawAudioCodec() :
       
   840 TMdaRawAudioCodec(KUidMdaRawAudioUL16PcmCodec,sizeof(TMdaUL16RawAudioCodec)) {}
       
   841 
       
   842 /**
       
   843 The default constructor initialises the package so that it can be identified by the media server.
       
   844 */
       
   845 inline TMdaUB16RawAudioCodec::TMdaUB16RawAudioCodec() :
       
   846 TMdaRawAudioCodec(KUidMdaRawAudioUB16PcmCodec,sizeof(TMdaUB16RawAudioCodec)) {}
       
   847 
       
   848 inline TMdaLocalAudioDevice::TMdaLocalAudioDevice() : 
       
   849 TMdaStreamDevice(KUidMdaLocalSoundDevice,sizeof(TMdaLocalAudioDevice)) {}
       
   850 
       
   851 inline TMdaTelephonyAudioDevice::TMdaTelephonyAudioDevice() : 
       
   852 TMdaStreamDevice(KUidMdaTelephonySoundDevice,sizeof(TMdaTelephonyAudioDevice)) {}
       
   853 
       
   854 inline TMdaClientPCMAudioDevice::TMdaClientPCMAudioDevice() : 
       
   855 TMdaStreamDevice(KUidMdaClientPCMSoundDevice,sizeof(TMdaClientPCMAudioDevice)) {}
       
   856 
       
   857 inline TMdaAudioStreamVolumeRamp::TMdaAudioStreamVolumeRamp() :
       
   858 TMdaPackage(KUidMdaAudioStreamVolumeRamp,KUidMdaAudioStreamVolumeRamp,sizeof(TMdaAudioStreamVolumeRamp)) {}
       
   859 
       
   860 inline TMdaTelephonyStateQuery::TMdaTelephonyStateQuery() :
       
   861 TMdaPackage(KUidMdaTelephonySoundDevice,KUidMdaTelephonyStateQuery,sizeof(TMdaTelephonyStateQuery)) {}
       
   862 
       
   863 inline TMdaPrioritySettings::TMdaPrioritySettings() :
       
   864 TMdaPackage(KUidMdaPrioritySettings,KUidMdaPrioritySettings,sizeof(TMdaPrioritySettings)) {}
       
   865 
       
   866 #endif