javauis/amms_akn/mmacontrol/inc.mmf/cammspancontrol.h
branchRCL_3
changeset 19 04becd199f91
child 60 6c158198356e
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Manipulates the panning of a Player in the stereo output mix.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CAMMSPANCONTROL_H
       
    20 #define CAMMSPANCONTROL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <MMFStandardCustomCommands.h>
       
    25 #include <MidiClientUtility.h>
       
    26 #include "CAMMSControl.h"
       
    27 
       
    28 // CONSTANTS
       
    29 _LIT(KAMMSPanControl, "PanControl");
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *
       
    35 *  Controls for the Panning effect.
       
    36 *  This class delegates Pan effect method calls to CBalance.
       
    37 *
       
    38 *
       
    39 *  @since 3.0
       
    40 */
       
    41 NONSHARABLE_CLASS(CAMMSPanControl): public CAMMSControl
       
    42 {
       
    43 public:  // Constructors and destructor
       
    44 
       
    45     /**
       
    46     * Two-phased constructor.
       
    47     * @param aPlayer Player that has this control.
       
    48     */
       
    49     static CAMMSPanControl* NewLC(CMMAPlayer* aPlayer);
       
    50 
       
    51     /**
       
    52     * Destructor.
       
    53     */
       
    54     ~CAMMSPanControl();
       
    55 
       
    56 public: // New functions
       
    57 
       
    58     /**
       
    59     * Gets the current panning set.
       
    60     *
       
    61     * @return The current balance or panning setting.
       
    62     */
       
    63     TInt PanL();
       
    64 
       
    65     /**
       
    66     * Sets the panning using a linear point scale with values between -100
       
    67     * and 100. 0 represents panning for both channels, -100 full panning to
       
    68     * the left and 100 full panning to the right. If the given panning
       
    69     * value is less than -100 or greater than 100, the panning will be set
       
    70     * to -100 or 100, respectively.
       
    71     *
       
    72     * @param aPan The new panning to be set.
       
    73     *
       
    74     * @return The panning that was actually set.
       
    75     */
       
    76     TInt SetPanL(TInt aPan);
       
    77 
       
    78 public: // Functions from base classes
       
    79     const TDesC& ClassName() const;
       
    80 
       
    81 private:
       
    82     /**
       
    83     * C++ constructor.
       
    84     * @param aPlayer Player that has this control.
       
    85     */
       
    86     CAMMSPanControl(CMMAPlayer* aPlayer);
       
    87 
       
    88     /**
       
    89      * 2nd phase constructor.
       
    90      */
       
    91     void ConstructL();
       
    92 
       
    93 
       
    94 private:  // Data
       
    95 
       
    96     /** Client class to access Audio Play Device functionality, owned */
       
    97     RMMFAudioPlayDeviceCustomCommands* iRMMFAudioPlayDeviceCustomCommands;
       
    98 
       
    99     /** CMidiClientUtility, not owned. */
       
   100     CMidiClientUtility* iMidiClientUtility;
       
   101 };
       
   102 
       
   103 #endif // CAMMSPANCONTROL_H
       
   104 
       
   105