1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/multimedia/t_soundutils.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,55 @@
1.4 +// Copyright (c) 2006-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 the License "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 +// e32test\multimedia\t_soundutils.h
1.18 +//
1.19 +//
1.20 +
1.21 +/**
1.22 + @file Definitions for utilities used by the shared chunk sound driver test code.
1.23 +*/
1.24 +
1.25 +#ifndef __T_SOUNDUTILS_H__
1.26 +#define __T_SOUNDUTILS_H__
1.27 +
1.28 +#include <d32soundsc.h>
1.29 +
1.30 +
1.31 +const TInt KTestMaxSharedChunkBuffers=16;
1.32 +class TTestSharedChunkBufConfig : public TSharedChunkBufConfigBase
1.33 + {
1.34 +public:
1.35 + TInt iBufferOffsetList[KTestMaxSharedChunkBuffers];
1.36 + };
1.37 +
1.38 +GLREF_C TInt BytesPerSample(TCurrentSoundFormatV02& aFormat);
1.39 +GLREF_C TInt RateInSamplesPerSecond(TSoundRate aRate);
1.40 +GLREF_C TInt BytesPerSecond(TCurrentSoundFormatV02& aFormat);
1.41 +GLREF_C TInt ValidBufferSize(TInt aSize,TInt aDeviceMinSize,TCurrentSoundFormatV02& aFormat);
1.42 +GLREF_C TInt MakeSineTable(TCurrentSoundFormatV02& aPlayFormat);
1.43 +GLREF_C TInt SetToneFrequency(TUint aFrequency,TCurrentSoundFormatV02& aPlayFormat);
1.44 +GLREF_C void WriteTone(TDes8& aBuffer,TCurrentSoundFormatV02& aPlayFormat);
1.45 +GLREF_C void Cleanup();
1.46 +GLREF_C void PrintCaps(TSoundFormatsSupportedV02& aCaps,RTest& aTest);
1.47 +GLREF_C void PrintConfig(TCurrentSoundFormatV02& aConfig,RTest& aTest);
1.48 +GLREF_C void PrintBufferConf(TTestSharedChunkBufConfig& aBufConf,RTest& aTest);
1.49 +
1.50 +//a panic category which the limited capability process t_sound_api_helper
1.51 +//uses to communicate back to t_sound_api.
1.52 +_LIT(KSoundAPICaps, "SoundAPICaps");
1.53 +
1.54 +_LIT(KHelperExeBase, "t_sound_api_helper.exe");
1.55 +_LIT(KHelperExe, "t_sound_api_helper_caps.exe");
1.56 +_LIT(KSysBin, "c:\\sys\\bin");
1.57 +const TInt KSlot=1; //the RProcess data slot to use when creating t_sound_api_helper_caps.exe
1.58 +#endif // __T_SOUNDUTILS_H__