sl@0
|
1 |
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef TRUEPAUSECONSTANTS_H
|
sl@0
|
17 |
#define TRUEPAUSECONSTANTS_H
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <testframework.h>
|
sl@0
|
20 |
|
sl@0
|
21 |
/*
|
sl@0
|
22 |
*========================================================================================================
|
sl@0
|
23 |
* State/Event enumerations
|
sl@0
|
24 |
*========================================================================================================
|
sl@0
|
25 |
*/
|
sl@0
|
26 |
|
sl@0
|
27 |
// MdaAudioUtility events
|
sl@0
|
28 |
enum TMdaAudioUtilityEvent
|
sl@0
|
29 |
{
|
sl@0
|
30 |
EEventInitialize = 0,
|
sl@0
|
31 |
EEventPrepareComplete,
|
sl@0
|
32 |
EEventInitComplete,
|
sl@0
|
33 |
EEventPlayComplete,
|
sl@0
|
34 |
EEventTimerComplete
|
sl@0
|
35 |
};
|
sl@0
|
36 |
|
sl@0
|
37 |
// MdaAudioUtility states
|
sl@0
|
38 |
enum TMdaAudioUtilityState
|
sl@0
|
39 |
{
|
sl@0
|
40 |
EStateInitial = 0,
|
sl@0
|
41 |
EStateCreated,
|
sl@0
|
42 |
EStateInitializing,
|
sl@0
|
43 |
EStatePlaying,
|
sl@0
|
44 |
EStateRecording,
|
sl@0
|
45 |
EStatePause,
|
sl@0
|
46 |
EStateStopped
|
sl@0
|
47 |
};
|
sl@0
|
48 |
|
sl@0
|
49 |
// MdaAudioOutputStream events
|
sl@0
|
50 |
enum TMdaAOSEvent
|
sl@0
|
51 |
{
|
sl@0
|
52 |
EEventAOSInitialize = 0,
|
sl@0
|
53 |
EEventAOSOpenComplete,
|
sl@0
|
54 |
EEventAOSPlayComplete,
|
sl@0
|
55 |
EEventAOSBufferCopied,
|
sl@0
|
56 |
EEventAOSTimerComplete
|
sl@0
|
57 |
};
|
sl@0
|
58 |
|
sl@0
|
59 |
// MdaAudioOutputStream states
|
sl@0
|
60 |
enum TMdaAOSState
|
sl@0
|
61 |
{
|
sl@0
|
62 |
EStateAOSInitial = 0,
|
sl@0
|
63 |
EStateAOSCreated,
|
sl@0
|
64 |
EStateAOSInitializing,
|
sl@0
|
65 |
EStateAOSPlaying,
|
sl@0
|
66 |
EStateAOSRecording,
|
sl@0
|
67 |
EStateAOSPause,
|
sl@0
|
68 |
EStateAOSStopped
|
sl@0
|
69 |
};
|
sl@0
|
70 |
|
sl@0
|
71 |
enum TPanicCodes
|
sl@0
|
72 |
{
|
sl@0
|
73 |
EFsmIncorrectErrorPassed = 0,
|
sl@0
|
74 |
EInvalidCallbackCall
|
sl@0
|
75 |
};
|
sl@0
|
76 |
|
sl@0
|
77 |
// User defined "MdaAudioUtility client" error codes
|
sl@0
|
78 |
enum TMdaAudioUtilityClientErrorCodes
|
sl@0
|
79 |
{
|
sl@0
|
80 |
EInvalidClientFSMEvent = 1,
|
sl@0
|
81 |
EInvalidClientFSMState,
|
sl@0
|
82 |
EReadFileErrorInClient,
|
sl@0
|
83 |
EWriteFileErrorInClient
|
sl@0
|
84 |
};
|
sl@0
|
85 |
|
sl@0
|
86 |
enum TMdaAudioUtilityTestFormat
|
sl@0
|
87 |
{
|
sl@0
|
88 |
EPCM8Format = 0,
|
sl@0
|
89 |
EPCMU16Format,
|
sl@0
|
90 |
EPCMU16BEFormat,
|
sl@0
|
91 |
EALAWFormat,
|
sl@0
|
92 |
EMULAWFormat,
|
sl@0
|
93 |
EGSM610Format,
|
sl@0
|
94 |
EIMADFormat,
|
sl@0
|
95 |
EPCMU8Format,
|
sl@0
|
96 |
EOGGFormat
|
sl@0
|
97 |
};
|
sl@0
|
98 |
|
sl@0
|
99 |
|
sl@0
|
100 |
/*
|
sl@0
|
101 |
*========================================================================================================
|
sl@0
|
102 |
* Constant declarations
|
sl@0
|
103 |
*========================================================================================================
|
sl@0
|
104 |
*/
|
sl@0
|
105 |
|
sl@0
|
106 |
const TInt KSizeBuff = 256;
|
sl@0
|
107 |
const TInt K25Percent = 4;
|
sl@0
|
108 |
const TInt KPanicLength = 16;
|
sl@0
|
109 |
const TInt KMicroSecInOneSec = 1000000;
|
sl@0
|
110 |
const TInt KMiliSecInOneSec = 1000;
|
sl@0
|
111 |
const TInt KMicroSecInHalfOneSec = 500000;
|
sl@0
|
112 |
const TInt KBalanceTolerance = 2;
|
sl@0
|
113 |
const TInt KFileFormatSize = 20;
|
sl@0
|
114 |
const TInt KVariation = KOneSecond/2; //Allow a half second variation
|
sl@0
|
115 |
const TInt KRepeatThrice = 3;
|
sl@0
|
116 |
const TInt KTimeout = 10;
|
sl@0
|
117 |
const TInt KFileDivision = 4;
|
sl@0
|
118 |
|
sl@0
|
119 |
_LIT(KMsgErrorGetParameter,"Error in getting parameter %S from INI file");
|
sl@0
|
120 |
|
sl@0
|
121 |
// Section name keys
|
sl@0
|
122 |
_LIT(KFilenameWAV, "FilenameWAV");
|
sl@0
|
123 |
_LIT(KFilenameSQN, "FilenameSQN");
|
sl@0
|
124 |
_LIT(KFilenamePCMU8, "FilenamePCMU8");
|
sl@0
|
125 |
_LIT(KFilenamePCM8, "FilenamePCM8");
|
sl@0
|
126 |
_LIT(KFilenameAlaw, "FilenameAlaw");
|
sl@0
|
127 |
_LIT(KFilenameMulaw, "FilenameMulaw");
|
sl@0
|
128 |
_LIT(KFilenamePCMU16BE, "FilenamePCMU16BE");
|
sl@0
|
129 |
_LIT(KFilenamePCMU16, "FilenamePCMU16");
|
sl@0
|
130 |
_LIT(KFilenamePCM16, "FilenamePCM16");
|
sl@0
|
131 |
_LIT(KFilenameGSM610, "FilenameGSM610");
|
sl@0
|
132 |
_LIT(KFilenameIMAD, "FilenameIMAD");
|
sl@0
|
133 |
_LIT(KFilenameOGG, "FilenameOGG");
|
sl@0
|
134 |
_LIT(KMsgDelete, "---- Deleting AudioPlayerUtility object ----");
|
sl@0
|
135 |
_LIT(KBalance, "Balance");
|
sl@0
|
136 |
_LIT(KVolume, "Volume");
|
sl@0
|
137 |
_LIT(KDuration1, "Duration1");
|
sl@0
|
138 |
_LIT(KDurationMiliSec, "DurationMiliSec");
|
sl@0
|
139 |
_LIT(KSequence, "Sequence");
|
sl@0
|
140 |
_LIT(KDuration, "Duration");
|
sl@0
|
141 |
_LIT(KPause, "Pause");
|
sl@0
|
142 |
_LIT(KRawFile, "RawFile");
|
sl@0
|
143 |
_LIT(KOggFile, "OggFile");
|
sl@0
|
144 |
|
sl@0
|
145 |
#endif// __TRUEPAUSECONSTANTS_H__
|