javauis/amms_qt/mmacontrol/src/cammsaudiodopplercontrol.cpp
branchRCL_3
changeset 18 9ac0a0a7da70
parent 17 0fd27995241b
child 19 71c436fe3ce0
--- a/javauis/amms_qt/mmacontrol/src/cammsaudiodopplercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the doppler effect of the SoundSource3D.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsaudiodopplercontrol.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioDopplerControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSAudioDopplerControl* CAMMSAudioDopplerControl::NewLC(CMMAPlayer* aPlayer)
-{
-    CAMMSAudioDopplerControl* self =
-        new(ELeave) CAMMSAudioDopplerControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSAudioDopplerControl::~CAMMSAudioDopplerControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioDopplerControl::~CAMMSAudioDopplerControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    delete(CAudioEffect*)iDopplerEffect;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioDopplerControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSAudioDopplerControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iDopplerEffect)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioDopplerControl::PrepareControlL");
-
-        CCustomCommandUtility* customCommandUtility =
-            CreateCustomCommandUtilityL();
-
-        // Set the base class location effect as CSourceDoppler
-        // Effect API takes the ownership of customCommandUtility.
-        iDopplerEffect = CSourceDoppler::NewL(customCommandUtility);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioDopplerControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSAudioDopplerControl::DeallocateControl()
-{
-    if (iDopplerEffect)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioDopplerControl::DeallocateControl");
-
-        // Doppler for Audio can be disabled or enabled
-        if (Enabled())
-        {
-            TRAPD(err, iDopplerEffect->DisableL());
-            if (err != KErrNone)
-            {
-                // The only even theoritically possible error code here would be
-                // KErrAccessDenied which is a result from Effect API calling
-                // ApplyL method without having update rights, but since the
-                // Effect is already created, that situation can be discarded.
-            }
-        }
-
-        // Delete the Effect API class.
-        delete(CAudioEffect*)iDopplerEffect;
-        iDopplerEffect = NULL;
-    }
-}
-
-const TDesC& CAMMSAudioDopplerControl::ClassName() const
-{
-    return KAMMSAudioDopplerControl;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioDopplerControl::CAMMSAudioDopplerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSAudioDopplerControl::CAMMSAudioDopplerControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSDopplerControl(aPlayer)
-{
-}
-//  End of File