1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/devsound/a3facf/inc/maudiogaincontrolobserver.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,87 @@
1.4 +/*
1.5 +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +
1.24 +/**
1.25 + @file
1.26 + @publishedPartner
1.27 + @released
1.28 +*/
1.29 +
1.30 +#ifndef MAUDIOGAINCONTROLOBSERVER_H
1.31 +#define MAUDIOGAINCONTROLOBSERVER_H
1.32 +
1.33 +#include <e32base.h>
1.34 +#include <a3f/a3fbase.h>
1.35 +#include <a3f/maudiogaincontrol.h>
1.36 +
1.37 +/**
1.38 + * An interface to a set of AudioGainControl callback functions.
1.39 + *
1.40 + * this serves as the method of communication between the client and the
1.41 + * AudioGainControl.
1.42 + *
1.43 + * The class is a mixin and is intended to be inherited by the client class
1.44 + * that is interested in observing the Gain operations. The functions
1.45 + * encapsulated by this class are called when specific events occur while
1.46 + * processing audio.
1.47 + *
1.48 + */
1.49 +class MAudioGainControlObserver
1.50 + {
1.51 +public:
1.52 +
1.53 + /**
1.54 + * Notifies the observer that the max ramp time supported by the gain
1.55 + * control has changed.
1.56 + *
1.57 + * @param aGain a reference to GainControl whose max ramp time changed.
1.58 + */
1.59 + virtual void MaxRampTimeChanged(MAudioGainControl& aGain)=0;
1.60 +
1.61 + /**
1.62 + * Notifies the observer that the maximum gain value supported by the
1.63 + * gain control has changed.
1.64 + *
1.65 + * @param aGain a reference to GainControl whose max gain changed.
1.66 + */
1.67 + virtual void MaxGainChanged(MAudioGainControl& aGain)=0;
1.68 +
1.69 + /**
1.70 + * Notifies the observer that the gain has changed,
1.71 + * due to request from the client or otherwise.
1.72 + * If gain change by the client cannot be fulfilled,
1.73 + * a gain change with an error code other than KErrNone will be issued.
1.74 + * @param aGain a reference to the gain control whose gain has changed.
1.75 + * @return aError an error code.
1.76 + * KErrNone if the gain change was requested by the client and was completed successfully.
1.77 + * KErrNotSupported if the SetGain() call referred to non-existent channels.
1.78 + * KErrArgument if aGain of less than 0 or larger than max gain,
1.79 + * the same channel is specified multiple times,
1.80 + * or aRampDuration is less than 0 or greater than max ramp duration.
1.81 + * KErrA3fUnsupportedRamp if the ramp operation requested is not supported,
1.82 + * or the Uid value supplies is unknown.
1.83 + * Other system-wide errors are also possible. They will indicate that the gain change failed.
1.84 + * Note that these errors could alternatively be returned by the associated SetGain() call.
1.85 + */
1.86 + virtual void GainChanged(MAudioGainControl& aGain, TInt aError)=0;
1.87 +
1.88 + };
1.89 +
1.90 +#endif // MAUDIOGAINCONTROLOBSERVER_H