os/mm/devsound/sounddevbt/src/swcodecwrapper/mmfBtswcodecwrapperCustomInterfaces.h
Update contrib.
1 // Copyright (c) 2005-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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __MMFBTSWCODECWRAPPERCUSTOMINTERFACES_H__
17 #define __MMFBTSWCODECWRAPPERCUSTOMINTERFACES_H__
21 * Implementation of custom interface class for play functionality created by the
22 * CMMFSwCodecWrapper::CustomInterface() method. It provides
23 * access to miscellaneous functionality such as volume settings
24 * Ports of sw codec wrapper may do this differently eg via EAP
25 * note don't use RMdaDevSound::TCurrentSoundFormatBuf so send
26 * across the sample rate and channels because 1)it would mean
27 * MmfBtSwCodecWrapper.h would have to include mdasound.h and 2)
28 * the buffer size and encoding members are not required 3)3rd party ports
29 * may not use RMdaDevSound
30 * Note also that this interface is just a simple interface to get
31 * and set values. No checking is perfomed on the values sent (hence the
32 * Set methods do not return an error code.)
35 class TPlayCustomInterface : public MPlayCustomInterface
38 TPlayCustomInterface() : iVolume(0),iBytesPlayed(0),iDevice(NULL),iRampDuration(0) {}
39 void SetVolume(TUint aVolume);
40 TUint Volume() {return iVolume;};
42 void SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) {iRampDuration = aRampDuration;};
43 TTimeIntervalMicroSeconds& VolumeRamp() {return iRampDuration;};
45 void SetDevice(CRoutingSoundPlayDevice* iDevice);//not for use outside codec wrapper
49 CRoutingSoundPlayDevice* iDevice;
50 TTimeIntervalMicroSeconds iRampDuration;
54 * Implementation of custom interface class for record functionality created by the
55 * CMMFSwCodecWrapper::CustomInterface() method. It provides
56 * access to miscelaneous functionality such as volume settings
57 * Ports of sw codec wrapper may do this differently eg via EAP
58 * note don't use RMdaDevSound::TCurrentSoundFormatBuf so send
59 * across the sample rate and channels because 1)it would mean
60 * MmfBtSwCodecWrapper.h would have to include mdasound.h and 2)
61 * the buffer size and encoding members are not required 3)3rd party ports
62 * may not use RMdaDevSound
63 * Note also that this interface is just a simple interface to get
64 * and set values. No checking is perfomed on the values sent. (hence the
65 * Set methods do not return an error code.)
68 class TRecordCustomInterface : public MRecordCustomInterface
71 TRecordCustomInterface() : iGain(0), iBytesRecorded(0), iDataPath(NULL) {}
72 void SetGain(TUint aGain) {iGain = aGain;};
73 void SetDataPath(CMMFSwCodecRecordDataPath* aDataPath){iDataPath = aDataPath;};
74 TUint Gain() {return iGain;};
75 TUint BytesRecorded();
79 CMMFSwCodecRecordDataPath* iDataPath;