|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: MmfTsTone class member functions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "TonePlayer.h" |
|
20 #include "TemplateParameters.h" |
|
21 #include "DTMFParameters.h" |
|
22 |
|
23 |
|
24 |
|
25 const TInt CTonePlayer::KPlayerActionPlay = 1; |
|
26 const TInt CTonePlayer::KPlayerActionReportVolume = 2; |
|
27 const TInt CTonePlayer::KPlayerActionStop = 3; |
|
28 const TInt CTonePlayer::KPlayerActionCancelPrepare = 4; |
|
29 |
|
30 const TInt CTonePlayer::KPlayerActionPrepareFileSequence = 5; |
|
31 const TInt CTonePlayer::KPlayerActionPrepareFixedSequence = 6; |
|
32 const TInt CTonePlayer::KPlayerActionPrepareTone = 7; |
|
33 const TInt CTonePlayer::KPlayerActionPrepareDualTone = 8; |
|
34 const TInt CTonePlayer::KPlayerActionPrepareDTMFSequence = 9; |
|
35 const TInt CTonePlayer::KPlayerActionPrepareDesSequence = 10; |
|
36 const TInt CTonePlayer::KPlayerActionChangeVolumeToMax = 11; |
|
37 const TInt CTonePlayer::KPlayerActionChangeVolumeToAvg = 12; |
|
38 const TInt CTonePlayer::KPlayerActionChangeVolumeToZero = 13; |
|
39 // Frequency and duration of the tone to be played |
|
40 /* |
|
41 CTonePlayer::CTonePlayer(CLogger *aLogger) |
|
42 : iSupervisor(0), iId(0), iFinalError(KErrNone), iLogger(aLogger), |
|
43 iLastPrepareError(KErrNone), iPrepareCalledCounter(0), |
|
44 iExitEventTarget(0), iExitEventParameters(0) |
|
45 //, iLastPlayTime(0), iLastStopTime(0) |
|
46 { |
|
47 iFreeToPlay=EFalse; |
|
48 } |
|
49 */ |
|
50 |
|
51 /* |
|
52 CTonePlayer* CTonePlayer::NewL(CLogger *aLogger, TInt aFrequency, const TTimeIntervalMicroSeconds& aDuration, TBool aPlayInmediately) |
|
53 { |
|
54 CTonePlayer* self = NewLC(aLogger, aFrequency, aDuration, aPlayInmediately); |
|
55 CleanupStack::Pop(self); |
|
56 return self; |
|
57 } |
|
58 */ |
|
59 |
|
60 /* |
|
61 CTonePlayer* CTonePlayer::NewLC(CLogger *aLogger, TInt aFrequency, const TTimeIntervalMicroSeconds& aDuration, TBool aPlayInmediately) |
|
62 { |
|
63 CTonePlayer* self = new(ELeave)CTonePlayer(aLogger); |
|
64 CleanupStack::PushL(self); |
|
65 self->ConstructL(aFrequency, aDuration, aPlayInmediately); |
|
66 return self; |
|
67 } |
|
68 */ |
|
69 |
|
70 void CTonePlayer::ConstructL(TInt aFrequency, const TTimeIntervalMicroSeconds& aDuration, TBool aPlayInmediately) |
|
71 { |
|
72 iFrequency=aFrequency; |
|
73 iDuration=aDuration; |
|
74 iPlayInmediately=aPlayInmediately; |
|
75 iMdaAudioToneUtility = CMdaAudioToneUtility::NewL(*this); |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 // Configure the audio tone utility to play a single tone |
|
82 if (iMdaAudioToneUtility) |
|
83 { |
|
84 iMdaAudioToneUtility->PrepareToPlayTone(iFrequency, TTimeIntervalMicroSeconds(iDuration)); |
|
85 |
|
86 // const TUid KUidBassBoostEffect = {0x10203827}; |
|
87 // iMdaAudioToneUtility->CustomInterface(KUidBassBoostEffect); |
|
88 } |
|
89 else |
|
90 { //console->Printf(KNotPlayed); |
|
91 } |
|
92 ///console->Printf(KPlayed); |
|
93 } |
|
94 |
|
95 void CTonePlayer::ConstructL() |
|
96 { |
|
97 iFrequency=0; |
|
98 iDuration=0; |
|
99 iMdaAudioToneUtility = CMdaAudioToneUtility::NewL(*this); |
|
100 } |
|
101 |
|
102 /* |
|
103 CTonePlayer* CTonePlayer::NewL(CLogger *aLogger) |
|
104 { |
|
105 CTonePlayer *_self = NewLC(aLogger); |
|
106 CleanupStack::Pop(_self); |
|
107 return _self; |
|
108 } |
|
109 */ |
|
110 /* |
|
111 CTonePlayer* CTonePlayer::NewLC(CLogger *aLogger) |
|
112 { |
|
113 CTonePlayer *_self = new(ELeave)CTonePlayer(aLogger); |
|
114 CleanupStack::PushL(_self); |
|
115 _self->ConstructL(); |
|
116 return _self; |
|
117 } |
|
118 */ |
|
119 |
|
120 // /////////////////////////////////////////////////// |
|
121 CTonePlayer::CTonePlayer(COutputPrinter *aOutputPrinter) |
|
122 : iSupervisor(0), iId(0), iFinalError(KErrNone), |
|
123 iLastPrepareError(KErrNone), iPrepareCalledCounter(0), |
|
124 iExitEventTarget(0), iExitEventParameters(0), iOutputPrinter(aOutputPrinter) |
|
125 //, iLastPlayTime(0), iLastStopTime(0) |
|
126 { |
|
127 iFreeToPlay=EFalse; |
|
128 } |
|
129 |
|
130 CTonePlayer* CTonePlayer::NewL(COutputPrinter *aOutputPrinter, TInt aFrequency, const TTimeIntervalMicroSeconds& aDuration, TBool aPlayInmediately) |
|
131 { |
|
132 CTonePlayer* self = NewLC(aOutputPrinter, aFrequency, aDuration, aPlayInmediately); |
|
133 CleanupStack::Pop(self); |
|
134 return self; |
|
135 } |
|
136 |
|
137 CTonePlayer* CTonePlayer::NewLC(COutputPrinter *aOutputPrinter, TInt aFrequency, const TTimeIntervalMicroSeconds& aDuration, TBool aPlayInmediately) |
|
138 { |
|
139 CTonePlayer* self = new(ELeave)CTonePlayer(aOutputPrinter); |
|
140 CleanupStack::PushL(self); |
|
141 self->ConstructL(aFrequency, aDuration, aPlayInmediately); |
|
142 return self; |
|
143 } |
|
144 |
|
145 CTonePlayer* CTonePlayer::NewL(COutputPrinter *aOutputPrinter) |
|
146 { |
|
147 CTonePlayer *_self = NewLC(aOutputPrinter); |
|
148 CleanupStack::Pop(_self); |
|
149 return _self; |
|
150 } |
|
151 CTonePlayer* CTonePlayer::NewLC(COutputPrinter *aOutputPrinter) |
|
152 { |
|
153 CTonePlayer *_self = new(ELeave)CTonePlayer(aOutputPrinter); |
|
154 CleanupStack::PushL(_self); |
|
155 _self->ConstructL(); |
|
156 return _self; |
|
157 } |
|
158 |
|
159 // /////////////////////////////////////////////////// |
|
160 CTonePlayer::~CTonePlayer() |
|
161 { |
|
162 delete iMdaAudioToneUtility; |
|
163 iMdaAudioToneUtility = NULL; |
|
164 } |
|
165 |
|
166 void CTonePlayer::CancelPrepare() |
|
167 { |
|
168 iOutputPrinter->Printf(_L("%d) CTonePlayer::CancelPrepare()"), iId); |
|
169 iMdaAudioToneUtility->CancelPrepare(); |
|
170 } |
|
171 |
|
172 TBool CTonePlayer::Play() |
|
173 { |
|
174 iOutputPrinter->Printf(_L("%d) CTonePlayer::Play()"), iId); |
|
175 if(iFreeToPlay) |
|
176 { |
|
177 iFreeToPlay = EFalse; |
|
178 iOutputPrinter->Printf(_L("%d) CTonePlayer::Play(), Starting playback"), iId); |
|
179 iLastPlayTime.HomeTime(); |
|
180 iLastStopTime.HomeTime(); |
|
181 iMdaAudioToneUtility->Play(); |
|
182 return ETrue; |
|
183 } |
|
184 else |
|
185 { |
|
186 return EFalse; |
|
187 } |
|
188 } |
|
189 |
|
190 void CTonePlayer::Stop() |
|
191 { |
|
192 iOutputPrinter->Printf(_L("%d) CTonePlayer::Stop()"), iId); |
|
193 iMdaAudioToneUtility->CancelPlay(); |
|
194 iLastStopTime.HomeTime(); |
|
195 Exit(KErrNone); |
|
196 } |
|
197 |
|
198 void CTonePlayer::SetVolumeRamp(TTimeIntervalMicroSeconds aRamp) { iMdaAudioToneUtility->SetVolumeRamp(aRamp); } |
|
199 |
|
200 void CTonePlayer::SetVolume(TInt aVolume) { iOutputPrinter->Printf(_L("%d) CTonePlayer::SetVolume()"), iId); |
|
201 iMdaAudioToneUtility->SetVolume(aVolume); } |
|
202 |
|
203 TInt CTonePlayer::GetVolume() { return iMdaAudioToneUtility->Volume(); } |
|
204 |
|
205 TInt CTonePlayer::GetMaxVolume() { return iMdaAudioToneUtility->MaxVolume(); } |
|
206 |
|
207 void CTonePlayer::SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds &aTrailingSilence) |
|
208 { |
|
209 iMdaAudioToneUtility->SetRepeats(aRepeatNumberOfTimes,aTrailingSilence); |
|
210 } |
|
211 |
|
212 TInt CTonePlayer::GetFixedSequenceCount() |
|
213 { |
|
214 TInt Sequences = iMdaAudioToneUtility->FixedSequenceCount(); |
|
215 iOutputPrinter->Printf(_L("%d) CTonePlayer::GetFixedSequenceCount(), Number of fixed sequences: (%d)") , iId, Sequences ); |
|
216 return Sequences; |
|
217 } |
|
218 |
|
219 |
|
220 |
|
221 const TDesC &CTonePlayer::GetFixedSequenceName(TInt aSequenceNumber) |
|
222 { |
|
223 const TDesC &Name = iMdaAudioToneUtility->FixedSequenceName(aSequenceNumber); |
|
224 iOutputPrinter->Printf(_L("%d) CTonePlayer::GetFixedSequenceName(%d), result: is %S") , iId, aSequenceNumber , &Name ); |
|
225 return Name; |
|
226 } |
|
227 |
|
228 void CTonePlayer::PrepareTone(TInt aFreq, const TTimeIntervalMicroSeconds &aToneDuration, TBool aPlayInmediately) |
|
229 { |
|
230 iOutputPrinter->Printf(_L("%d) CTonePlayer::PrepareTone(%d, %d, %d)") , iId, aFreq, aToneDuration, aPlayInmediately); |
|
231 iPlayInmediately=aPlayInmediately; |
|
232 iMdaAudioToneUtility->PrepareToPlayTone(aFreq, aToneDuration); |
|
233 } |
|
234 |
|
235 void CTonePlayer::PrepareFixedSequence(TInt aSequenceNumber, TBool aPlayInmediately) |
|
236 { |
|
237 iOutputPrinter->Printf(_L("%d) CTonePlayer::PrepareFixedSequence(%d, %d)") , iId, aSequenceNumber, aPlayInmediately); |
|
238 iPlayInmediately=aPlayInmediately; |
|
239 iMdaAudioToneUtility->PrepareToPlayFixedSequence(aSequenceNumber); |
|
240 } |
|
241 |
|
242 void CTonePlayer::PrepareFixedSequenceCustomInterface(TInt aSequenceNumber, TBool aPlayInmediately) |
|
243 { |
|
244 iOutputPrinter->Printf(_L("%d) CTonePlayer::PrepareFixedSequenceCustomInterface(%d, %d)") , iId, aSequenceNumber, aPlayInmediately); |
|
245 iPlayInmediately=aPlayInmediately; |
|
246 |
|
247 |
|
248 const TUid KUidBassBoostEffect = {0x10203827}; |
|
249 iMdaAudioToneUtility->CustomInterface(KUidBassBoostEffect); |
|
250 |
|
251 iMdaAudioToneUtility->PrepareToPlayFixedSequence(aSequenceNumber); |
|
252 } |
|
253 |
|
254 void CTonePlayer::PrepareFileSequence(const TDesC &aFileName , TBool aPlayInmediately) |
|
255 { |
|
256 iOutputPrinter->Printf(_L("%d) CTonePlayer::PrepareFileSequence(%S, %d)") , iId, &aFileName, aPlayInmediately); |
|
257 iPlayInmediately=aPlayInmediately; |
|
258 iMdaAudioToneUtility->PrepareToPlayFileSequence(aFileName); |
|
259 //iMdaAudioToneUtility->PrepareToPlayDTMFString(aFileName); |
|
260 } |
|
261 |
|
262 |
|
263 void CTonePlayer::PrepareRFileSequence(const TDesC &aFileName, TBool aPlayInmediately) |
|
264 { |
|
265 iOutputPrinter->Printf(_L("%d) CTonePlayer::PrepareRFileSequence(%S, %d)") , iId, &aFileName, aPlayInmediately); |
|
266 iPlayInmediately=aPlayInmediately; |
|
267 |
|
268 RFs RFsPtr; |
|
269 RFile rfile; |
|
270 |
|
271 if( RFsPtr.Connect() == KErrNone ) |
|
272 { |
|
273 if( rfile.Open( RFsPtr, aFileName, EFileRead ) == KErrNone ) |
|
274 { |
|
275 |
|
276 iMdaAudioToneUtility->PrepareToPlayFileSequence(rfile); |
|
277 } |
|
278 } |
|
279 |
|
280 rfile.Close(); |
|
281 RFsPtr.Close(); |
|
282 |
|
283 //iMdaAudioToneUtility->PrepareToPlayDTMFString(aFileName); |
|
284 } |
|
285 |
|
286 |
|
287 void CTonePlayer::PrepareDTMFSequence(const TDesC &aSequence, TBool aPlayInmediately) |
|
288 { |
|
289 iOutputPrinter->Printf(_L("%d) CTonePlayer::PrepareDTMFSequence(%S, %d)") , iId, &aSequence, aPlayInmediately); |
|
290 iPlayInmediately=aPlayInmediately; |
|
291 iMdaAudioToneUtility->PrepareToPlayDTMFString(aSequence); |
|
292 } |
|
293 |
|
294 void CTonePlayer::PrepareDesSequence(const TDesC8 &aSequence, TBool aPlayInmediately) |
|
295 { |
|
296 iOutputPrinter->Printf(_L("%d) CTonePlayer::PrepareDesSequence(sequence, %d)") , iId, aPlayInmediately); |
|
297 iPlayInmediately=aPlayInmediately; |
|
298 iMdaAudioToneUtility->PrepareToPlayDesSequence(aSequence); |
|
299 } |
|
300 |
|
301 void CTonePlayer::PrepareDualTone(TInt aFreq1, TInt aFreq2, const TTimeIntervalMicroSeconds &aToneDuration, TBool aPlayInmediately) |
|
302 { |
|
303 iOutputPrinter->Printf(_L("%d) CTonePlayer::PrepareDualTone(%d, %d, %d, %d)") , iId, aFreq1, aFreq2, aToneDuration, aPlayInmediately); |
|
304 iPlayInmediately=aPlayInmediately; |
|
305 iMdaAudioToneUtility->PrepareToPlayDualTone(aFreq1, aFreq2, aToneDuration); |
|
306 } |
|
307 |
|
308 void CTonePlayer::SetPriority(TInt aPriority, TMdaPriorityPreference aPref) |
|
309 { |
|
310 iOutputPrinter->Printf(_L("%d) CTonePlayer::SetPriority(%d, %d)") , iId, aPriority, aPref); |
|
311 iMdaAudioToneUtility->SetPriority(aPriority, aPref); |
|
312 } |
|
313 |
|
314 void CTonePlayer::SetId(TInt aId) { iId = aId; } |
|
315 |
|
316 TInt CTonePlayer::GetId() { return iId; } |
|
317 |
|
318 TInt CTonePlayer::GetFinalError() { return iFinalError; } |
|
319 |
|
320 TInt CTonePlayer::GetLastPrepareCompleteError() {return iLastPrepareError; } |
|
321 |
|
322 TInt CTonePlayer::GetPrepareCompleteCallbackCount() {return iPrepareCalledCounter;} |
|
323 |
|
324 void CTonePlayer::SetSupervisor(TObjectCountDown *aCounter) |
|
325 { |
|
326 iSupervisor = aCounter; |
|
327 iSupervisor->NotifyCreation(); |
|
328 } |
|
329 |
|
330 void CTonePlayer::SetExitCompleteTarget(MEventTarget *aTarget, CParameters *aParameters) |
|
331 { |
|
332 iExitEventTarget = aTarget; |
|
333 iExitEventParameters = aParameters; |
|
334 } |
|
335 |
|
336 TTimeIntervalMicroSeconds CTonePlayer::GetPlayDuration() { return iLastStopTime.MicroSecondsFrom(iLastPlayTime); } |
|
337 |
|
338 TTime CTonePlayer::GetPlayStartTime() { return iLastPlayTime; } |
|
339 |
|
340 TTime CTonePlayer::GetPlayStopTime() { return iLastStopTime; } |
|
341 |
|
342 TInt CTonePlayer::GetBalanceL() |
|
343 { |
|
344 TInt retVal = iMdaAudioToneUtility->GetBalanceL(); |
|
345 return retVal; |
|
346 } |
|
347 |
|
348 void CTonePlayer::SetBalanceL(TInt aBalance) |
|
349 { |
|
350 iMdaAudioToneUtility->SetBalanceL(aBalance); |
|
351 } |
|
352 |
|
353 void CTonePlayer::SetDTMFLengths(TTimeIntervalMicroSeconds32 iToneOnLength, TTimeIntervalMicroSeconds32 iToneOffLength, TTimeIntervalMicroSeconds32 iPauseLength) |
|
354 { |
|
355 iMdaAudioToneUtility->SetDTMFLengths(iToneOnLength, iToneOffLength, iPauseLength); |
|
356 } |
|
357 |
|
358 void CTonePlayer::Exit(TInt aExitCode) |
|
359 { |
|
360 iOutputPrinter->Printf(_L("%d) CTonePlayer::Exit(%d)"), iId, aExitCode); |
|
361 iFinalError = aExitCode; |
|
362 if (iSupervisor) |
|
363 { |
|
364 iSupervisor->NotifyDestruction(); |
|
365 iSupervisor=0; |
|
366 } |
|
367 else |
|
368 { |
|
369 CActiveScheduler::Stop(); |
|
370 } |
|
371 if (iExitEventTarget && iExitEventParameters) |
|
372 { |
|
373 iExitEventTarget->ExecuteL(iExitEventParameters) ; |
|
374 } |
|
375 } |
|
376 |
|
377 |
|
378 TInt CTonePlayer::State() |
|
379 { |
|
380 return iMdaAudioToneUtility->State(); |
|
381 } |
|
382 |
|
383 // from MMdaAudioToneObserver |
|
384 void CTonePlayer::MatoPrepareComplete(TInt aError) |
|
385 { |
|
386 iLastPrepareError=aError; |
|
387 iPrepareCalledCounter++; |
|
388 iOutputPrinter->Printf(_L("%d) CTonePlayer::MatoPrepareComplete, error (%d)"), iId, aError); |
|
389 if (aError) |
|
390 { |
|
391 Exit(aError); |
|
392 } |
|
393 else |
|
394 { |
|
395 iFreeToPlay = ETrue; |
|
396 if (iPlayInmediately) |
|
397 { |
|
398 Play(); |
|
399 } |
|
400 else |
|
401 { |
|
402 CActiveScheduler::Stop(); |
|
403 } |
|
404 } |
|
405 iFinalError=aError; |
|
406 } |
|
407 |
|
408 // from MMdaAudioToneObserver |
|
409 void CTonePlayer::MatoPlayComplete(TInt aError) |
|
410 { |
|
411 iLastStopTime.HomeTime(); |
|
412 iOutputPrinter->Printf(_L("%d) CTonePlayer::MatoPlayComplete, error (%d)"), iId, aError); |
|
413 if (aError == KErrNotSupported) |
|
414 { |
|
415 iFinalError = KErrNone; |
|
416 aError = KErrNone; |
|
417 } |
|
418 else |
|
419 { |
|
420 iFinalError=aError; |
|
421 } |
|
422 iFreeToPlay = ETrue; |
|
423 Exit(aError); |
|
424 } |
|
425 |
|
426 // from MEventTarget |
|
427 TInt CTonePlayer::ExecuteL(CParameters *aParams) |
|
428 { |
|
429 switch (aParams->iAction) |
|
430 { |
|
431 case KPlayerActionPlay: |
|
432 Play(); |
|
433 break; |
|
434 case KPlayerActionReportVolume: |
|
435 iOutputPrinter->Printf(_L("%d) Retrieving volume: (%d)") , iId, GetVolume()); |
|
436 return ETrue; |
|
437 break; |
|
438 case KPlayerActionStop: |
|
439 Stop(); |
|
440 break; |
|
441 case KPlayerActionCancelPrepare: |
|
442 CancelPrepare(); |
|
443 break; |
|
444 case KPlayerActionPrepareFileSequence: |
|
445 { |
|
446 CTemplateParameters<TFileName> *fn=static_cast< CTemplateParameters<TFileName>* >(aParams); |
|
447 PrepareFileSequence(fn->GetData()); |
|
448 //(*fn).GetData(); |
|
449 break; |
|
450 } |
|
451 |
|
452 case KPlayerActionPrepareFixedSequence: |
|
453 { |
|
454 CTemplateParameters<TInt> *fs=static_cast< CTemplateParameters<TInt>* >(aParams); |
|
455 PrepareFixedSequence(fs->GetData()); |
|
456 break; |
|
457 } |
|
458 case KPlayerActionPrepareTone: |
|
459 { |
|
460 CTemplateParameters<TFixedArray<TInt64, 2> > *ToneData = static_cast< CTemplateParameters<TFixedArray<TInt64, 2> >* >(aParams); |
|
461 TFixedArray<TInt64, 2> params = ToneData->GetData(); |
|
462 //PrepareTone( params[0].GetTInt() , params[1]); |
|
463 PrepareTone( I64INT(params[0]), params[1]); |
|
464 break; |
|
465 } |
|
466 case KPlayerActionPrepareDualTone: |
|
467 { |
|
468 CTemplateParameters<TFixedArray<TInt64, 4> > *ToneData = static_cast< CTemplateParameters<TFixedArray<TInt64, 4> >* >(aParams); |
|
469 TFixedArray<TInt64, 4> params = ToneData->GetData(); |
|
470 |
|
471 PrepareDualTone( I64INT(params[0]), I64INT(params[1]), params[2],params[3]); |
|
472 break; |
|
473 } |
|
474 case KPlayerActionPrepareDTMFSequence: |
|
475 { |
|
476 //CTemplateParameters<TBufC<50> > *ToneData = static_cast< CTemplateParameters<TBufC<50> >* >(aParams); |
|
477 CDTMFParameters *params = static_cast<CDTMFParameters*>(aParams); |
|
478 |
|
479 PrepareDTMFSequence( *(params->GetDTMFString()) ); |
|
480 SetDTMFLengths(params->GetToneDuration(), params->GetToneOffDuration(), params->GetPauseDuration() ); |
|
481 break; |
|
482 } |
|
483 case KPlayerActionPrepareDesSequence: |
|
484 CTemplateParameters<HBufC8*> *params = |
|
485 static_cast<CTemplateParameters<HBufC8*> *> (aParams); |
|
486 PrepareDesSequence(*(params->GetData())); |
|
487 break; |
|
488 case KPlayerActionChangeVolumeToMax: |
|
489 { |
|
490 SetVolume( GetMaxVolume()); |
|
491 break; |
|
492 } |
|
493 case KPlayerActionChangeVolumeToAvg: |
|
494 { |
|
495 SetVolume(GetMaxVolume() / 2); |
|
496 break; |
|
497 } |
|
498 case KPlayerActionChangeVolumeToZero: |
|
499 { |
|
500 SetVolume(0); |
|
501 break; |
|
502 } |
|
503 } |
|
504 return EFalse; |
|
505 } |