|
1 /* |
|
2 * Copyright (c) 2004 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: Audio Stubs - Implementation of the Loudness effect Custom Interface class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifdef _DEBUG |
|
20 #include <e32svr.h> |
|
21 #endif |
|
22 #include "LoudnessCI.h" |
|
23 |
|
24 |
|
25 EXPORT_C CLoudnessCI* CLoudnessCI::NewL( |
|
26 CMMFDevSound& aDevSound ) |
|
27 { |
|
28 CLoudnessCI* self = new(ELeave) CLoudnessCI(aDevSound); |
|
29 return self; |
|
30 } |
|
31 |
|
32 CLoudnessCI::CLoudnessCI( |
|
33 CMMFDevSound& aDevSound ) |
|
34 : iDevSound(&aDevSound ) |
|
35 { |
|
36 } |
|
37 |
|
38 EXPORT_C CLoudnessCI* CLoudnessCI::NewL() |
|
39 { |
|
40 CLoudnessCI* self = new(ELeave) CLoudnessCI(); |
|
41 return self; |
|
42 } |
|
43 |
|
44 CLoudnessCI::CLoudnessCI() |
|
45 { |
|
46 } |
|
47 |
|
48 CLoudnessCI::~CLoudnessCI() |
|
49 { |
|
50 } |
|
51 |
|
52 void CLoudnessCI::ApplyL() |
|
53 { |
|
54 #ifdef _DEBUG |
|
55 RDebug::Print(_L("CLoudnessCI::ApplyL")); |
|
56 #endif |
|
57 |
|
58 if (iObservers.Count() > 0) |
|
59 { |
|
60 if(iLoudnessData.iEnabled) |
|
61 { |
|
62 iEnabled = iLoudnessData.iEnabled; |
|
63 iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KEnabled); |
|
64 } |
|
65 else |
|
66 { |
|
67 iEnabled = iLoudnessData.iEnabled; |
|
68 iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KDisabled); |
|
69 } |
|
70 |
|
71 } |
|
72 } |
|
73 |
|
74 |
|
75 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
76 |
|
77 |
|
78 |
|
79 // End of File |