equal
deleted
inserted
replaced
18 #include <glib.h> |
18 #include <glib.h> |
19 #include <tms.h> |
19 #include <tms.h> |
20 #include <tmsfactory.h> |
20 #include <tmsfactory.h> |
21 #include <tmsglobalvoleffect.h> |
21 #include <tmsglobalvoleffect.h> |
22 #include <tmsglobalgaineffect.h> |
22 #include <tmsglobalgaineffect.h> |
|
23 #include <tmsver.h> |
23 #include "cpeaudioeffect.h" |
24 #include "cpeaudioeffect.h" |
24 #include "pepanic.pan" |
25 #include "pepanic.pan" |
25 |
26 |
26 // ======== MEMBER FUNCTIONS ======== |
27 // ======== MEMBER FUNCTIONS ======== |
27 |
28 |
60 // Second phase constructor |
61 // Second phase constructor |
61 // --------------------------------------------------------------------------- |
62 // --------------------------------------------------------------------------- |
62 // |
63 // |
63 void CPEAudioEffect::ConstructL(TMSEffectObserver& aObserver) |
64 void CPEAudioEffect::ConstructL(TMSEffectObserver& aObserver) |
64 { |
65 { |
65 TMSVer* v = NULL; |
|
66 TInt err(KErrNotFound); |
66 TInt err(KErrNotFound); |
67 TMSFactory::CreateFactory(iFactory, *v); |
67 TMSVer v(2,0,0); |
|
68 TMSFactory::CreateFactory(iFactory, v); |
68 if (iFactory) |
69 if (iFactory) |
69 { |
70 { |
70 err = iFactory->CreateEffect(TMS_EFFECT_GLOBAL_GAIN, iGlobalGain); |
71 err = iFactory->CreateEffect(TMS_EFFECT_GLOBAL_GAIN, iGlobalGain); |
71 err |= iFactory->CreateEffect(TMS_EFFECT_GLOBAL_VOL, iGlobalVol); |
72 err |= iFactory->CreateEffect(TMS_EFFECT_GLOBAL_VOL, iGlobalVol); |
72 } |
73 } |
83 // Destructor |
84 // Destructor |
84 // --------------------------------------------------------------------------- |
85 // --------------------------------------------------------------------------- |
85 // |
86 // |
86 CPEAudioEffect::~CPEAudioEffect() |
87 CPEAudioEffect::~CPEAudioEffect() |
87 { |
88 { |
88 iFactory->DeleteEffect(iGlobalGain); |
89 if ( iFactory != NULL ) |
89 iFactory->DeleteEffect(iGlobalVol); |
90 { |
|
91 iFactory->DeleteEffect ( iGlobalGain ); |
|
92 iFactory->DeleteEffect ( iGlobalVol ); |
|
93 } |
90 delete iFactory; |
94 delete iFactory; |
91 } |
95 } |
92 |
96 |
93 // --------------------------------------------------------------------------- |
97 // --------------------------------------------------------------------------- |
94 // CPEAudioEffect::SetMuteState(TBool aMute) |
98 // CPEAudioEffect::SetMuteState(TBool aMute) |