66
|
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 <mmf/common/mmfstandardcustomcommands.h>
|
|
25 |
#include <midiclientutility.h>
|
|
26 |
#include "cammscontrol.h"
|
|
27 |
|
|
28 |
//EMC header
|
|
29 |
#include <BalanceControl.h>
|
|
30 |
#include <cmmaemcaudioplayer.h>
|
|
31 |
using multimedia :: MBalanceControl;
|
|
32 |
using multimedia :: KBalanceEffectControl;
|
|
33 |
// CONSTANTS
|
|
34 |
_LIT(KAMMSPanControl, "PanControl");
|
|
35 |
|
|
36 |
// CLASS DECLARATION
|
|
37 |
|
|
38 |
/**
|
|
39 |
*
|
|
40 |
* Controls for the Panning effect.
|
|
41 |
* This class delegates Pan effect method calls to CBalance.
|
|
42 |
*
|
|
43 |
*
|
|
44 |
* @since 3.0
|
|
45 |
*/
|
|
46 |
NONSHARABLE_CLASS(CAMMSPanControl): public CAMMSControl
|
|
47 |
{
|
|
48 |
public: // Constructors and destructor
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Two-phased constructor.
|
|
52 |
* @param aPlayer Player that has this control.
|
|
53 |
*/
|
|
54 |
static CAMMSPanControl* NewLC(CMMAPlayer* aPlayer);
|
|
55 |
|
|
56 |
/**
|
|
57 |
* Destructor.
|
|
58 |
*/
|
|
59 |
~CAMMSPanControl();
|
|
60 |
|
|
61 |
public: // New functions
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Gets the current panning set.
|
|
65 |
*
|
|
66 |
* @return The current balance or panning setting.
|
|
67 |
*/
|
|
68 |
TInt PanL();
|
|
69 |
|
|
70 |
/**
|
|
71 |
* Sets the panning using a linear point scale with values between -100
|
|
72 |
* and 100. 0 represents panning for both channels, -100 full panning to
|
|
73 |
* the left and 100 full panning to the right. If the given panning
|
|
74 |
* value is less than -100 or greater than 100, the panning will be set
|
|
75 |
* to -100 or 100, respectively.
|
|
76 |
*
|
|
77 |
* @param aPan The new panning to be set.
|
|
78 |
*
|
|
79 |
* @return The panning that was actually set.
|
|
80 |
*/
|
|
81 |
TInt SetPanL(TInt aPan);
|
|
82 |
|
|
83 |
public: // Functions from base classes
|
|
84 |
const TDesC& ClassName() const;
|
|
85 |
|
|
86 |
private:
|
|
87 |
/**
|
|
88 |
* C++ constructor.
|
|
89 |
* @param aPlayer Player that has this control.
|
|
90 |
*/
|
|
91 |
CAMMSPanControl(CMMAPlayer* aPlayer);
|
|
92 |
|
|
93 |
/**
|
|
94 |
* 2nd phase constructor.
|
|
95 |
*/
|
|
96 |
void ConstructL();
|
|
97 |
|
|
98 |
|
|
99 |
private: // Data
|
|
100 |
|
|
101 |
/** Client class to access Audio Play Device functionality, owned */
|
|
102 |
RMMFAudioPlayDeviceCustomCommands* iRMMFAudioPlayDeviceCustomCommands;
|
|
103 |
|
|
104 |
/** CMidiClientUtility, not owned. */
|
|
105 |
CMidiClientUtility* iMidiClientUtility;
|
|
106 |
private:
|
|
107 |
CMMAPlayer *iMMAPlayer;
|
|
108 |
/**
|
|
109 |
* EMC Pan Control
|
|
110 |
*/
|
|
111 |
CMultimediaFactory* iFactory;
|
|
112 |
MStreamControl* iStreamControl;
|
|
113 |
MBalanceControl *iMBalanceControl;
|
|
114 |
};
|
|
115 |
|
|
116 |
#endif // CAMMSPANCONTROL_H
|
|
117 |
|
|
118 |
|