|
1 /* |
|
2 * Copyright (c) 2006-2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 /** |
|
22 @file |
|
23 @publishedPartner |
|
24 @released |
|
25 */ |
|
26 |
|
27 #ifndef MAUDIOGAINCONTROLOBSERVER_H |
|
28 #define MAUDIOGAINCONTROLOBSERVER_H |
|
29 |
|
30 #include <e32base.h> |
|
31 #include <a3f/a3fbase.h> |
|
32 #include <a3f/maudiogaincontrol.h> |
|
33 |
|
34 /** |
|
35 * An interface to a set of AudioGainControl callback functions. |
|
36 * |
|
37 * this serves as the method of communication between the client and the |
|
38 * AudioGainControl. |
|
39 * |
|
40 * The class is a mixin and is intended to be inherited by the client class |
|
41 * that is interested in observing the Gain operations. The functions |
|
42 * encapsulated by this class are called when specific events occur while |
|
43 * processing audio. |
|
44 * |
|
45 */ |
|
46 class MAudioGainControlObserver |
|
47 { |
|
48 public: |
|
49 |
|
50 /** |
|
51 * Notifies the observer that the max ramp time supported by the gain |
|
52 * control has changed. |
|
53 * |
|
54 * @param aGain a reference to GainControl whose max ramp time changed. |
|
55 */ |
|
56 virtual void MaxRampTimeChanged(MAudioGainControl& aGain)=0; |
|
57 |
|
58 /** |
|
59 * Notifies the observer that the maximum gain value supported by the |
|
60 * gain control has changed. |
|
61 * |
|
62 * @param aGain a reference to GainControl whose max gain changed. |
|
63 */ |
|
64 virtual void MaxGainChanged(MAudioGainControl& aGain)=0; |
|
65 |
|
66 /** |
|
67 * Notifies the observer that the gain has changed, |
|
68 * due to request from the client or otherwise. |
|
69 * If gain change by the client cannot be fulfilled, |
|
70 * a gain change with an error code other than KErrNone will be issued. |
|
71 * @param aGain a reference to the gain control whose gain has changed. |
|
72 * @return aError an error code. |
|
73 * KErrNone if the gain change was requested by the client and was completed successfully. |
|
74 * KErrNotSupported if the SetGain() call referred to non-existent channels. |
|
75 * KErrArgument if aGain of less than 0 or larger than max gain, |
|
76 * the same channel is specified multiple times, |
|
77 * or aRampDuration is less than 0 or greater than max ramp duration. |
|
78 * KErrA3fUnsupportedRamp if the ramp operation requested is not supported, |
|
79 * or the Uid value supplies is unknown. |
|
80 * Other system-wide errors are also possible. They will indicate that the gain change failed. |
|
81 * Note that these errors could alternatively be returned by the associated SetGain() call. |
|
82 */ |
|
83 virtual void GainChanged(MAudioGainControl& aGain, TInt aError)=0; |
|
84 |
|
85 }; |
|
86 |
|
87 #endif // MAUDIOGAINCONTROLOBSERVER_H |