Update contrib.
1 // Copyright (c) 2006-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 the License "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.
14 // e32test\multimedia\t_soundutils.h
19 @file Definitions for utilities used by the shared chunk sound driver test code.
22 #ifndef __T_SOUNDUTILS_H__
23 #define __T_SOUNDUTILS_H__
25 #include <d32soundsc.h>
28 const TInt KTestMaxSharedChunkBuffers=16;
29 class TTestSharedChunkBufConfig : public TSharedChunkBufConfigBase
32 TInt iBufferOffsetList[KTestMaxSharedChunkBuffers];
35 GLREF_C TInt BytesPerSample(TCurrentSoundFormatV02& aFormat);
36 GLREF_C TInt RateInSamplesPerSecond(TSoundRate aRate);
37 GLREF_C TInt BytesPerSecond(TCurrentSoundFormatV02& aFormat);
38 GLREF_C TInt ValidBufferSize(TInt aSize,TInt aDeviceMinSize,TCurrentSoundFormatV02& aFormat);
39 GLREF_C TInt MakeSineTable(TCurrentSoundFormatV02& aPlayFormat);
40 GLREF_C TInt SetToneFrequency(TUint aFrequency,TCurrentSoundFormatV02& aPlayFormat);
41 GLREF_C void WriteTone(TDes8& aBuffer,TCurrentSoundFormatV02& aPlayFormat);
42 GLREF_C void Cleanup();
43 GLREF_C void PrintCaps(TSoundFormatsSupportedV02& aCaps,RTest& aTest);
44 GLREF_C void PrintConfig(TCurrentSoundFormatV02& aConfig,RTest& aTest);
45 GLREF_C void PrintBufferConf(TTestSharedChunkBufConfig& aBufConf,RTest& aTest);
47 //a panic category which the limited capability process t_sound_api_helper
48 //uses to communicate back to t_sound_api.
49 _LIT(KSoundAPICaps, "SoundAPICaps");
51 _LIT(KHelperExeBase, "t_sound_api_helper.exe");
52 _LIT(KHelperExe, "t_sound_api_helper_caps.exe");
53 _LIT(KSysBin, "c:\\sys\\bin");
54 const TInt KSlot=1; //the RProcess data slot to use when creating t_sound_api_helper_caps.exe
55 #endif // __T_SOUNDUTILS_H__