os/mm/mmlibs/mmfw/inc/Mda/Common/Audio.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmlibs/mmfw/inc/Mda/Common/Audio.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,858 @@
     1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// Mda\Common\Audio.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef __MDA_COMMON_AUDIO_H__
    1.22 +#define __MDA_COMMON_AUDIO_H__
    1.23 +
    1.24 +// Standard EPOC32 includes
    1.25 +#include <e32base.h>
    1.26 +
    1.27 +// Public Media Server includes
    1.28 +#include <mda/common/base.h>
    1.29 +#include <mda/common/resource.h>
    1.30 +//#include <mda/common/controller.h>
    1.31 +#include <mda/common/audio.hrh>
    1.32 +#include <mda/common/audiostream.hrh>
    1.33 +
    1.34 +MDA_UID(KUidMdaPrioritySettings)
    1.35 +MDA_UID(KUidMdaMediaTypeAudio) // Audio data type Uid
    1.36 +MDA_UID(KUidMdaLocalSoundDevice) // Local audio stream location
    1.37 +MDA_UID(KUidMdaClipLocationMaxWriteLength)
    1.38 +MDA_UID(KUidMdaTelephonySoundDevice) // Telephony audio stream location
    1.39 +MDA_UID(KUidMdaClientPCMSoundDevice) // Client PCM audio stream location
    1.40 +MDA_UID(KUidMdaToneGeneratorDevice) // Tone Generator Device
    1.41 +MDA_UID(KUidMdaClipFormatWav) // Wav Audio Clip Format Uid
    1.42 +
    1.43 +MDA_UID(KUidMdaAudioOutputStreamDevice) // Output Stream Device
    1.44 +
    1.45 +MDA_UID(KUidMdaWavCodec) // Wav Codec Type Uid
    1.46 +MDA_UID(KUidMdaWavPcmCodec) // Wav Codec Uids
    1.47 +MDA_UID(KUidMdaWavAlawCodec) 
    1.48 +MDA_UID(KUidMdaWavMulawCodec) 
    1.49 +MDA_UID(KUidMdaWavImaAdpcmCodec) 
    1.50 +
    1.51 +
    1.52 +MDA_UID(KUidMdaClipFormatAu) // Sun/Next "Au" Audio Clip format Uid
    1.53 +MDA_UID(KUidMdaAuCodec) // Sun/Next "Au" Audio Codec Type Uid
    1.54 +MDA_UID(KUidMdaAuMulawCodec) // Sun/Next "Au" Audio Codec Uids
    1.55 +MDA_UID(KUidMdaAu8PcmCodec)  
    1.56 +MDA_UID(KUidMdaAu16PcmCodec) 
    1.57 +MDA_UID(KUidMdaAuAlawCodec)
    1.58 +
    1.59 +MDA_UID(KUidMdaClipFormatRawAudio) // Raw Audio Clip format Uid
    1.60 +MDA_UID(KUidMdaRawAudioCodec) // Raw Audio Codec Type Uid
    1.61 +MDA_UID(KUidMdaRawAudioMulawCodec)
    1.62 +MDA_UID(KUidMdaRawAudioAlawCodec) 
    1.63 +MDA_UID(KUidMdaRawAudioS8PcmCodec) // Signed 8bit
    1.64 +MDA_UID(KUidMdaRawAudioU8PcmCodec) // Unsigned 8bit
    1.65 +MDA_UID(KUidMdaRawAudioSL16PcmCodec) // Signed little-endian 16bit
    1.66 +MDA_UID(KUidMdaRawAudioSB16PcmCodec) // Signed big-endian 16bit
    1.67 +MDA_UID(KUidMdaRawAudioUL16PcmCodec) // Unsigned little-endian 16bit
    1.68 +MDA_UID(KUidMdaRawAudioUB16PcmCodec) // Unsigned big-endian 16bit
    1.69 +
    1.70 +MDA_UID(KUidMdaTelephonyStateQuery) // Telephony state query 
    1.71 +MDA_UID(KUidMdaAudioStreamVolumeRamp) // Audio stream volume ramp 
    1.72 +
    1.73 +MDA_UID(KUidMdaDataTypeSettings)
    1.74 +
    1.75 +MDA_UID(KUidMdaClipFormatRawAmr) // AMR Audio Clip Format Uid
    1.76 +MDA_UID(KUidMdaRawAmrCodec) // AMR Codec Type Uid
    1.77 +
    1.78 +/**
    1.79 +@internalComponent
    1.80 +*/
    1.81 +const TInt KMdaClipLocationMaxWriteLengthNone = -1;
    1.82 +
    1.83 +// Package classes
    1.84 +
    1.85 +/**
    1.86 +@publishedAll
    1.87 +@released
    1.88 +
    1.89 +Generic Audio Parameters
    1.90 +*/
    1.91 +class TMdaPrioritySettings : public TMdaPackage
    1.92 +	{
    1.93 +public:
    1.94 +	inline TMdaPrioritySettings();
    1.95 +public:
    1.96 +	/**
    1.97 +	Absolute priority of a client of the MMF Server.
    1.98 +
    1.99 +	Used by the policy server to determine which client should gain access to the sound device.
   1.100 +
   1.101 +	The priority which should be an integer in the range -100 to +100.
   1.102 +	*/
   1.103 +	TInt iPriority;
   1.104 +	/**
   1.105 +    The priority preference that expresses the nature of the priority that can be none, 
   1.106 +	time (or speed), quality or both time and quality.
   1.107 +	
   1.108 +	 Values are known to the adaptation and will be iterpreted accordingly.
   1.109 +
   1.110 +	*/
   1.111 +	TInt iPref;
   1.112 +	};
   1.113 +
   1.114 +/**
   1.115 +@publishedAll
   1.116 +@deprecated
   1.117 +
   1.118 +Datatype parameters.
   1.119 +
   1.120 +Base class for specific data type config packages
   1.121 +*/
   1.122 +class TMdaDatatypeSettings : public TMdaPackage
   1.123 +	{
   1.124 +protected:
   1.125 +	inline TMdaDatatypeSettings(TUid aUid,TInt aDerivedSize);
   1.126 +	};
   1.127 +
   1.128 +inline TMdaDatatypeSettings::TMdaDatatypeSettings(TUid aUid,TInt aDerivedSize) :
   1.129 +TMdaPackage(KUidMdaDataTypeSettings,aUid,aDerivedSize) {}
   1.130 +
   1.131 +/**
   1.132 +@publishedAll
   1.133 +@released
   1.134 +
   1.135 +The settings for audio data played through the media server.
   1.136 +
   1.137 +These can be the settings for an audio clip, for streamed audio data, or can be the capabilities
   1.138 +of the sound device. The sample rate and number of channels apply to the audio sample, the maximum
   1.139 +volume applies to the output device and the volume setting can apply to either, depending on the
   1.140 +device. An object of this class is a public data member of class CMdaAudioType and also can be
   1.141 +passed to CMdaAudioOutputStream::Open().
   1.142 +
   1.143 +
   1.144 +@see CMdaAudioType
   1.145 +@see CMdaAudioOutputStream::Open()
   1.146 +*/
   1.147 +class TMdaAudioDataSettings : public TMdaDatatypeSettings
   1.148 +	{
   1.149 +public:
   1.150 +	/**
   1.151 +	Audio capabilities, which include the sample rate and number of channels. The iCaps
   1.152 +	member is a combination of these flags.
   1.153 +	*/
   1.154 +	enum TAudioCaps
   1.155 +		{
   1.156 +
   1.157 +		// Sampled audio capabilities
   1.158 +
   1.159 +		/** If specified, the sample rate iSampleRate is the only one supported. If not
   1.160 +		specified, multiple sample rates may be supported.
   1.161 +		*/
   1.162 +		ESampleRateFixed =		0x00000001,
   1.163 +
   1.164 +		/** If specified, all sample rates between the minimum and the maximum are supported.
   1.165 +		*/
   1.166 +		ESampleRateAnyInRange = 0x00000002,
   1.167 +
   1.168 +		/** The audio sample supports a sample rate of 8.000KHz.
   1.169 +		*/
   1.170 +		ESampleRate8000Hz =		0x00000010,
   1.171 +
   1.172 +		/** The audio sample supports a sample rate of 11.025KHz.
   1.173 +		*/
   1.174 +		ESampleRate11025Hz =	0x00000040,
   1.175 +
   1.176 +		/** The audio sample supports a sample rate of 12.000KHz.
   1.177 +		*/
   1.178 +		ESampleRate12000Hz =	0x00000080,
   1.179 +
   1.180 +		/** The audio sample supports a sample rate of 16.000KHz.
   1.181 +		*/
   1.182 +		ESampleRate16000Hz =	0x00000100,
   1.183 +
   1.184 +		/** The audio sample supports a sample rate of 22.000KHz.
   1.185 +		*/
   1.186 +		ESampleRate22050Hz =	0x00000400,
   1.187 +
   1.188 +		/** The audio sample supports a sample rate of 24.000KHz.
   1.189 +		*/
   1.190 +		ESampleRate24000Hz =	0x00000800,
   1.191 +
   1.192 +		/** The audio sample supports a sample rate of 32.000KHz.
   1.193 +		*/
   1.194 +		ESampleRate32000Hz =	0x00001000,
   1.195 +
   1.196 +		/** The audio sample supports a sample rate of 44.100KHz.
   1.197 +		*/
   1.198 +		ESampleRate44100Hz =	0x00004000,
   1.199 +
   1.200 +		/** The audio sample supports a sample rate of 48.000KHz.
   1.201 +		*/
   1.202 +		ESampleRate48000Hz =	0x00010000,
   1.203 +
   1.204 +		/** The audio sample supports a sample rate of 96.000KHz.
   1.205 +		*/
   1.206 +		ESampleRate96000Hz =	0x00020000,
   1.207 +
   1.208 +		/** The audio sample supports a sample rate of 64.000KHz.
   1.209 +		*/
   1.210 +		ESampleRate64000Hz =	0x00040000,
   1.211 +
   1.212 +		// Channel related - applies to sampled
   1.213 +
   1.214 +		/** The audio sample supports mono.
   1.215 +		*/
   1.216 +		EChannelsMono =			0x02000000,
   1.217 +
   1.218 +		/** The audio sample supports stereo.
   1.219 +		*/
   1.220 +		EChannelsStereo =		0x04000000,
   1.221 +
   1.222 +		/** Routing related
   1.223 +		*/
   1.224 +		ERoutingControl =		0x08000000,
   1.225 +
   1.226 +		/** True if data flow is synchronised with real time (e.g. stream)
   1.227 +		*/
   1.228 +		ERealTime =				0x10000000
   1.229 +		};
   1.230 +
   1.231 +	/** Mutually exclusive flags that specify whether audio data is sent to the local device (speakers)
   1.232 +	or the network (phone line) or both. The iFlags member uses these flags.
   1.233 +	*/
   1.234 +	enum TAudioFlags
   1.235 +		{
   1.236 +
   1.237 +		/** The sound data is only sent to the network.
   1.238 +		*/
   1.239 +		ENoLocalRouting =		0x00000001,
   1.240 +
   1.241 +		/** The sound data is only sent to the local device.
   1.242 +		*/
   1.243 +		ENoNetworkRouting =		0x00000002
   1.244 +		};
   1.245 +public:
   1.246 +	inline TMdaAudioDataSettings();
   1.247 +	inline void Query(); // Call this when you just want to have caps and maxvolume filled
   1.248 +public:
   1.249 +	// Fixed values - must be queried
   1.250 +
   1.251 +	/**
   1.252 +	Specifies the capabilities of the audio sample. Its value is a combination of the flags
   1.253 +	contained in the TAudioCaps enum.
   1.254 +	*/
   1.255 +	TInt iCaps;
   1.256 +
   1.257 +	/**
   1.258 +	The maximum volume of the audio device.
   1.259 +	*/
   1.260 +	TInt iMaxVolume; // One means fixed volume (zero not valid)
   1.261 +
   1.262 +	// Variables
   1.263 +	/**
   1.264 +	The sample rate of the audio sample.
   1.265 +	*/
   1.266 +	TInt iSampleRate;
   1.267 +
   1.268 +	/**
   1.269 +	The number of channels for the audio sample.
   1.270 +	*/
   1.271 +	TInt iChannels;
   1.272 +
   1.273 +	/**
   1.274 +	The volume. Whether this applies to the audio device or to the audio sample is device-dependent.
   1.275 +	*/
   1.276 +	TInt iVolume;
   1.277 +
   1.278 +	/**
   1.279 +	The flags. Its value can be either of the flags contained in the TAudioFlags enum.
   1.280 +	*/
   1.281 +	TInt iFlags;
   1.282 +	};
   1.283 +
   1.284 +// Wav Config Packages
   1.285 +
   1.286 +/**
   1.287 +@publishedAll
   1.288 +@deprecated
   1.289 +
   1.290 +The format for .wav audio clips.
   1.291 +
   1.292 +An object of this type can be passed to CMdaAudioRecorderUtility::OpenL() or CMdaAudioConvertUtility::OpenL().
   1.293 +*/
   1.294 +class TMdaWavClipFormat : public TMdaClipFormat
   1.295 +	{
   1.296 +public:
   1.297 +	inline TMdaWavClipFormat();
   1.298 +	};
   1.299 +
   1.300 +/**
   1.301 +@publishedAll
   1.302 +@deprecated
   1.303 +
   1.304 +The base class for codecs used by .wav audio files.
   1.305 +
   1.306 +An object derived from this class can be used to specify the compression algorithm to use when recording or 
   1.307 +converting a .wav audio clip. When playing back a .wav clip, the codec is not specified: the media server
   1.308 +identifies the correct one to use.
   1.309 +*/
   1.310 +class TMdaWavCodec : public TMdaPackage
   1.311 +	{
   1.312 +public:
   1.313 +	inline TMdaWavCodec(); // Unknown type
   1.314 +protected:
   1.315 +	inline TMdaWavCodec(TUid aUid,TInt aDerivedSize);
   1.316 +	};
   1.317 +
   1.318 +/**
   1.319 +@publishedAll
   1.320 +@deprecated
   1.321 +
   1.322 +The codec for uncompressed 8 or 16 bit PCM .wav format sound data.
   1.323 +
   1.324 +This codec copies the data unchanged from source to destination.
   1.325 +*/
   1.326 +class TMdaPcmWavCodec : public TMdaWavCodec
   1.327 +	{
   1.328 +public:
   1.329 +
   1.330 +	/**
   1.331 +	Indicates whether the sound is sampled using 8 or 16 bits.
   1.332 +	*/
   1.333 +	enum TBits
   1.334 +		{
   1.335 +   		/** The sound is sampled using 8 bits.
   1.336 +		*/
   1.337 +		E8BitPcm=0,
   1.338 +
   1.339 +   		/** The sound is sampled using 16 bits.
   1.340 +		*/
   1.341 +		E16BitPcm=1
   1.342 +		};
   1.343 +public:
   1.344 +	inline TMdaPcmWavCodec(TBits aBits=E16BitPcm);
   1.345 +public:
   1.346 +	/**
   1.347 +	Indicates whether the sound is sampled using 8 or 16 bits.
   1.348 +	*/
   1.349 +	TBits iBits;
   1.350 +	};
   1.351 +
   1.352 +/**
   1.353 +@publishedAll
   1.354 +@deprecated
   1.355 +
   1.356 +The codec for .wav audio data compressed using the A-Law algorithm.
   1.357 +*/
   1.358 +class TMdaAlawWavCodec : public TMdaWavCodec
   1.359 +	{
   1.360 +public:
   1.361 +	inline TMdaAlawWavCodec();
   1.362 +	};
   1.363 +
   1.364 +/**
   1.365 +@publishedAll
   1.366 +@deprecated
   1.367 +
   1.368 +The codec for .wav audio data compressed using the mu-law algorithm.
   1.369 +*/
   1.370 +class TMdaMulawWavCodec : public TMdaWavCodec
   1.371 +	{
   1.372 +public:
   1.373 +	inline TMdaMulawWavCodec();
   1.374 +	};
   1.375 +
   1.376 +/**
   1.377 +@publishedAll
   1.378 +@deprecated
   1.379 +
   1.380 +The codec for .wav audio data compressed using the IMA-ADPCM algorithm.
   1.381 +*/
   1.382 +class TMdaImaAdpcmWavCodec : public TMdaWavCodec
   1.383 +	{
   1.384 +public:
   1.385 +	inline TMdaImaAdpcmWavCodec();
   1.386 +	};
   1.387 +
   1.388 +
   1.389 +// Sun/NeXT "Au" Config Packages
   1.390 +/**
   1.391 +@publishedAll
   1.392 +@deprecated
   1.393 +
   1.394 +The format for .au audio clips.
   1.395 +
   1.396 +An object of this type can be passed to CMdaAudioRecorderUtility::OpenL() or CMdaAudioConvertUtility::OpenL().
   1.397 +*/
   1.398 +class TMdaAuClipFormat : public TMdaClipFormat
   1.399 +	{
   1.400 +public:
   1.401 +	inline TMdaAuClipFormat();
   1.402 +	};
   1.403 +
   1.404 +/**
   1.405 +@publishedAll
   1.406 +@deprecated
   1.407 +
   1.408 +The base class for codecs used by .au audio files.
   1.409 +
   1.410 +An object derived from this class can be used to specify the compression algorithm to use when recording
   1.411 +or converting a .au audio clip (whose format is TMdaAuClipFormat). When playing back a .au clip, the
   1.412 +codec is not specified: the media server identifies the correct one to use.
   1.413 +*/
   1.414 +class TMdaAuCodec : public TMdaPackage
   1.415 +	{
   1.416 +public:
   1.417 +	inline TMdaAuCodec(); // Unknown type
   1.418 +protected:
   1.419 +	inline TMdaAuCodec(TUid aUid,TInt aDerivedSize);
   1.420 +	};
   1.421 +
   1.422 +/**
   1.423 +@publishedAll
   1.424 +@deprecated
   1.425 +
   1.426 +The codec for 8 bit PCM .au audio data.
   1.427 +*/
   1.428 +class TMdaPcm8BitAuCodec : public TMdaAuCodec
   1.429 +	{
   1.430 +public:
   1.431 +	inline TMdaPcm8BitAuCodec();
   1.432 +	};
   1.433 +
   1.434 +/**
   1.435 +@publishedAll
   1.436 +@deprecated
   1.437 +
   1.438 +The codec for 16 bit PCM .au audio data.
   1.439 +*/
   1.440 +class TMdaPcm16BitAuCodec : public TMdaAuCodec
   1.441 +	{
   1.442 +public:
   1.443 +	inline TMdaPcm16BitAuCodec();
   1.444 +	};
   1.445 +
   1.446 +/**
   1.447 +@publishedAll
   1.448 +@deprecated
   1.449 +
   1.450 +The codec for .au audio data compressed using the A-Law algorithm.
   1.451 +*/
   1.452 +class TMdaAlawAuCodec : public TMdaAuCodec
   1.453 +	{
   1.454 +public:
   1.455 +	inline TMdaAlawAuCodec();
   1.456 +	};
   1.457 +
   1.458 +/**
   1.459 +@publishedAll
   1.460 +@deprecated
   1.461 +
   1.462 +The codec for .au audio data compressed using the mu-law algorithm.
   1.463 +*/
   1.464 +class TMdaMulawAuCodec : public TMdaAuCodec
   1.465 +	{
   1.466 +public:
   1.467 +	inline TMdaMulawAuCodec();
   1.468 +	};
   1.469 +
   1.470 +// Raw Audio Config Packages
   1.471 +/**
   1.472 +@publishedAll
   1.473 +@deprecated
   1.474 +
   1.475 +Audio format for raw audio clips.
   1.476 +
   1.477 +An object of this type can be passed to CMdaAudioRecorderUtility::OpenL() or CMdaAudioConvertUtility::OpenL().
   1.478 +*/
   1.479 +class TMdaRawAudioClipFormat : public TMdaClipFormat
   1.480 +	{
   1.481 +public:
   1.482 +	inline TMdaRawAudioClipFormat();
   1.483 +	};
   1.484 +
   1.485 +/**
   1.486 +@publishedAll
   1.487 +@deprecated
   1.488 +
   1.489 +The base class for raw audio codecs.
   1.490 +
   1.491 +An object derived from this class can be used to specify the algorithm to use when opening a
   1.492 +raw audio clip (whose format is TMdaRawAudioClipFormat).
   1.493 +
   1.494 +Raw audio clips are have no header information, so that when opening one, the user must supply
   1.495 +a codec and a package containing the settings appropriate for the data in the clip.
   1.496 +
   1.497 +@see TMdaRawAudioClipFormat
   1.498 +@see CMdaAudioConvertUtility::OpenL()
   1.499 +@see CMdaAudioRecorderUtility::OpenL()
   1.500 +*/
   1.501 +class TMdaRawAudioCodec : public TMdaPackage
   1.502 +	{
   1.503 +public:
   1.504 +	inline TMdaRawAudioCodec(); // Unknown type
   1.505 +protected:
   1.506 +	inline TMdaRawAudioCodec(TUid aUid,TInt aDerivedSize);
   1.507 +	};
   1.508 +
   1.509 +/**
   1.510 +@publishedAll
   1.511 +@deprecated
   1.512 +
   1.513 +The codec for raw audio data compressed using the mu-law algorithm.
   1.514 +*/
   1.515 +class TMdaMulawRawAudioCodec : public TMdaRawAudioCodec
   1.516 +	{
   1.517 +public:
   1.518 +	inline TMdaMulawRawAudioCodec();
   1.519 +	};
   1.520 +
   1.521 +/**
   1.522 +@publishedAll
   1.523 +@deprecated
   1.524 +
   1.525 +The codec for raw audio data compressed using the A-Law algorithm.
   1.526 +*/
   1.527 +class TMdaAlawRawAudioCodec : public TMdaRawAudioCodec
   1.528 +	{
   1.529 +public:
   1.530 +	inline TMdaAlawRawAudioCodec();
   1.531 +	};
   1.532 +
   1.533 +/**
   1.534 +@publishedAll
   1.535 +@deprecated
   1.536 +
   1.537 +The codec for signed 8 bit PCM raw audio data.
   1.538 +*/
   1.539 +class TMdaS8PcmRawAudioCodec : public TMdaRawAudioCodec
   1.540 +	{
   1.541 +public:
   1.542 +	inline TMdaS8PcmRawAudioCodec();
   1.543 +	};
   1.544 +
   1.545 +/**
   1.546 +@publishedAll
   1.547 +@deprecated
   1.548 +
   1.549 +The codec for unsigned 8 bit PCM raw audio data.
   1.550 +*/
   1.551 +class TMdaU8PcmRawAudioCodec : public TMdaRawAudioCodec
   1.552 +	{
   1.553 +public:
   1.554 +	inline TMdaU8PcmRawAudioCodec();
   1.555 +	};
   1.556 +
   1.557 +/**
   1.558 +@publishedAll
   1.559 +@deprecated
   1.560 +
   1.561 +The codec for signed little-endian 16 bit PCM raw audio data.
   1.562 +*/
   1.563 +class TMdaSL16RawAudioCodec : public TMdaRawAudioCodec
   1.564 +	{
   1.565 +public:
   1.566 +	inline TMdaSL16RawAudioCodec();
   1.567 +	};
   1.568 +
   1.569 +/**
   1.570 +@publishedAll
   1.571 +@deprecated
   1.572 +
   1.573 +The codec for signed big-endian 16 bit PCM raw audio data.
   1.574 +*/
   1.575 +class TMdaSB16RawAudioCodec : public TMdaRawAudioCodec
   1.576 +	{
   1.577 +public:
   1.578 +	inline TMdaSB16RawAudioCodec();
   1.579 +	};
   1.580 +
   1.581 +/**
   1.582 +@publishedAll
   1.583 +@deprecated
   1.584 +
   1.585 +The codec for unsigned little-endian 16 bit PCM raw audio data.
   1.586 +*/
   1.587 +class TMdaUL16RawAudioCodec : public TMdaRawAudioCodec
   1.588 +	{
   1.589 +public:
   1.590 +	inline TMdaUL16RawAudioCodec();
   1.591 +	};
   1.592 +
   1.593 +/**
   1.594 +@publishedAll
   1.595 +@deprecated
   1.596 +
   1.597 +The codec for unsigned big-endian 16 bit PCM raw audio data.
   1.598 +*/
   1.599 +class TMdaUB16RawAudioCodec : public TMdaRawAudioCodec
   1.600 +	{
   1.601 +public:
   1.602 +	inline TMdaUB16RawAudioCodec();
   1.603 +	};
   1.604 +
   1.605 +/**
   1.606 +@publishedAll
   1.607 +@deprecated
   1.608 +
   1.609 +Local Audio Stream Device
   1.610 +Control local microphone/speaker audio stream
   1.611 +May not function during telephone call
   1.612 +*/
   1.613 +class TMdaLocalAudioDevice : public TMdaStreamDevice
   1.614 +	{
   1.615 +public:
   1.616 +	inline TMdaLocalAudioDevice();
   1.617 +	};
   1.618 +
   1.619 +/**
   1.620 +@publishedAll
   1.621 +@deprecated
   1.622 +
   1.623 +Telephony Audio Stream Device
   1.624 +Control telephony microphone+downlink/speaker+uplink audio stream
   1.625 +Only functional during telephone call
   1.626 +*/
   1.627 +class TMdaTelephonyAudioDevice : public TMdaStreamDevice
   1.628 +	{
   1.629 +public:
   1.630 +	inline TMdaTelephonyAudioDevice();
   1.631 +	};
   1.632 +
   1.633 +/**
   1.634 +@publishedAll
   1.635 +@deprecated
   1.636 +
   1.637 +This class is used in a ResourceConfig on a telephony port
   1.638 +to determine the current state of telephony
   1.639 +*/
   1.640 +class TMdaTelephonyStateQuery : public TMdaPackage
   1.641 +	{
   1.642 +public:
   1.643 +	inline TMdaTelephonyStateQuery();
   1.644 +public:
   1.645 +	TBool iIsTelephonyActive;
   1.646 +	};
   1.647 +
   1.648 +/**
   1.649 +@publishedAll
   1.650 +@deprecated
   1.651 +
   1.652 +Client PCM Audio Stream Device
   1.653 +Used to configure a 16bit PCM audio stream to/from client
   1.654 +*/
   1.655 +class TMdaClientPCMAudioDevice : public TMdaStreamDevice
   1.656 +	{
   1.657 +public:
   1.658 +	inline TMdaClientPCMAudioDevice();
   1.659 +	};
   1.660 +
   1.661 +
   1.662 +/**
   1.663 +@publishedAll
   1.664 +@deprecated
   1.665 +
   1.666 +Volume ramping control on audio stream devices
   1.667 +*/
   1.668 +class TMdaAudioStreamVolumeRamp : public TMdaPackage
   1.669 +	{
   1.670 +public:
   1.671 +	inline TMdaAudioStreamVolumeRamp();
   1.672 +public:
   1.673 +	TTimeIntervalMicroSeconds iDuration;
   1.674 +	};
   1.675 +
   1.676 +
   1.677 +// Inlines
   1.678 +
   1.679 +/** 
   1.680 +Default constructor. The member data is not initialised.
   1.681 +*/
   1.682 +inline TMdaAudioDataSettings::TMdaAudioDataSettings() :
   1.683 +TMdaDatatypeSettings(KUidMdaMediaTypeAudio,sizeof(TMdaAudioDataSettings)) 
   1.684 +	{
   1.685 +	Mem::FillZ(&iSampleRate,sizeof(TInt)*4);
   1.686 +	}
   1.687 +
   1.688 +/**
   1.689 +Sets the number of channels, the sample rate and the volume to KMdaUnknown (–1). Call this function when you 
   1.690 +only want to have the iCaps and iMaxVolume members filled.
   1.691 +*/
   1.692 +inline void TMdaAudioDataSettings::Query()
   1.693 +	{
   1.694 +	iChannels = KMdaUnknown;
   1.695 +	iSampleRate = KMdaUnknown;
   1.696 +	iVolume = KMdaUnknown;
   1.697 +	}// Call this when you just want to have caps and maxvolume filled
   1.698 +
   1.699 +/**
   1.700 +The default constructor initialises the object so that it can be identified by the media server.
   1.701 +*/
   1.702 +inline TMdaWavClipFormat::TMdaWavClipFormat() :
   1.703 +TMdaClipFormat(KUidMdaClipFormatWav,sizeof(TMdaWavClipFormat)) {}
   1.704 +
   1.705 +/**
   1.706 +The default constructor initialises the package so that it can be identified by the media server.
   1.707 +*/
   1.708 +inline TMdaWavCodec::TMdaWavCodec() :
   1.709 +TMdaPackage(KUidMdaWavCodec,KNullUid,sizeof(TMdaWavCodec)) {}
   1.710 +
   1.711 +inline TMdaWavCodec::TMdaWavCodec(TUid aUid, TInt aDerivedSize) :
   1.712 +TMdaPackage(KUidMdaWavCodec,aUid,aDerivedSize) {}
   1.713 +
   1.714 +/**
   1.715 +Constructs the package with a flag that indicates whether the sound is sampled using 8 or 16 bits.
   1.716 +
   1.717 +@param  aBits
   1.718 +        Indicates whether the sound is sampled using 8 or 16 bits.
   1.719 +*/
   1.720 +inline TMdaPcmWavCodec::TMdaPcmWavCodec(TBits aBits) :
   1.721 +TMdaWavCodec(KUidMdaWavPcmCodec,sizeof(TMdaPcmWavCodec)), iBits(aBits) {}
   1.722 +
   1.723 +/**
   1.724 +The default constructor initialises the package so that it can be identified by the media server.
   1.725 +*/
   1.726 +inline TMdaAlawWavCodec::TMdaAlawWavCodec() :
   1.727 +TMdaWavCodec(KUidMdaWavAlawCodec,sizeof(TMdaAlawWavCodec)) {}
   1.728 +
   1.729 +/**
   1.730 +The default constructor initialises the object so that it can be identified by the media server.
   1.731 +*/
   1.732 +inline TMdaMulawWavCodec::TMdaMulawWavCodec() :
   1.733 +TMdaWavCodec(KUidMdaWavMulawCodec,sizeof(TMdaMulawWavCodec)) {}
   1.734 +
   1.735 +/**
   1.736 +The default constructor initialises the package so that it can be identified by the media server.
   1.737 +*/
   1.738 +inline TMdaImaAdpcmWavCodec::TMdaImaAdpcmWavCodec() :
   1.739 +TMdaWavCodec(KUidMdaWavImaAdpcmCodec,sizeof(TMdaImaAdpcmWavCodec)) {}
   1.740 +
   1.741 +/**
   1.742 +The default constructor initialises the object so that it can be identified by the media server.
   1.743 +*/
   1.744 +inline TMdaAuClipFormat::TMdaAuClipFormat() :
   1.745 +TMdaClipFormat(KUidMdaClipFormatAu,sizeof(TMdaAuClipFormat)) {}
   1.746 +
   1.747 +/**
   1.748 +The default constructor initialises the package so that it can be identified by the media server.
   1.749 +*/
   1.750 +inline TMdaAuCodec::TMdaAuCodec() :
   1.751 +TMdaPackage(KUidMdaAuCodec,KNullUid,sizeof(TMdaAuCodec)) {}
   1.752 +
   1.753 +inline TMdaAuCodec::TMdaAuCodec(TUid aUid,TInt aDerivedSize) :
   1.754 +TMdaPackage(KUidMdaAuCodec,aUid,aDerivedSize) {}
   1.755 +
   1.756 +/**
   1.757 +The default constructor initialises the package so that it can be identified by the media server.
   1.758 +*/
   1.759 +inline TMdaPcm16BitAuCodec::TMdaPcm16BitAuCodec() :
   1.760 +TMdaAuCodec(KUidMdaAu16PcmCodec,sizeof(TMdaPcm16BitAuCodec)) {}
   1.761 +
   1.762 +/**
   1.763 +The default constructor initialises the package so that it can be identified by the media server.
   1.764 +*/
   1.765 +inline TMdaPcm8BitAuCodec::TMdaPcm8BitAuCodec() :
   1.766 +TMdaAuCodec(KUidMdaAu8PcmCodec,sizeof(TMdaPcm8BitAuCodec)) {}
   1.767 +
   1.768 +/**
   1.769 +The default constructor initialises the package so that it can be identified by the media server.
   1.770 +*/
   1.771 +inline TMdaAlawAuCodec::TMdaAlawAuCodec() :
   1.772 +TMdaAuCodec(KUidMdaAuAlawCodec,sizeof(TMdaAlawAuCodec)) {}
   1.773 +
   1.774 +/**
   1.775 +The default constructor initialises the object so that it can be identified by the media server.
   1.776 +*/
   1.777 +inline TMdaMulawAuCodec::TMdaMulawAuCodec() :
   1.778 +TMdaAuCodec(KUidMdaAuMulawCodec,sizeof(TMdaMulawAuCodec)) {}
   1.779 +
   1.780 +/**
   1.781 +The default constructor initialises the object so that it can be identified by the media server.
   1.782 +*/
   1.783 +inline TMdaRawAudioClipFormat::TMdaRawAudioClipFormat() :
   1.784 +TMdaClipFormat(KUidMdaClipFormatRawAudio,sizeof(TMdaRawAudioClipFormat)) {}
   1.785 +
   1.786 +/**
   1.787 +The default constructor initialises the package so that it can be identified by the media server.
   1.788 +*/
   1.789 +inline TMdaRawAudioCodec::TMdaRawAudioCodec() :
   1.790 +TMdaPackage(KUidMdaRawAudioCodec,KNullUid,sizeof(TMdaRawAudioCodec)) {}
   1.791 +
   1.792 +inline TMdaRawAudioCodec::TMdaRawAudioCodec(TUid aUid,TInt aDerivedSize) :
   1.793 +TMdaPackage(KUidMdaRawAudioCodec,aUid,aDerivedSize) {}
   1.794 +
   1.795 +/**
   1.796 +The default constructor initialises the object so that it can be identified by the media server.
   1.797 +*/
   1.798 +inline TMdaMulawRawAudioCodec::TMdaMulawRawAudioCodec() :
   1.799 +TMdaRawAudioCodec(KUidMdaRawAudioMulawCodec,sizeof(TMdaMulawRawAudioCodec)) {}
   1.800 +
   1.801 +/**
   1.802 +The default constructor initialises the package so that it can be identified by the media server.
   1.803 +*/
   1.804 +inline TMdaAlawRawAudioCodec::TMdaAlawRawAudioCodec() :
   1.805 +TMdaRawAudioCodec(KUidMdaRawAudioAlawCodec,sizeof(TMdaAlawRawAudioCodec)) {}
   1.806 +
   1.807 +/**
   1.808 +The default constructor initialises the package so that it can be identified by the media server.
   1.809 +*/
   1.810 +inline TMdaS8PcmRawAudioCodec::TMdaS8PcmRawAudioCodec() :
   1.811 +TMdaRawAudioCodec(KUidMdaRawAudioS8PcmCodec,sizeof(TMdaS8PcmRawAudioCodec)) {}
   1.812 +
   1.813 +/**
   1.814 +The default constructor initialises the package so that it can be identified by the media server.
   1.815 +*/
   1.816 +inline TMdaU8PcmRawAudioCodec::TMdaU8PcmRawAudioCodec() :
   1.817 +TMdaRawAudioCodec(KUidMdaRawAudioU8PcmCodec,sizeof(TMdaU8PcmRawAudioCodec)) {}
   1.818 +
   1.819 +/**
   1.820 +The default constructor initialises the package so that it can be identified by the media server.
   1.821 +*/
   1.822 +inline TMdaSL16RawAudioCodec::TMdaSL16RawAudioCodec() :
   1.823 +TMdaRawAudioCodec(KUidMdaRawAudioSL16PcmCodec,sizeof(TMdaSL16RawAudioCodec)) {}
   1.824 +
   1.825 +/**
   1.826 +The default constructor initialises the package so that it can be identified by the media server.
   1.827 +*/
   1.828 +inline TMdaSB16RawAudioCodec::TMdaSB16RawAudioCodec() :
   1.829 +TMdaRawAudioCodec(KUidMdaRawAudioSB16PcmCodec,sizeof(TMdaSB16RawAudioCodec)) {}
   1.830 +
   1.831 +/**
   1.832 +The default constructor initialises the package so that it can be identified by the media server.
   1.833 +*/
   1.834 +inline TMdaUL16RawAudioCodec::TMdaUL16RawAudioCodec() :
   1.835 +TMdaRawAudioCodec(KUidMdaRawAudioUL16PcmCodec,sizeof(TMdaUL16RawAudioCodec)) {}
   1.836 +
   1.837 +/**
   1.838 +The default constructor initialises the package so that it can be identified by the media server.
   1.839 +*/
   1.840 +inline TMdaUB16RawAudioCodec::TMdaUB16RawAudioCodec() :
   1.841 +TMdaRawAudioCodec(KUidMdaRawAudioUB16PcmCodec,sizeof(TMdaUB16RawAudioCodec)) {}
   1.842 +
   1.843 +inline TMdaLocalAudioDevice::TMdaLocalAudioDevice() : 
   1.844 +TMdaStreamDevice(KUidMdaLocalSoundDevice,sizeof(TMdaLocalAudioDevice)) {}
   1.845 +
   1.846 +inline TMdaTelephonyAudioDevice::TMdaTelephonyAudioDevice() : 
   1.847 +TMdaStreamDevice(KUidMdaTelephonySoundDevice,sizeof(TMdaTelephonyAudioDevice)) {}
   1.848 +
   1.849 +inline TMdaClientPCMAudioDevice::TMdaClientPCMAudioDevice() : 
   1.850 +TMdaStreamDevice(KUidMdaClientPCMSoundDevice,sizeof(TMdaClientPCMAudioDevice)) {}
   1.851 +
   1.852 +inline TMdaAudioStreamVolumeRamp::TMdaAudioStreamVolumeRamp() :
   1.853 +TMdaPackage(KUidMdaAudioStreamVolumeRamp,KUidMdaAudioStreamVolumeRamp,sizeof(TMdaAudioStreamVolumeRamp)) {}
   1.854 +
   1.855 +inline TMdaTelephonyStateQuery::TMdaTelephonyStateQuery() :
   1.856 +TMdaPackage(KUidMdaTelephonySoundDevice,KUidMdaTelephonyStateQuery,sizeof(TMdaTelephonyStateQuery)) {}
   1.857 +
   1.858 +inline TMdaPrioritySettings::TMdaPrioritySettings() :
   1.859 +TMdaPackage(KUidMdaPrioritySettings,KUidMdaPrioritySettings,sizeof(TMdaPrioritySettings)) {}
   1.860 +
   1.861 +#endif