os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/audiodspcontroltestdevice.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2007-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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef AUDIODSPCONTROLTESTDEVICE_H
    17 #define AUDIODSPCONTROLTESTDEVICE_H
    18 
    19 #include <mmf/server/mmfswcodecwrapper.h>
    20 #include <mmf/server/devsoundstandardcustominterfaces.h>
    21 
    22 
    23 class CMMFAudioDspControl : public CBase,
    24 							public MMMFDSPControl
    25 	{
    26 public:
    27 	//return Pointer to the CMMFAudioDspControl class
    28 	static CMMFAudioDspControl* NewL();
    29 
    30 	//Destructor
    31 	~CMMFAudioDspControl();
    32 
    33 	//from MMMFDSPControl
    34 	TInt MmdspcGetAudioPlaybackInfo (TInt64& aSamplesPlayed, TInt64& aSystemTime, TUint& aB, TUint& aT);
    35 	TInt MmdspcAcceptRecordBuffersInvalidFollowingStop();
    36 	TInt MmdspcAcceptPlaybackBuffersInvalidFollowingStop();
    37 	};
    38 
    39 
    40 /*
    41 CAudioDspControlTestDevice
    42 
    43 Test hw device used by the
    44 TSU_MMF_DEVSOUND_CIU_SUITE unit test harness.
    45 */
    46 class CAudioDspControlTestDevice : public CMMFSwCodecWrapper,
    47 								   public MMMFDSPControl
    48 	{
    49 public:
    50 	static CMMFHwDevice* NewL();
    51 	virtual ~CAudioDspControlTestDevice();
    52 	virtual TInt Start(TDeviceFunc aFuncCmd, TDeviceFlow aFlowCmd);
    53 	virtual TInt Stop();
    54 	virtual TInt Pause();
    55 	virtual TInt Init(THwDeviceInitParams& aDevInfo);
    56 	virtual TAny* CustomInterface(TUid aInterfaceId);
    57 	virtual TInt ThisHwBufferFilled(CMMFBuffer& aFillBufferPtr);
    58 	virtual TInt ThisHwBufferEmptied(CMMFBuffer& aEmptyBufferPtr);
    59 	virtual TInt SetConfig(TTaskConfig& aConfig);
    60 	virtual TInt StopAndDeleteCodec();
    61 	virtual TInt DeleteCodec();
    62 
    63 	// from CMMFSwCodecWrapper
    64 	virtual CMMFSwCodec& Codec();
    65 
    66 	// MMMFDSPControl
    67 	TInt MmdspcGetAudioPlaybackInfo (TInt64& aSamplesPlayed, TInt64& aSystemTime, TUint& aB, TUint& aT);
    68 	TInt MmdspcAcceptRecordBuffersInvalidFollowingStop();
    69 	TInt MmdspcAcceptPlaybackBuffersInvalidFollowingStop();
    70 
    71 private:
    72 	CAudioDspControlTestDevice();
    73 	void ConstructL();
    74 
    75 private:
    76 	CMMFAudioDspControl* iAudioDspControl;
    77 	};
    78 
    79 #endif