multimediacommscontroller/tsrc/mmfstub/src/MmfAudioInput_STUB.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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 #include <mmf/server/mmfaudioinput.h>
       
    22 #include <ecom/implementationproxy.h>
       
    23 #include <mmf/server/mmfformat.h>
       
    24 #include <mmf/plugin/mmfaudioiointerfaceuids.hrh>
       
    25 
       
    26 
       
    27 
       
    28 void InputPanic(TInt aPanicCode)
       
    29 	{
       
    30 	_LIT(KMMFAudioInputPanicCategory, "MMFAudioInput");
       
    31 	User::Panic(KMMFAudioInputPanicCategory, aPanicCode);
       
    32 	}
       
    33 
       
    34 /**
       
    35 Static standard SymbianOS 2 phase constuction method.
       
    36 
       
    37 Constucts this audio device.
       
    38 
       
    39 @return A pointer to a MDataSource returned on successful construction.
       
    40 */
       
    41 MDataSource* CMMFAudioInput::NewSourceL()
       
    42 	{
       
    43 	CMMFAudioInput* self = new (ELeave) CMMFAudioInput ;
       
    44 	CleanupStack::PushL(self);
       
    45 	self->ConstructL();
       
    46 	CleanupStack::Pop();
       
    47 	return  STATIC_CAST( MDataSource*, self );
       
    48 	}
       
    49 
       
    50 /**
       
    51 Standard SymbianOS ConstructL.
       
    52 
       
    53 Used to initialise member varibles with device specific behaviour.
       
    54 */
       
    55 void CMMFAudioInput::ConstructL()
       
    56 	{
       
    57 	iDataTypeCode = KMMFFourCCCodePCM16;
       
    58 	}
       
    59 
       
    60 /**
       
    61 Standard SymbianOS destructor.
       
    62 */
       
    63 CMMFAudioInput::~CMMFAudioInput()
       
    64 	{
       
    65 	if (iMMFDevSound)
       
    66 		{
       
    67 		iMMFDevSound->Stop();
       
    68 		delete iMMFDevSound;
       
    69 		}
       
    70 	}
       
    71 
       
    72 
       
    73 /**
       
    74 Overridable constuctor specific to this datasource.
       
    75 
       
    76 @param  aInitData
       
    77         The initialisation data.
       
    78 */
       
    79 void CMMFAudioInput::ConstructSourceL( const TDesC8& /*aInitData*/ ) 
       
    80 	{
       
    81 	}
       
    82 
       
    83 /**
       
    84 @deprecated
       
    85 
       
    86 Gets audio from hardware device abstracted MMFDevsound (not used).
       
    87 
       
    88 @param  aBuffer
       
    89         The data to read in from a Hardware Device
       
    90 @param  aConsumer
       
    91         The MDataSink consuming the data contained in aBuffer.
       
    92 */
       
    93 void CMMFAudioInput::HWFillBufferL(CMMFBuffer* /*aBuffer*/, MDataSink* /*aConsumer*/)
       
    94 	{
       
    95 	}
       
    96 
       
    97 
       
    98 /**
       
    99 Gets audio from MMFDevsound.
       
   100 
       
   101 @pre
       
   102 iMMFDevSound must be loaded.
       
   103 
       
   104 @param  aBuffer
       
   105         The data to read in from a Devsound device.
       
   106 @param  aConsumer
       
   107         The MDataSink consuming the data contained in aBuffer.
       
   108 @param  aMediaId
       
   109         Type of data supplied - currently ignored.
       
   110 */
       
   111 void CMMFAudioInput::FillBufferL(CMMFBuffer* aBuffer, MDataSink* aConsumer, TMediaId /* aMediaId */)
       
   112 	{
       
   113 	iConsumer = aConsumer;
       
   114 
       
   115 	if (!iMMFDevSound)
       
   116 		InputPanic(EMMFAudioInputDevSoundNotLoaded);
       
   117 	
       
   118 	if ((iState == EPaused) && (iPausePending != EFalse) && (iFirstBufferRequested) )
       
   119   		{
       
   120   		User::Leave(KErrNotReady);
       
   121   		}
       
   122 
       
   123 	if ((aBuffer != NULL) && (!CMMFBuffer::IsSupportedDataBuffer(aBuffer->Type())))
       
   124 		User::Leave(KErrNotSupported);
       
   125 
       
   126 	if (aConsumer == NULL)
       
   127 		User::Leave(KErrArgument);
       
   128 
       
   129 	//this is a one-shot "prime" funtion for MMFDevSound as first buffer is uninitialised
       
   130 	if (!iFirstBufferRequested)
       
   131 		{
       
   132 		iMMFDevSound->RecordInitL();
       
   133 		iFirstBufferRequested = ETrue;
       
   134 		return;
       
   135 		}
       
   136 
       
   137 	if (iState != EDevSoundReady && iState != EPaused)
       
   138 		{
       
   139 		User::Leave(KErrNotReady);
       
   140 		}
       
   141 
       
   142 	iMMFDevSound->RecordData();
       
   143 	}
       
   144 
       
   145 /**
       
   146 Indicates the data sink has emptied the buffer.
       
   147 
       
   148 Called by the data path's MDataSink when it has emptied the buffer.
       
   149 
       
   150 The default implementation is empty.
       
   151 
       
   152 @param  aBuffer
       
   153         The data buffer that has been emptied (not used).
       
   154 */
       
   155 void CMMFAudioInput::BufferEmptiedL(CMMFBuffer* /*aBuffer*/)
       
   156 	{
       
   157 	}
       
   158 
       
   159 
       
   160 /**
       
   161 Tests whether a source buffer can be created.
       
   162 
       
   163 The default imlpementation returns true.
       
   164 
       
   165 @return	A boolean indicating if the buffer can be made. ETrue if the buffer can be created, false
       
   166         otherwise.
       
   167 */
       
   168 TBool CMMFAudioInput::CanCreateSourceBuffer()
       
   169 	{
       
   170 	return ETrue;
       
   171 	}
       
   172 
       
   173 /**
       
   174 Creates a source buffer.
       
   175 
       
   176 Intended for asynchronous usage (buffers supplied by Devsound device)
       
   177 
       
   178 @param  aMediaId
       
   179 		The Media ID. Not used in the default implementation.
       
   180 @param  aReference
       
   181         A boolean indicating if MDataSource owns the buffer. ETrue if it does, EFalse if it does 
       
   182         not.
       
   183 
       
   184 @return The buffer created (this will always be NULL when asychronous).
       
   185 */
       
   186 CMMFBuffer* CMMFAudioInput::CreateSourceBufferL(TMediaId /*aMediaId*/, TBool &aReference)
       
   187 	{
       
   188 	CMMFDataBuffer* buf = NULL;
       
   189 
       
   190 	aReference = ETrue; // This is a reference from DevSound
       
   191 	return buf;
       
   192 	}
       
   193 
       
   194 /**
       
   195 Creates a source buffer.
       
   196 
       
   197 Intended for synchronous usage.
       
   198 
       
   199 @param  aMediaId
       
   200         The Media ID. Not used in the default implementation.
       
   201 
       
   202 @return The buffer created
       
   203 */
       
   204 CMMFBuffer* CMMFAudioInput::CreateSourceBufferL(TMediaId /*aMediaId*/)
       
   205 	{
       
   206 	CMMFDataBuffer* buf = CMMFDataBuffer::NewL(KAudioInputDefaultFrameSize);
       
   207 	return buf;
       
   208 	}
       
   209 
       
   210 
       
   211 /**
       
   212 Primes the source.
       
   213 
       
   214 This is a virtual function that each derived class must implement, but may be left blank for
       
   215 default behaviour.
       
   216 
       
   217 Overridable PrimeL method. Additional Prime method specific to this DataSource.
       
   218 */
       
   219 void CMMFAudioInput::SourcePrimeL()
       
   220 	{
       
   221 	iState = EDevSoundReady;
       
   222 	}
       
   223 
       
   224 /**
       
   225 Pauses the source.
       
   226 
       
   227 This is a virtual function that each derived class must implement, but may be left blank for default 
       
   228 behaviour.
       
   229 
       
   230 Overridable PauseL method. Additional Pause method specific to this DataSource.
       
   231 */
       
   232 void CMMFAudioInput::SourcePauseL()
       
   233 	{
       
   234 	if (iState == EDevSoundReady)
       
   235 		{//not waiting on a buffer being played so stop devsound now
       
   236 		iState = EPaused;
       
   237 		if (iFirstBufferRead)
       
   238 			{
       
   239 			if (!iMMFDevSound)
       
   240 				InputPanic(EMMFAudioInputDevSoundNotLoaded);
       
   241 			else
       
   242 				iMMFDevSound->Pause();
       
   243 			}
       
   244 		else
       
   245 			iPausePending = ETrue; // Wait for recording to get started.
       
   246 		}
       
   247 	//else if Devsound isn't ready then no point in stopping it
       
   248 	}
       
   249 
       
   250 
       
   251 /**
       
   252 Stops the source.
       
   253 
       
   254 This is a virtual function that each derived class must implement, but may be left blank for default 
       
   255 behaviour.
       
   256 
       
   257 Overridable StopL method. Additional Stop method specific to this DataSource.
       
   258 */
       
   259 void CMMFAudioInput::SourceStopL()
       
   260 	{
       
   261 	iStopped = ETrue;
       
   262 	// This is done in Audio Output as well, not sure whether its needed here or not.
       
   263 	// Pause will be called before SourceStopL() and pause will take care of closing
       
   264 	// DevSound
       
   265 	if (iState == EDevSoundReady  || iState == EPaused)
       
   266 		{//not waiting on a buffer being played so stop devsound now
       
   267 		iState = EIdle;
       
   268 		if (iFirstBufferRequested)
       
   269 			{
       
   270 			if (!iMMFDevSound)
       
   271 				InputPanic(EMMFAudioInputDevSoundNotLoaded);
       
   272 			else
       
   273 				{
       
   274 				iMMFDevSound->Stop();
       
   275 				}
       
   276 
       
   277 			iFirstBufferRequested = EFalse;
       
   278 			iFirstBufferRead = EFalse;
       
   279 			}
       
   280 		}
       
   281 	//else if Devsound isn't ready then no point in stopping it
       
   282 	}
       
   283 
       
   284 /**
       
   285 Plays the source.
       
   286 
       
   287 This is a virtual function that each derived class must implement, but may be left blank for default
       
   288 behaviour.
       
   289 
       
   290 Overridable PlayL method. Additional Play method specific to this DataSource.
       
   291 */
       
   292 void CMMFAudioInput::SourcePlayL()
       
   293 	{
       
   294 	}
       
   295 
       
   296 /**
       
   297 Logs on the source thread.
       
   298 
       
   299 Thread specific initialization procedure for this device. Runs automatically on thread construction.
       
   300 
       
   301 @param  aEventHandler
       
   302         The event handler.
       
   303 
       
   304 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
       
   305         another of the system-wide error codes.
       
   306 */
       
   307 TInt CMMFAudioInput::SourceThreadLogon(MAsyncEventHandler& aEventHandler)
       
   308 	{
       
   309 	iEventHandler = &aEventHandler;
       
   310 	TInt err = KErrNone;
       
   311 	if (!iDevSoundLoaded)
       
   312 		TRAP(err, LoadL());
       
   313 	return err;
       
   314 	}
       
   315 
       
   316 /**
       
   317 Logs off the source thread.
       
   318 
       
   319 Thread specific destruction procedure for this device. Runs automatically on thread destruction.
       
   320 */
       
   321 void CMMFAudioInput::SourceThreadLogoff()
       
   322 	{
       
   323 	if(iMMFDevSound)
       
   324 		{
       
   325 		iMMFDevSound->Stop();
       
   326 		delete iMMFDevSound;
       
   327 		iMMFDevSound = NULL;
       
   328 		}
       
   329 	iDevSoundLoaded = EFalse;
       
   330 	iState = EIdle;
       
   331 	}
       
   332 
       
   333 /*
       
   334 @internaTechnology
       
   335 
       
   336 @pre
       
   337 dev sound should be created and loaded.
       
   338 */
       
   339 void CMMFAudioInput::ConfigDevSoundL()
       
   340 	{
       
   341 	//[precondition dev sound created ]
       
   342 	ASSERT( iMMFDevSound );
       
   343 
       
   344 	// Query DevSound capabilities and Try to use DevSound sample rate and 
       
   345 	// mono/stereo capability
       
   346 	TMMFCapabilities devSoundCaps = iMMFDevSound->Capabilities();
       
   347 	// get current config
       
   348 	TMMFCapabilities devSoundConfig = iMMFDevSound->Config();
       
   349 
       
   350 	// Default PCM16
       
   351 	devSoundConfig.iEncoding = EMMFSoundEncoding16BitPCM;
       
   352 
       
   353 	// 1 = Monophonic and 2 == Stereo
       
   354 	if (((iSinkChannels == 1) && (devSoundCaps.iChannels & EMMFMono)) ||
       
   355 		((iSinkChannels == 2) && (devSoundCaps.iChannels & EMMFStereo)))
       
   356 		devSoundConfig.iChannels = iSinkChannels;
       
   357 
       
   358 	devSoundConfig.iRate = EMMFSampleRate96000Hz;
       
   359 
       
   360 	iMMFDevSound->SetConfigL(devSoundConfig);
       
   361 	}
       
   362 
       
   363 /**
       
   364 Negotiates with the sink.
       
   365 
       
   366 Called if the source's setup depends on sink.
       
   367 
       
   368 @param  aSink
       
   369         The Data sink. Takes an MDataSink reference so a DataSource can negotiate with this
       
   370         MDataSource.
       
   371 */
       
   372 void CMMFAudioInput::NegotiateSourceL(MDataSink& aSink)
       
   373 	{
       
   374 	if (aSink.DataSinkType() == KUidMmfFormatEncode) 
       
   375 		{//sink is a clip so for now set sink settings to match sink
       
   376 		iSinkSampleRate = ((CMMFFormatEncode&)aSink).SampleRate(); 
       
   377 		iSinkChannels = ((CMMFFormatEncode&)aSink).NumChannels();
       
   378 		iSinkFourCC.Set(aSink.SinkDataTypeCode(TMediaId(KUidMediaTypeAudio)));
       
   379 
       
   380 		// if the sink's sample rate is undefined, try to obtain and use a
       
   381 		// default sample rate from the sink. If this is zero, use 8K
       
   382 		if (iSinkSampleRate == 0)
       
   383 			{
       
   384 			iSinkSampleRate = ((CMMFFormatEncode&)aSink).GetDefaultSampleRate(); 
       
   385 			if (iSinkSampleRate == 0)
       
   386 				iSinkSampleRate = 8000;
       
   387 			}
       
   388 		
       
   389 		}
       
   390 
       
   391 	if (iMMFDevSound == NULL)
       
   392   		User::Leave(KErrNotReady);
       
   393 
       
   394 	TMMFState prioritySettingsState = iPrioritySettings.iState; //should be EMMFStateRecording
       
   395 	//to use the GetSupportedOutputDatatypes but we'll save it just in case it's not
       
   396 	iPrioritySettings.iState = EMMFStateRecording; //if playing does not support any output data types
       
   397 	iDataTypeCode = KMMFFourCCCodePCM16;	
       
   398 
       
   399 
       
   400   	// moved from LoadL - fix for DEF037168 - AD
       
   401 	iMMFDevSound->InitializeL(*this, iDataTypeCode, EMMFStateRecording);
       
   402 	iMMFDevSound->SetPrioritySettings(iPrioritySettings);
       
   403 
       
   404 	// Attempt to configure DevSound to the same settings as the sink.
       
   405 	// Need to do this after calling CMMFDevSound::InitializeL() as
       
   406 	// this sets up the device capabilities 
       
   407 	// (returned by iMMFDevSound->Capabilities()).
       
   408 	ConfigDevSoundL();
       
   409 	}
       
   410 
       
   411 /**
       
   412 Sets the source's priority settings.
       
   413 
       
   414 @param  aPrioritySettings
       
   415         The source priority settings. Takes enumerations to determine audio record priority. Higher 
       
   416         numbers mean high priority (can interrupt lower priorities).
       
   417 */
       
   418 void CMMFAudioInput::SetSourcePrioritySettings(const TMMFPrioritySettings& aPrioritySettings)
       
   419 	{
       
   420 	iPrioritySettings = aPrioritySettings;
       
   421 	if (!iMMFDevSound)
       
   422 		InputPanic(EMMFAudioInputDevSoundNotLoaded);
       
   423 	else
       
   424 		iMMFDevSound->SetPrioritySettings(iPrioritySettings);
       
   425 	}
       
   426 
       
   427 
       
   428 /**
       
   429 Gets the data type code for the source specified by the media ID.
       
   430 
       
   431 @param  aMediaId
       
   432         An optional parameter to specifiy a specific stream when the datasource contains more than
       
   433         one stream of data.
       
   434 
       
   435 @return The 4CC of the data supplied by this source.
       
   436 */
       
   437 TFourCC CMMFAudioInput::SourceDataTypeCode(TMediaId /*aMediaId*/)
       
   438 	{
       
   439 	return iDataTypeCode;
       
   440 	}
       
   441 
       
   442 /**
       
   443 Sets the data type code for the source.
       
   444 
       
   445 @param  aSourceFourCC
       
   446         The 4CC of the data supplied by this source.
       
   447 @param  aMediaId
       
   448         The Media ID. An optional parameter to specifiy specific stream when datasource contains
       
   449         more than one stream of data.
       
   450 
       
   451 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
       
   452         another of the system-wide error codes.
       
   453 */
       
   454 TInt CMMFAudioInput::SetSourceDataTypeCode(TFourCC aSourceFourCC, TMediaId /*aMediaId*/)
       
   455 	{
       
   456 	iDataTypeCode = aSourceFourCC;
       
   457 	return KErrNone;
       
   458 	}
       
   459 
       
   460 /**
       
   461 Gets the number of bytes played.
       
   462 
       
   463 @return	The number of bytes played. If 16-bit divide this number returned by 2 to get word length.
       
   464 */
       
   465 TInt CMMFAudioInput::BytesPlayed()
       
   466 	{
       
   467 	if (!iMMFDevSound)
       
   468 		InputPanic(EMMFAudioInputDevSoundNotLoaded);
       
   469 	return iMMFDevSound->SamplesPlayed();
       
   470 	}
       
   471 
       
   472 /**
       
   473 Returns the sound device.
       
   474 
       
   475 @pre
       
   476 Dev Sound should be loaded.
       
   477 
       
   478 Accessor function exposing public CMMFDevsound methods.
       
   479 
       
   480 @return A reference to a CMMFDevSound objector.
       
   481 */
       
   482 CMMFDevSound& CMMFAudioInput::SoundDevice()
       
   483 	{
       
   484 	if (!iMMFDevSound)
       
   485 		{
       
   486 		InputPanic(EMMFAudioInputDevSoundNotLoaded);
       
   487 		}
       
   488 	return *iMMFDevSound;
       
   489 	}
       
   490 
       
   491 
       
   492 /**
       
   493 @deprecated
       
   494 
       
   495 This method should not be used - it is provided to maintain SC with v7.0s.
       
   496 
       
   497 @param  aAudioType
       
   498         The 4CC of the data supplied by this source.
       
   499 */
       
   500 void CMMFAudioInput::SetDataTypeL(TFourCC aAudioType)
       
   501 	{
       
   502 	if (aAudioType != KMMFFourCCCodePCM16)
       
   503 		{
       
   504 		User::Leave(KErrNotSupported);
       
   505 		}
       
   506 	}	
       
   507 
       
   508 
       
   509 /**
       
   510 @deprecated
       
   511 
       
   512 This method should not be used - it is provided to maintain SC with v7.0s.
       
   513 
       
   514 @return The 4CC of the data supplied by this source.
       
   515 */
       
   516 TFourCC CMMFAudioInput::DataType() const
       
   517 	{
       
   518 	return KMMFFourCCCodePCM16;
       
   519 	}
       
   520 
       
   521 
       
   522 /**
       
   523 Loads audio device drivers and initialise this device.
       
   524 */
       
   525 void CMMFAudioInput::LoadL()
       
   526 	{
       
   527 	//[ do all the work that can fail first
       
   528 	// before we modify the internal state ]
       
   529 
       
   530 	iMMFDevSound = CMMFDevSound::NewL();
       
   531 	iFirstBufferRequested = EFalse;
       
   532 	iFirstBufferRead = EFalse;
       
   533 	if (iState != EDevSoundReady) 
       
   534 		{
       
   535 		iState = EIdle;
       
   536 		}
       
   537 
       
   538 	iDevSoundLoaded = ETrue;
       
   539 
       
   540 	//[ assert dev sound has been constructed]
       
   541 	ASSERT( iMMFDevSound );
       
   542 	ASSERT( iDevSoundLoaded );
       
   543     ASSERT( !iFirstBufferRead );
       
   544 	}
       
   545 
       
   546 void CMMFAudioInput::DeviceMessage(TUid /*aMessageType*/, const TDesC8& /* aMsg */)
       
   547 	{
       
   548 	}
       
   549 
       
   550 void CMMFAudioInput::InitializeComplete(TInt aError)
       
   551 	{
       
   552 	if (aError == KErrNone)
       
   553 		iState = EDevSoundReady;
       
   554 	}
       
   555 
       
   556 	
       
   557 /**
       
   558 ToneFinished MMFDevSoundObserver - should never get called.
       
   559 */
       
   560 void CMMFAudioInput::ToneFinished(TInt /*aError*/)
       
   561 	{
       
   562 	//we should never get here during a record session!
       
   563 	__ASSERT_DEBUG(EFalse,InputPanic(EMMFAudioInputPanicToneFinishedNotSupported));
       
   564 	}
       
   565 
       
   566 
       
   567 /**
       
   568 BuffferToBeEmptied MMFDevSoundObserver
       
   569 Called when stopped due to error.
       
   570 */
       
   571 void CMMFAudioInput::BufferToBeEmptied(CMMFBuffer* aBuffer)
       
   572 	{
       
   573 	iDevSoundBuf = aBuffer;
       
   574 
       
   575 	if (iFirstBufferRequested)
       
   576 		{
       
   577 		if (iPausePending)
       
   578 			{
       
   579 			aBuffer->SetLastBuffer(ETrue);
       
   580 			iPausePending = EFalse;
       
   581 			}
       
   582 
       
   583 #ifdef _DEBUG
       
   584 		TRAPD(err, iConsumer->BufferFilledL(aBuffer));
       
   585 		__ASSERT_DEBUG(!err, InputPanic(err));
       
   586 #else
       
   587 		TRAP_IGNORE(iConsumer->BufferFilledL(aBuffer));
       
   588 #endif
       
   589 
       
   590 		iFirstBufferRead = ETrue;
       
   591 		}
       
   592 	}	
       
   593 
       
   594 
       
   595 /**
       
   596 RecordError MMFDevSoundObserver
       
   597 Called when stopped due to error.
       
   598 */
       
   599 void CMMFAudioInput::RecordError(TInt aError)
       
   600 	{
       
   601 	//[  two event categories will be used
       
   602 	// which mirrors the datapath response ]
       
   603 
       
   604 	//[ record the error ]
       
   605 	iMMFDevsoundError = aError;
       
   606 	TMMFEvent event( KMMFEventCategoryPlaybackComplete, aError);
       
   607 	
       
   608 	//[ send the event to the client.
       
   609 	SendEventToClient(event);    
       
   610 	
       
   611 	// clear flags if there is an error.
       
   612 	iPausePending = EFalse;
       
   613 
       
   614 	//[ we are not going to stop devsound ]
       
   615 	}
       
   616 
       
   617 
       
   618 /**
       
   619 BufferToBeFilled MMFDevSoundObserver - should never get called.
       
   620 */
       
   621 void CMMFAudioInput::BufferToBeFilled(CMMFBuffer* /*aBuffer*/)
       
   622 	{
       
   623 	//we should never get here during a play session!
       
   624 	__ASSERT_DEBUG(EFalse, InputPanic(EMMFAudioInputPanicPlayerDataUsedNotSupported));
       
   625 	}
       
   626 
       
   627 
       
   628 /**
       
   629 PlayError MMFDevSoundObserver - should never get called.
       
   630 */
       
   631 void CMMFAudioInput::PlayError(TInt /*aError*/)
       
   632 	{
       
   633 	//we should never get here during a record session!
       
   634 	__ASSERT_DEBUG(EFalse, InputPanic(EMMFAudioInputPanicPlayErrorNotSupported));
       
   635 	}
       
   636 
       
   637 
       
   638 /**
       
   639 ConvertError MMFDevSoundObserver - should never get called.
       
   640 */
       
   641 void CMMFAudioInput::ConvertError(TInt /*aError*/)
       
   642 	{
       
   643 	}
       
   644 
       
   645 
       
   646 void CMMFAudioInput::SendEventToClient(const TMMFEvent& aEvent)
       
   647 	{
       
   648 	iEventHandler->SendEventToClient(aEvent);
       
   649 	}
       
   650 
       
   651 // _________________________________________________________________________
       
   652 // Exported proxy for instantiation method resolution
       
   653 // Define the interface UIDs
       
   654 
       
   655 const TImplementationProxy ImplementationTable[] = 
       
   656 	{
       
   657 		IMPLEMENTATION_PROXY_ENTRY(KMmfUidAudioInputInterface,	CMMFAudioInput::NewSourceL)
       
   658 	};
       
   659