sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: sl@0: sl@0: #ifndef A3FBASE_H sl@0: #define A3FBASE_H sl@0: sl@0: #include sl@0: sl@0: /** sl@0: * Provides the process id of the original application. sl@0: */ sl@0: class TClientContextSettings sl@0: { sl@0: public: sl@0: /** sl@0: * Application Process Id. sl@0: */ sl@0: TProcessId iProcessId; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * States of a stream. sl@0: */ sl@0: enum TAudioState sl@0: { sl@0: /**Uninitialized state */ sl@0: EUninitialized = 0, sl@0: /**Initialized state */ sl@0: EInitialized, sl@0: /**Idle state */ sl@0: EIdle, sl@0: /**Primed state */ sl@0: EPrimed, sl@0: /**Active state */ sl@0: EActive, sl@0: /**Dead state */ sl@0: EDead sl@0: }; sl@0: sl@0: /** sl@0: * Audio type of a stream. sl@0: */ sl@0: class TAudioTypeSettings sl@0: { sl@0: public: sl@0: /** sl@0: * Priority of client. sl@0: */ sl@0: TInt iPriority; sl@0: sl@0: /** sl@0: * The priority preference of client. sl@0: */ sl@0: TInt iPref; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * Mode setting available. sl@0: * sl@0: * "Mode" in this context refers to the number of channels (i.e. mono or stereo). sl@0: * The modes are given as UIDs. sl@0: * sl@0: */ sl@0: sl@0: /** Mono data */ sl@0: const TInt KA3FModeMonoValue = 0x1028348D; sl@0: const TUid KA3FModeMono = {KA3FModeMonoValue}; sl@0: /** Stereo data, non-interleaved */ sl@0: const TInt KA3FModeStereoNonInterleavedValue = 0x1028348E; sl@0: const TUid KA3FModeStereoNonInterleaved = {KA3FModeStereoNonInterleavedValue}; sl@0: /** Interleaved Stereo data */ sl@0: const TInt KA3FModeStereoInterleavedValue = 0x1028348F; sl@0: const TUid KA3FModeStereoInterleaved = {KA3FModeStereoInterleavedValue}; sl@0: /** 5.1 encoded data */ sl@0: const TInt KA3FMode51Value = 0x10283490; sl@0: const TUid KA3FMode51 = {KA3FMode51Value}; sl@0: sl@0: sl@0: /** sl@0: * Type class for audio channel. sl@0: */ sl@0: class TAudioChannelGain sl@0: { sl@0: public: sl@0: /** sl@0: * Location of the channel in degrees on a circle located on the same plane as the listener, sl@0: * with listener in the center of the circle. sl@0: * Negative values are used for channels the location of which is not important. sl@0: */ sl@0: TInt iLocation; sl@0: sl@0: /** sl@0: * Absolute gain value of channel. sl@0: * Allowed values are 0 - MaxGain(). sl@0: */ sl@0: TInt iGain; sl@0: sl@0: /** sl@0: * Mapping of common channels to location degrees. sl@0: */ sl@0: enum TStandardChannels sl@0: { sl@0: /** Low Frequency Effects Channels */ sl@0: ELowFrequencyEffects = -1, sl@0: /** Center Channels*/ sl@0: ECenter = 0, sl@0: /** Right Channels */ sl@0: ERight = 45, sl@0: /** Right Surround Channels */ sl@0: ERightSurround = 90, sl@0: /** Right Rear Channels */ sl@0: ERightRear = 135, sl@0: /** Rear Surround Channels */ sl@0: ERearSurround = 180, sl@0: /** Left Rear Channels */ sl@0: ELeftRear = 225, sl@0: /** Left Surround Channels */ sl@0: ELeftSurround = 270, sl@0: /** Left Channels */ sl@0: ELeft = 315 sl@0: }; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * KGainSawTooth – an explicit 0->aGain sweep, rising linearly. sl@0: * If the channel is active, the effective gain drops to 0 ASAP after the request. sl@0: * If used when the stream is not in EActive state, this acts as fade-in during the subsequent Activate() transistion. sl@0: */ sl@0: const TInt KUidGainSawToothValue = 0x10285CDC; sl@0: const TUid KUidGainSawTooth = {KUidGainSawToothValue}; sl@0: sl@0: /** sl@0: * KGainFadeOut – drop from current to 0, sl@0: * dropping linearly over aRampDuration period. sl@0: */ sl@0: const TInt KUidGainFadeOutValue = 0x10285CDD; sl@0: const TUid KUidGainFadeOut = {KUidGainFadeOutValue}; sl@0: sl@0: /** sl@0: * KGainRamped – (gradual) change from current gain values to those given in aGain over aRampDuration period sl@0: */ sl@0: const TInt KUidGainRampedValue = 0x10285CDE; sl@0: const TUid KUidGainRamped = {KUidGainRampedValue}; sl@0: sl@0: /** sl@0: * KGainContinue – if a previous ramped operation is in progress, sl@0: * this continues but the concept of “target gain” is updated sl@0: * using the new values. aRampDuration is ignored sl@0: * – the previous ramp duration is reused, minus the time already spent ramping. sl@0: * The smoothness of this operation will depend on the implementation. sl@0: * If no ramped operation is in progress, this is the same as KNullUid. sl@0: * This is intended as a way of changing gain values without stopping an ongoing ramp operation. sl@0: */ sl@0: const TInt KUidGainContinueValue = 0x10285CDF; sl@0: const TUid KUidGainContinue = {KUidGainContinueValue}; sl@0: sl@0: sl@0: const TInt KErrA3fUnsupportedRamp = (-12250); sl@0: sl@0: /** sl@0: * Represents an unique Id for a specific context at runtime. sl@0: */ sl@0: class TAudioContextId : public TObjectId sl@0: { sl@0: public: sl@0: /** sl@0: *Default constructor. sl@0: */ sl@0: TAudioContextId() {} sl@0: sl@0: /** sl@0: *Unique Id for a specific context at runtime. sl@0: *@param aId Unique id to be set. sl@0: */ sl@0: inline TAudioContextId(TUint64 aId) : TObjectId(aId) {} sl@0: }; sl@0: sl@0: /** sl@0: * Represents an unique Id for a specific audio processing unit at runtime. sl@0: */ sl@0: class TAudioComponentId : public TObjectId sl@0: { sl@0: public: sl@0: /** sl@0: * Default constructor. sl@0: */ sl@0: TAudioComponentId() {} sl@0: sl@0: /** sl@0: *Unique Id for a specific audio processing unit at runtime. sl@0: *@param aId Unique id to be set. sl@0: */ sl@0: inline TAudioComponentId(TUint64 aId) : TObjectId(aId) {} sl@0: }; sl@0: sl@0: /** sl@0: * Represents an unique Id for a specific audio stream unit at runtime. sl@0: */ sl@0: class TAudioStreamId : public TObjectId sl@0: { sl@0: public: sl@0: /** sl@0: * Default constructor. sl@0: */ sl@0: TAudioStreamId() {} sl@0: sl@0: /** sl@0: *Unique Id for a specific stream at runtime. sl@0: *@param aId Unique id to be set. sl@0: */ sl@0: inline TAudioStreamId(TUint64 aId) : TObjectId(aId) {} sl@0: }; sl@0: sl@0: sl@0: #endif // A3FBASE_H