kerneltest/e32test/multimedia/t_soundutils.h
changeset 43 96e5fb8b040d
equal deleted inserted replaced
-1:000000000000 43:96e5fb8b040d
       
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // e32test\multimedia\t_soundutils.h
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file Definitions for utilities used by the shared chunk sound driver test code.
       
    20 */
       
    21 
       
    22 #ifndef __T_SOUNDUTILS_H__
       
    23 #define __T_SOUNDUTILS_H__
       
    24 
       
    25 #include <d32soundsc.h>
       
    26 
       
    27 
       
    28 const TInt KTestMaxSharedChunkBuffers=16;
       
    29 class TTestSharedChunkBufConfig : public TSharedChunkBufConfigBase
       
    30 	{
       
    31 public:
       
    32 	TInt iBufferOffsetList[KTestMaxSharedChunkBuffers];
       
    33 	};
       
    34 
       
    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);	
       
    46 
       
    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");
       
    50 
       
    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__