os/mm/devsound/sounddevbt/PlatSec/src/SoundDevice/BtSoundDeviceBody.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/devsound/sounddevbt/PlatSec/src/SoundDevice/BtSoundDeviceBody.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,631 @@
     1.4 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#include <mmf/plugin/mmfbthwdeviceimplementationuids.hrh>
    1.20 +#include "BtSoundDeviceBody.h"
    1.21 +#include <mmf/server/mmfbtswcodecwrappercustominterfacesuids.hrh> // KUidBtRefDevSoundTaskConfig
    1.22 +#include "MmfBtFileDependencyUtil.h"
    1.23 +
    1.24 +/*
    1.25 + *
    1.26 + *	Default Constructor.
    1.27 + *
    1.28 + *	No default implementation. CMMFDevSound implements 2-phase construction.
    1.29 + *
    1.30 + */
    1.31 +CMMFDevSoundClientImp::CMMFDevSoundClientImp()
    1.32 +	{
    1.33 +	}
    1.34 +
    1.35 +/*
    1.36 + *
    1.37 + *	Destructor.
    1.38 + *
    1.39 + *	Deletes all objects and releases all resource owned by this
    1.40 + *	instance.
    1.41 + *
    1.42 + */
    1.43 +CMMFDevSoundClientImp::~CMMFDevSoundClientImp()
    1.44 +	{
    1.45 +	CancelCalbackHandlers();
    1.46 +	
    1.47 +	delete iBTBFHandler; 
    1.48 +	delete iPEHandler;
    1.49 +	delete iREHandler;
    1.50 +	delete iTFHandler;
    1.51 +	delete iBTBEHandler;
    1.52 +	delete iSETCHandler;
    1.53 +	delete iICHandler;
    1.54 +
    1.55 +	if( iDevSoundProxy != NULL)
    1.56 +		{
    1.57 +		iDevSoundProxy->Close();
    1.58 +		delete iDevSoundProxy;
    1.59 +		}
    1.60 +	}
    1.61 +
    1.62 +/*
    1.63 + *
    1.64 + *	Constructs, and returns a pointer to, a new CMMFDevSound object.
    1.65 + *
    1.66 + *	Leaves on failure.
    1.67 + *
    1.68 + */
    1.69 +CMMFDevSoundClientImp* CMMFDevSoundClientImp::NewL()
    1.70 +	{
    1.71 +	FileDependencyUtil::CheckFileDependencyL();
    1.72 +
    1.73 +	CMMFDevSoundClientImp* self = new (ELeave) CMMFDevSoundClientImp();
    1.74 +	CleanupStack::PushL(self);
    1.75 +	self->ConstructL();
    1.76 +	CleanupStack::Pop(self);
    1.77 +	return self;
    1.78 +	}
    1.79 +
    1.80 +/*
    1.81 + *
    1.82 + *	3rd phase constructor - assumes that iParent has already been set up properly
    1.83 + *                          (During ConstructL() it has yet to be
    1.84 + *
    1.85 + */
    1.86 +void CMMFDevSoundClientImp::ConstructL()
    1.87 +	{
    1.88 +	// all these data properties should be NULL, but add ASSERTs to verity
    1.89 +
    1.90 +	ASSERT(iDevSoundProxy==NULL);
    1.91 +	iDevSoundProxy = new (ELeave) RMMFDevSoundProxy();
    1.92 +
    1.93 +	TInt err = iDevSoundProxy->Open();
    1.94 +	if(err)
    1.95 +		{
    1.96 +		delete iDevSoundProxy;
    1.97 +		iDevSoundProxy = NULL;
    1.98 +		}
    1.99 +
   1.100 +	User::LeaveIfError(err);
   1.101 +	}
   1.102 +
   1.103 +/*
   1.104 + *  @prototype
   1.105 + */
   1.106 +void CMMFDevSoundClientImp::CancelCalbackHandlers()
   1.107 +	{	
   1.108 +	if(iBTBFHandler)
   1.109 +		iBTBFHandler->CancelReceiveEvents();
   1.110 +	if(iPEHandler)
   1.111 +		iPEHandler->CancelReceiveEvents();
   1.112 +	if(iREHandler)
   1.113 +		iREHandler->CancelReceiveEvents();
   1.114 +	if(iTFHandler)
   1.115 +		iTFHandler->CancelReceiveEvents();
   1.116 +	if(iBTBEHandler)
   1.117 +		iBTBEHandler->CancelReceiveEvents();
   1.118 +	if(iSETCHandler)
   1.119 +		iSETCHandler->CancelReceiveEvents();
   1.120 +	if(iICHandler)
   1.121 +		iICHandler->CancelReceiveEvents();
   1.122 +	}
   1.123 +
   1.124 +/*
   1.125 + *
   1.126 + *	Initializes CMMFDevSound object to play and record PCM16 raw audio data
   1.127 + *	with sampling rate of 8 KHz.
   1.128 + *
   1.129 + *	On completion of Initialization, calls InitializeComplete() on
   1.130 + *	aDevSoundObserver.
   1.131 + *
   1.132 + *	Leaves on failure.
   1.133 + *
   1.134 + *	@param	"MDevSoundObserver& aDevSoundObserver"
   1.135 + *			A reference to DevSound Observer instance.
   1.136 + *
   1.137 + *	@param	"TMMFState aMode"
   1.138 + *			Mode for which this object will be used.
   1.139 + *
   1.140 + */
   1.141 +void CMMFDevSoundClientImp::InitializeL(MDevSoundObserver& aDevSoundObserver, TMMFState aMode)
   1.142 +
   1.143 +	{
   1.144 +	TInt initError = KErrNone;
   1.145 +	iDevSoundObserver = &aDevSoundObserver;
   1.146 +
   1.147 +	// Need to set up an init complete event and message handler
   1.148 +	// prior to calling InitializeL()
   1.149 +	if (iICHandler)
   1.150 +		{
   1.151 +		iICHandler->CancelReceiveEvents();
   1.152 +		}
   1.153 +	else
   1.154 +		{
   1.155 +		iICHandler = CMMFInitializeCompleteHandler::NewL(iDevSoundProxy, *iDevSoundObserver);
   1.156 +		}
   1.157 +	iICHandler->ReceiveEvents();
   1.158 +
   1.159 +	initError = iDevSoundProxy->InitializeL(aMode);
   1.160 +	
   1.161 +	if (initError)
   1.162 +		{		
   1.163 +		iDevSoundObserver->InitializeComplete(initError);
   1.164 +		User::Leave(initError);
   1.165 +		}
   1.166 +
   1.167 +    if(iBTBFHandler)
   1.168 +		{
   1.169 +		iBTBFHandler->CancelReceiveEvents();
   1.170 +		}
   1.171 +	else
   1.172 +		{
   1.173 +		iBTBFHandler = CMMFBufferToBeFilledHandler::NewL(iDevSoundProxy, *iDevSoundObserver);
   1.174 +		}
   1.175 +	iBTBFHandler->ReceiveEvents();
   1.176 +
   1.177 +
   1.178 +    if(iPEHandler)
   1.179 +		{
   1.180 +		iPEHandler->CancelReceiveEvents();
   1.181 +		}
   1.182 +	else
   1.183 +		{
   1.184 +		iPEHandler = CMMFPlayErrorHandler::NewL(iDevSoundProxy, *iDevSoundObserver);
   1.185 +		}
   1.186 +	iPEHandler->ReceiveEvents();
   1.187 +
   1.188 +
   1.189 +    if(iREHandler)
   1.190 +		{
   1.191 +		iREHandler->CancelReceiveEvents();
   1.192 +		}
   1.193 +	else
   1.194 +		{
   1.195 +		iREHandler = CMMFRecordErrorHandler::NewL(iDevSoundProxy, *iDevSoundObserver);
   1.196 +		}
   1.197 +	iREHandler->ReceiveEvents();
   1.198 +
   1.199 +
   1.200 +    if(iTFHandler)
   1.201 +		{
   1.202 +		iTFHandler->CancelReceiveEvents();
   1.203 +		}
   1.204 +	else
   1.205 +		{
   1.206 +		iTFHandler = CMMFToneFinishedHandler::NewL(iDevSoundProxy, *iDevSoundObserver);
   1.207 +		}
   1.208 +	iTFHandler->ReceiveEvents();
   1.209 +
   1.210 +
   1.211 +    if(iBTBEHandler)
   1.212 +		{
   1.213 +		iBTBEHandler->CancelReceiveEvents();
   1.214 +		}
   1.215 +	else
   1.216 +		{
   1.217 +		iBTBEHandler = CMMFBufferToBeEmptiedHandler::NewL(iDevSoundProxy, *iDevSoundObserver);
   1.218 +		}
   1.219 +	iBTBEHandler->ReceiveEvents();
   1.220 +
   1.221 +
   1.222 +    if(iSETCHandler)
   1.223 +		{
   1.224 +		iSETCHandler->CancelReceiveEvents();
   1.225 +		}
   1.226 +	else
   1.227 +		{
   1.228 +		iSETCHandler = CMMFSendEventToClientHandler::NewL(iDevSoundProxy, *iDevSoundObserver);
   1.229 +		}
   1.230 +	iSETCHandler->ReceiveEvents();
   1.231 +	}
   1.232 +
   1.233 +/*
   1.234 + *
   1.235 + *	Configure CMMFDevSound object for the settings in aConfig.
   1.236 + *
   1.237 + *	Use this to set sampling rate, Encoding and Mono/Stereo.
   1.238 + *
   1.239 + *	@param	"TMMFCapabilities& aConfig"
   1.240 + *			Attribute values to which CMMFDevSound object will be configured to.
   1.241 + *
   1.242 + *  As part of defect 20796, the iRecordFormat has been set under the iPlayFormat, 
   1.243 + *  before it was not set at all.
   1.244 + *
   1.245 + */
   1.246 +void CMMFDevSoundClientImp::SetConfigL(const TMMFCapabilities& aConfig)
   1.247 +	{
   1.248 +	iDevSoundProxy->SetConfigL(aConfig);
   1.249 +	}
   1.250 +
   1.251 +/*
   1.252 + *
   1.253 + *	Changes the current playback volume to a specified value.
   1.254 + *
   1.255 + *	The volume can be changed before or during playback and is effective
   1.256 + *	immediately.
   1.257 + *
   1.258 + *	@param	"TInt aVolume"
   1.259 + *			The volume setting. This can be any value from zero to the value
   1.260 + *			returned by a call to CMdaAudioPlayerUtility::MaxVolume(). If the
   1.261 + *			volume is not within this range, the volume is automatically set to
   1.262 + *			minimum or maximum value based on the value that is being passed.
   1.263 + *			Setting a zero value mutes the sound. Setting the maximum value
   1.264 + *			results in the loudest possible sound.
   1.265 + *
   1.266 + */
   1.267 +void CMMFDevSoundClientImp::SetVolume(TInt aVolume)
   1.268 +	{
   1.269 +	iDevSoundProxy->SetVolume(aVolume);
   1.270 +	}
   1.271 +
   1.272 +/*
   1.273 + *
   1.274 + *	Changes the current recording gain to a specified value.
   1.275 + *
   1.276 + *	The gain can be changed before or during recording and is effective
   1.277 + *	immediately.
   1.278 + *
   1.279 + *	@param	"TInt aGain"
   1.280 + *			The volume setting. This can be any value from zero to the value
   1.281 + *			returned by a call to CMdaAudioPlayerUtility::MaxVolume(). If the
   1.282 + *			volume is not within this range, the gain is automatically set to
   1.283 + *			minimum or maximum value based on the value that is being passed.
   1.284 + *			Setting a zero value mutes the sound. Setting the maximum value
   1.285 + *			results in the loudest possible sound.
   1.286 + *
   1.287 + */
   1.288 +void CMMFDevSoundClientImp::SetGain(TInt aGain)
   1.289 +	{
   1.290 +	iDevSoundProxy->SetGain(aGain);
   1.291 +	}
   1.292 +
   1.293 +/*
   1.294 + *
   1.295 + *	Sets the speaker balance for playing.
   1.296 + *
   1.297 + *	The speaker balance can be changed before or during playback and is
   1.298 + *	effective immediately.
   1.299 + *
   1.300 + *	@param	"TInt& aLeftPercentage"
   1.301 + *			On return contains left speaker volume perecentage. This can be any
   1.302 + *			value from zero to 100. Setting a zero value mutes the sound on left
   1.303 + *			speaker.
   1.304 + *
   1.305 + *	@param	"TInt& aRightPercentage"
   1.306 + *			On return contains right speaker volume perecentage. This can be any
   1.307 + *			value from zero to 100. Setting a zero value mutes the sound on
   1.308 + *			right speaker.
   1.309 + *
   1.310 + */
   1.311 +void CMMFDevSoundClientImp::SetPlayBalanceL(TInt aLeftPercentage, TInt aRightPercentage)
   1.312 +	{
   1.313 +	iDevSoundProxy->SetPlayBalanceL(aLeftPercentage, aRightPercentage);
   1.314 +	}
   1.315 +
   1.316 +/*
   1.317 + *
   1.318 + *	Sets the microphone gain balance for recording.
   1.319 + *
   1.320 + *	The microphone gain balance can be changed before or during recording and
   1.321 + *	is effective immediately.
   1.322 + *
   1.323 + *	@param	"TInt aLeftPercentage"
   1.324 + *			Left microphone gain precentage. This can be any value from zero to
   1.325 + *			100. Setting a zero value mutes the gain on left microphone.
   1.326 + *
   1.327 + *	@param	"TInt aRightPercentage"
   1.328 + *			Right microphone gain precentage. This can be any value from zero to
   1.329 + *			100. Setting a zero value mutes the gain on right microphone.
   1.330 + *
   1.331 + */
   1.332 +void CMMFDevSoundClientImp::SetRecordBalanceL(TInt aLeftPercentage, TInt aRightPercentage)
   1.333 +	{
   1.334 +	iDevSoundProxy->SetRecordBalanceL(aLeftPercentage, aRightPercentage);
   1.335 +	}
   1.336 +
   1.337 +/*
   1.338 + *
   1.339 + *	Initializes audio device and start play process. This method queries and
   1.340 + *	acquires the audio policy before initializing audio device. If there was an
   1.341 + *	error during policy initialization, PlayError() method will be called on
   1.342 + *	the observer with error code KErrAccessDenied, otherwise BufferToBeFilled()
   1.343 + *	method will be called with a buffer reference. After reading data into the
   1.344 + *	buffer reference passed, the client should call PlayData() to play data.
   1.345 + *
   1.346 + *	The amount of data that can be played is specified in
   1.347 + *	CMMFBuffer::RequestSize(). Any data that is read into buffer beyond this
   1.348 + *	size will be ignored.
   1.349 + *
   1.350 + *	Leaves on failure.
   1.351 + *
   1.352 + */
   1.353 +void CMMFDevSoundClientImp::PlayInitL()
   1.354 +	{
   1.355 +	if (!iDevSoundObserver)
   1.356 +		User::Leave(KErrNotReady);
   1.357 +	iDevSoundProxy->PlayInitL();
   1.358 +	}
   1.359 +
   1.360 +/*
   1.361 + *
   1.362 + *	Initializes audio device and start record process. This method queries and
   1.363 + *	acquires the audio policy before initializing audio device. If there was an
   1.364 + *	error during policy initialization, RecordError() method will be called on
   1.365 + *	the observer with error code KErrAccessDenied, otherwise BufferToBeEmptied()
   1.366 + *	method will be called with a buffer reference. This buffer contains recorded
   1.367 + *	or encoded data. After processing data in the buffer reference passed, the
   1.368 + *	client should call RecordData() to continue recording process.
   1.369 + *
   1.370 + *	The amount of data that is available is specified in
   1.371 + *	CMMFBuffer::RequestSize().
   1.372 + *
   1.373 + *	Leaves on failure.
   1.374 + *
   1.375 + */
   1.376 +void CMMFDevSoundClientImp::RecordInitL()
   1.377 +	{
   1.378 +
   1.379 +	if (!iDevSoundObserver)
   1.380 +		User::Leave(KErrNotReady);
   1.381 +	iDevSoundProxy->RecordInitL();
   1.382 +	}
   1.383 +
   1.384 +/*
   1.385 + *
   1.386 + *	Plays data in the buffer at the current volume. The client should fill
   1.387 + *	the buffer with audio data before calling this method. The Observer gets
   1.388 + *	reference to buffer along with callback BufferToBeFilled(). When playing of
   1.389 + *	the audio sample is complete, successfully or otherwise, the method
   1.390 + *	PlayError() on observer is called.
   1.391 + *
   1.392 + */
   1.393 +void CMMFDevSoundClientImp::PlayData()
   1.394 +	{
   1.395 +	ASSERT(iDevSoundObserver);
   1.396 +	iDevSoundProxy->PlayData();
   1.397 +	}
   1.398 +
   1.399 +/*
   1.400 + *
   1.401 + *	Stops the ongoing operation (Play, Record, TonePlay, Convert)
   1.402 + *
   1.403 + */
   1.404 +void CMMFDevSoundClientImp::Stop()
   1.405 +	{
   1.406 +	iDevSoundProxy->Stop();
   1.407 +	}
   1.408 +
   1.409 +/*
   1.410 + *
   1.411 + *	Temporarily Stops the ongoing operation (Play, Record, TonePlay, Convert)
   1.412 + *
   1.413 + */
   1.414 +void CMMFDevSoundClientImp::Pause()
   1.415 +	{
   1.416 +	iDevSoundProxy->Pause();
   1.417 +	}
   1.418 +
   1.419 +/*
   1.420 + *
   1.421 + *	Returns the sample recorded so far.
   1.422 + *
   1.423 + *	@return "TInt"
   1.424 + *			Returns the samples recorded.
   1.425 + *
   1.426 + */
   1.427 +TInt CMMFDevSoundClientImp::SamplesRecorded()
   1.428 +	{
   1.429 +	return iDevSoundProxy->SamplesRecorded();
   1.430 +	}
   1.431 +
   1.432 +/*
   1.433 + *
   1.434 + *	Returns the sample played so far.
   1.435 + *
   1.436 + *	@return "TInt"
   1.437 + *			Returns the samples recorded.
   1.438 + *
   1.439 + */
   1.440 +TInt CMMFDevSoundClientImp::SamplesPlayed()
   1.441 +	{
   1.442 +	return iDevSoundProxy->SamplesPlayed();
   1.443 +	}
   1.444 +
   1.445 +
   1.446 +/*
   1.447 + *
   1.448 + *	Initializes audio device and start playing tone. Tone is played with
   1.449 + *	frequency and for duration specified.
   1.450 + *
   1.451 + *	Leaves on failure.
   1.452 + *
   1.453 + *	@param	"TInt aFrequency"
   1.454 + *			Frequency at with the tone will be played.
   1.455 + *
   1.456 + *	@param	"TTimeIntervalMicroSeconds& aDuration"
   1.457 + *			The period over which the tone will be played. A zero value causes
   1.458 + *			the no tone to be played (Verify this with test app).
   1.459 + *
   1.460 + */
   1.461 +void CMMFDevSoundClientImp::PlayToneL(TInt aFrequency, const TTimeIntervalMicroSeconds& aDuration)
   1.462 +	{
   1.463 +	iDevSoundProxy->PlayToneL(aFrequency, aDuration);
   1.464 +	}
   1.465 +
   1.466 +/*
   1.467 + *	Initializes audio device and start playing a dual tone. 
   1.468 + *  The tone consists of two sine waves of different frequencies summed together
   1.469 + *  Dual Tone is played with specified frequencies and for specified duration.
   1.470 + *
   1.471 + *	@param	"aFrequencyOne"
   1.472 + *			First frequency of dual tone
   1.473 + *
   1.474 + *	@param	"aFrequencyTwo"
   1.475 + *			Second frequency of dual tone
   1.476 + *
   1.477 + *	@param	"aDuration"
   1.478 + *			The period over which the tone will be played. A zero value causes
   1.479 + *			the no tone to be played (Verify this with test app).
   1.480 + */
   1.481 +void CMMFDevSoundClientImp::PlayDualToneL(TInt aFrequencyOne, TInt aFrequencyTwo, const TTimeIntervalMicroSeconds& aDuration)
   1.482 +	{
   1.483 +	iDevSoundProxy->PlayDualToneL(aFrequencyOne, aFrequencyTwo, aDuration);
   1.484 +	}
   1.485 +
   1.486 +/*
   1.487 + *
   1.488 + *	Initializes audio device and start playing DTMF string aDTMFString.
   1.489 + *
   1.490 + *	Leaves on failure.
   1.491 + *
   1.492 + *	@param	"TDesC& aDTMFString"
   1.493 + *			DTMF sequence in a descriptor.
   1.494 + *
   1.495 + */
   1.496 +void CMMFDevSoundClientImp::PlayDTMFStringL(const TDesC& aDTMFString)
   1.497 +	{
   1.498 +	if (!iDevSoundObserver)
   1.499 +		User::Leave(KErrNotReady);
   1.500 +
   1.501 +	iDevSoundProxy->PlayDTMFStringL(aDTMFString);
   1.502 +	}
   1.503 +
   1.504 +/*
   1.505 + *
   1.506 + *	Initializes audio device and start playing tone sequence.
   1.507 + *
   1.508 + *	Leaves on failure.
   1.509 + *
   1.510 + *	@param	"TDesC8& aData"
   1.511 + *			Tone sequence in a descriptor.
   1.512 + *
   1.513 + */
   1.514 +void CMMFDevSoundClientImp::PlayToneSequenceL(const TDesC8& aData)
   1.515 +	{
   1.516 +	if (!iDevSoundObserver)
   1.517 +		User::Leave(KErrNotReady);
   1.518 +
   1.519 +	iDevSoundProxy->PlayToneSequenceL(aData);
   1.520 +	}
   1.521 +
   1.522 +/*
   1.523 + *
   1.524 + *	Initializes audio device and start playing the specified pre-defined tone
   1.525 + *	sequence.
   1.526 + *
   1.527 + *	Leaves on failure.
   1.528 + *
   1.529 + *	@param	"TInt aSequenceNumber"
   1.530 + *			The index identifying the specific pre-defined tone sequence. Index
   1.531 + *			values are relative to zero.
   1.532 + *			This can be any value from zero to the value returned by a call to
   1.533 + *			CMdaAudioPlayerUtility::FixedSequenceCount() - 1.
   1.534 + *			The function raises a panic if sequence number is not within this
   1.535 + *			range.
   1.536 + *
   1.537 + */
   1.538 +void CMMFDevSoundClientImp::PlayFixedSequenceL(TInt aSequenceNumber)
   1.539 +	{
   1.540 +	if (!iDevSoundObserver)
   1.541 +		User::Leave(KErrNotReady);
   1.542 +
   1.543 +	iDevSoundProxy->PlayFixedSequenceL(aSequenceNumber);
   1.544 +	}
   1.545 +
   1.546 +/*
   1.547 + *
   1.548 + *	Defines the duration of tone on, tone off and tone pause to be used during the
   1.549 + *	DTMF tone playback operation.
   1.550 + *
   1.551 + *	Supported only during tone playing.
   1.552 + *
   1.553 + *	@param	"TTimeIntervalMicroSeconds32& aToneOnLength"
   1.554 + *			The period over which the tone will be played. If this is set to
   1.555 + *			zero, then the tone is not played.
   1.556 + *
   1.557 + *	@param	"TTimeIntervalMicroSeconds32& aToneOffLength"
   1.558 + *			The period over which the no tone will be played.
   1.559 + *
   1.560 + *	@param	"TTimeIntervalMicroSeconds32& aPauseLength"
   1.561 + *			The period over which the tone playing will be paused.
   1.562 + *
   1.563 + */
   1.564 +void CMMFDevSoundClientImp::SetDTMFLengths(TTimeIntervalMicroSeconds32& aToneOnLength,
   1.565 +								TTimeIntervalMicroSeconds32& aToneOffLength,
   1.566 +								TTimeIntervalMicroSeconds32& aPauseLength) 
   1.567 +	{
   1.568 +	iDevSoundProxy->SetDTMFLengths(aToneOnLength, aToneOffLength, aPauseLength);
   1.569 +	}
   1.570 +
   1.571 +/*
   1.572 + *
   1.573 + *	Defines the period over which the volume level is to rise smoothly from
   1.574 + *	nothing to the normal volume level.
   1.575 + *
   1.576 + *	@param	"TTimeIntervalMicroSeconds& aRampDuration"
   1.577 + *			The period over which the volume is to rise. A zero value causes 
   1.578 + *			the tone sample to be played at the normal level for the full
   1.579 + *			duration of the playback. A value, which is longer than the duration
   1.580 + *			of the tone sample, that the sample never reaches its normal
   1.581 + *			volume level.
   1.582 + *
   1.583 + *
   1.584 + */
   1.585 +void CMMFDevSoundClientImp::SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration)
   1.586 +	{
   1.587 +	iDevSoundProxy->SetVolumeRamp(aRampDuration);
   1.588 +	}
   1.589 +
   1.590 +
   1.591 +/**
   1.592 + *	@see sounddevice.h
   1.593 + */
   1.594 +void CMMFDevSoundClientImp::GetSupportedInputDataTypesL(RArray<TFourCC>& aSupportedDataTypes, const TMMFPrioritySettings& aPrioritySettings) const
   1.595 +	{
   1.596 +	iDevSoundProxy->GetSupportedInputDataTypesL(aSupportedDataTypes, aPrioritySettings);
   1.597 +	}
   1.598 +
   1.599 +/**
   1.600 + *	@see sounddevice.h
   1.601 + */
   1.602 +void CMMFDevSoundClientImp::GetSupportedOutputDataTypesL(RArray<TFourCC>& aSupportedDataTypes, const TMMFPrioritySettings& aPrioritySettings) const
   1.603 +	{
   1.604 +	iDevSoundProxy->GetSupportedOutputDataTypesL(aSupportedDataTypes, aPrioritySettings);
   1.605 +	}
   1.606 +
   1.607 +/**
   1.608 + *	@see sounddevice.h
   1.609 + */
   1.610 +TInt CMMFDevSoundClientImp::SetClientThreadInfo(TThreadId aTid)
   1.611 +	{
   1.612 +	return iDevSoundProxy->SetClientThreadInfo(aTid);
   1.613 +	}
   1.614 +
   1.615 +
   1.616 +TInt CMMFDevSoundClientImp::RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData)
   1.617 +	{
   1.618 +	return iDevSoundProxy->RegisterAsClient(aEventType,aNotificationRegistrationData);
   1.619 +	}
   1.620 +	
   1.621 +TInt CMMFDevSoundClientImp::CancelRegisterAsClient(TUid aEventType)
   1.622 +	{
   1.623 +	return iDevSoundProxy->CancelRegisterAsClient(aEventType);
   1.624 +	}
   1.625 +	
   1.626 +TInt CMMFDevSoundClientImp::GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData)
   1.627 +	{
   1.628 +	return iDevSoundProxy->GetResourceNotificationData(aEventType,aNotificationData);
   1.629 +	}
   1.630 +	
   1.631 +TInt CMMFDevSoundClientImp::WillResumePlay()
   1.632 +	{
   1.633 +	return iDevSoundProxy->WillResumePlay();
   1.634 +	}