sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: sl@0: sl@0: // INCLUDES sl@0: #include sl@0: #include "sounddevicebody.h" sl@0: sl@0: /* sl@0: * Default Constructor. sl@0: */ sl@0: CMMFDevSound::CMMFDevSound() sl@0: { sl@0: } sl@0: sl@0: /* sl@0: * Destructor. sl@0: */ sl@0: EXPORT_C CMMFDevSound::~CMMFDevSound() sl@0: { sl@0: delete iBody; sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::NewL sl@0: * sl@0: * Constructs and returns a pointer to a new CMMFDevSound object. sl@0: */ sl@0: EXPORT_C CMMFDevSound* CMMFDevSound::NewL() sl@0: { sl@0: CMMFDevSound* self = new (ELeave) CMMFDevSound; sl@0: CleanupStack::PushL(self); sl@0: self->ConstructL(); sl@0: CleanupStack::Pop(self); sl@0: return self; sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::ConstructL sl@0: * sl@0: * Second phase constructor. sl@0: */ sl@0: void CMMFDevSound::ConstructL() sl@0: { sl@0: iBody = CBody::NewL(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::InitializeL sl@0: * sl@0: * Initializes CMMFDevSound object. On completion of Initialization will sl@0: * call InitializeComplete() on aDevSoundObserver. sl@0: * sl@0: * @param aDevSoundObserver. A reference to the DevSound Observer instance. sl@0: * @param aMode. A mode for which this object will be used. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::InitializeL(MDevSoundObserver& aDevSoundObserver,TMMFState aMode) sl@0: sl@0: { sl@0: iBody->InitializeL(aDevSoundObserver,aMode); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::InitializeL sl@0: * sl@0: * Initializes CMMFDevSound object with hardware device aHWDev. On completion sl@0: * of Initialization will call InitializeComplete() on aDevSoundObserver. sl@0: * sl@0: * Method is deprecated from OS release 9.5 sl@0: * sl@0: * @param aDevSoundObserver. A reference to the DevSound Observer instance. sl@0: * @param aHWDev. CMMFHwDevice implementation identifier. sl@0: * @param aMode. A mode for which this object will be used. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::InitializeL( sl@0: MDevSoundObserver& /*aDevSoundObserver*/, sl@0: TUid /*aHWDev*/, sl@0: TMMFState /*aMode*/) sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::InitializeL sl@0: * sl@0: * Initializes CMMFDevSound object with hardware device with hardware sl@0: * device's FourCC code. On completion of Initialization will call sl@0: * InitializeComplete() on aDevSoundObserver. sl@0: * sl@0: * @param aDevSoundObserver. A reference to the DevSound Observer instance. sl@0: * @param aDesiredFourCC. CMMFHwDevice implementation FourCC. sl@0: * @param aMode. A mode for which this object will be used. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::InitializeL( sl@0: MDevSoundObserver& aDevSoundObserver, sl@0: TFourCC aDesiredFourCC, sl@0: TMMFState aMode) sl@0: { sl@0: iBody->InitializeL(aDevSoundObserver, aDesiredFourCC, aMode); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::Capabilities sl@0: * sl@0: * Returns supported Audio settings. sl@0: * sl@0: * @return TMMFCapabilities device settings. sl@0: */ sl@0: EXPORT_C TMMFCapabilities CMMFDevSound::Capabilities() sl@0: { sl@0: return iBody->Capabilities(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::Config sl@0: * sl@0: * Returns current audio settings. sl@0: * sl@0: * @return TMMFCapabilities device settings. sl@0: */ sl@0: EXPORT_C TMMFCapabilities CMMFDevSound::Config() const sl@0: { sl@0: return iBody->Config(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::SetConfigL sl@0: * sl@0: * ConfigureS CMMFDevSound object with the settings in aConfig. sl@0: * sl@0: * Use this to set sampling rate, Encoding and Mono/Stereo. sl@0: * sl@0: * @param aConfig. CMMFDevSound configuration settings. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::SetConfigL(const TMMFCapabilities& aConfig) sl@0: { sl@0: iBody->SetConfigL(aConfig); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::MaxVolume sl@0: * sl@0: * Returns an integer representing the maximum volume. sl@0: * sl@0: * This is the maximum volume which can be passed to CMMFDevSound::SetVolume. sl@0: * sl@0: * @return TInt sl@0: * The maximum volume. This value is platform dependent but is always sl@0: * greater than or equal to one. sl@0: */ sl@0: EXPORT_C TInt CMMFDevSound::MaxVolume() sl@0: { sl@0: return iBody->MaxVolume(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::Volume sl@0: * sl@0: * Returns an integer representing current volume level. sl@0: * sl@0: * @return TInt sl@0: * Current volume level. sl@0: */ sl@0: EXPORT_C TInt CMMFDevSound::Volume() sl@0: { sl@0: return iBody->Volume(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::SetVolume sl@0: * sl@0: * Changes current volume level to the specified value. sl@0: * sl@0: * The volume can be changed before or during playback and is effective sl@0: * immediately. sl@0: * sl@0: * @param TInt sl@0: * The volume setting. This can be any value between zero and the sl@0: * value returned by the call to CMMFDevSound::MaxVolume(). If the sl@0: * volume is out of range, it is automatically set to the minimum or sl@0: * maximum level closest to the value being passed in. Setting a zero sl@0: * value mutes the sound. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::SetVolume(TInt aVolume) sl@0: { sl@0: iBody->SetVolume(aVolume); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::MaxGain sl@0: * sl@0: * Returns an integer representing the maximum microphone gain. sl@0: * sl@0: * This is the maximum value which can be passed to CMMFDevSound::SetGain. sl@0: * sl@0: * @return TInt sl@0: * The maximum gain. This value is platform dependent but is always sl@0: * greater than or equal to one. sl@0: */ sl@0: EXPORT_C TInt CMMFDevSound::MaxGain() sl@0: { sl@0: return iBody->MaxGain(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::Gain sl@0: * sl@0: * Returns an integer representing current gain. sl@0: * sl@0: * @return TInt sl@0: * The current gain level. sl@0: */ sl@0: EXPORT_C TInt CMMFDevSound::Gain() sl@0: { sl@0: return iBody->Gain(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::SetGain sl@0: * sl@0: * Changes current recording gain to a specified value. sl@0: * sl@0: * The gain can be changed before or during recording and is effective sl@0: * immediately. sl@0: * sl@0: * @param aGain. This can be any value between zero and the sl@0: * value returned by the call to CMMFDevSound::MaxGain(). If the sl@0: * gain is out of range, it is automatically set to minimum or maximum sl@0: * value closest to the value that is being passed. sl@0: * Setting a zero value mutes the microphone. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::SetGain(TInt aGain) sl@0: { sl@0: iBody->SetGain(aGain); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::GetPlayBalanceL sl@0: * sl@0: * Returns the speaker balance set for playing. sl@0: * sl@0: * @param aLeftPercentage. On return contains the left speaker volume percentage. sl@0: * @param aRightPercentage. On return contains the left speaker volume percentage. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::GetPlayBalanceL(TInt& aLeftPercentage,TInt& aRightPercentage) sl@0: { sl@0: iBody->GetPlayBalanceL(aLeftPercentage, aRightPercentage); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::SetPlayBalanceL sl@0: * sl@0: * Sets the speaker balance for playing. sl@0: * sl@0: * The speaker balance can be changed before or during playback and is sl@0: * effective immediately. sl@0: * sl@0: * @param aLeftPercentage. Left speaker volume perecentage. This can be any value between sl@0: * zero and 100. Setting a zero value mutes the sound on the left sl@0: * speaker. sl@0: * @param aRightPercentage. Right speaker volume perecentage. This can be any value between sl@0: * zero and 100. Setting a zero value mutes the sound on the right sl@0: * speaker. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::SetPlayBalanceL(TInt aLeftPercentage, TInt aRightPercentage) sl@0: { sl@0: iBody->SetPlayBalanceL(aLeftPercentage, aRightPercentage); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::GetRecordBalanceL sl@0: * sl@0: * Returns the microphone gain balance set for recording. sl@0: * sl@0: * @param aLeftPercentage. On return contains the left microphone gain percentage. sl@0: * @param aRightPercentage. On return contains the right microphone gain percentage. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::GetRecordBalanceL(TInt& aLeftPercentage, TInt& aRightPercentage) sl@0: { sl@0: iBody->GetRecordBalanceL(aLeftPercentage, aRightPercentage); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::SetRecordBalanceL sl@0: * sl@0: * Sets the microphone gain balance for recording. sl@0: * sl@0: * The microphone gain balance can be changed before or during recording and sl@0: * is effective immediately. sl@0: * sl@0: * @param aLeftPercentage. Left microphone gain precentage. This can be any value between zero sl@0: * and 100. Setting a zero value mutes the gain on the left microphone. sl@0: * @param aRightPercentage. Right microphone gain precentage. This can be any value between zero sl@0: * and 100. Setting a zero value mutes the gain on the right microphone sl@0: */ sl@0: EXPORT_C void CMMFDevSound::SetRecordBalanceL(TInt aLeftPercentage,TInt aRightPercentage) sl@0: { sl@0: iBody->SetRecordBalanceL(aLeftPercentage, aRightPercentage); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::PlayInitL sl@0: * sl@0: * Initializes audio device and starts the playback. Before playback can be sl@0: * started, its current client's access priority is first verified by the sl@0: * audio policy. In case of an error during the policy initialization, the sl@0: * PlayError() method will be called on the observer with KErrAccessDenied sl@0: * error code, otherwise BufferToBeFilled() method will be called with a sl@0: * buffer reference. After filling the buffer with the data, the client sl@0: * should call PlayData() to start playback. sl@0: * sl@0: * The amount of data that can be played is specified in sl@0: * CMMFBuffer::RequestSize(). Any data that is read into the buffer beyond sl@0: * this size will be ignored. sl@0: * sl@0: */ sl@0: EXPORT_C void CMMFDevSound::PlayInitL() sl@0: { sl@0: iBody->PlayInitL(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::RecordInitL sl@0: * sl@0: * Initializes audio device and starts the recording. Before recording can be sl@0: * started, its current client's access priority is first verified by the sl@0: * audio policy. In case of an error during the policy initialization, the sl@0: * RecordError() method will be called on the observer with KErrAccessDenied sl@0: * error code, otherwise BufferToBeEmptied() method will be called with a sl@0: * buffer reference. This buffer contains recorded or encoded data. After sl@0: * processing the data in the buffer, the client should call RecordData() sl@0: * to continue recording process. sl@0: * sl@0: * The amount of data that is available is specified in sl@0: * CMMFBuffer::RequestSize(). sl@0: * sl@0: */ sl@0: EXPORT_C void CMMFDevSound::RecordInitL() sl@0: { sl@0: iBody->RecordInitL(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::PlayData sl@0: * sl@0: * Plays data in the buffer. The client should fill the buffer with a stream sl@0: * of sampled audio data before calling this method. The observer gets the sl@0: * reference to the buffer along with BufferToBeFilled() callback. When sl@0: * playing of the audio sample is complete, with success or not, the sl@0: * PlayError() method is called on the observer. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::PlayData() sl@0: { sl@0: iBody->PlayData(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::RecordData sl@0: * sl@0: * Records audio data. Once the buffer is filled with recorded sampled audio sl@0: * data, the observer gets reference to the buffer along with sl@0: * BufferToBeEmptied() callback. After processing of the buffer (copying over sl@0: * to a different buffer or writing to a file) the client should call this sl@0: * method again to continue recording process. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::RecordData() sl@0: { sl@0: iBody->RecordData(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::Stop sl@0: * sl@0: * Stops the ongoing operation (Play, Record, TonePlay) sl@0: */ sl@0: EXPORT_C void CMMFDevSound::Stop() sl@0: { sl@0: iBody->Stop(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::Pause sl@0: * sl@0: * Temporarily suspends the ongoing operation (Play, Record, TonePlay) sl@0: */ sl@0: EXPORT_C void CMMFDevSound::Pause() sl@0: { sl@0: iBody->Pause(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::SamplesRecorded sl@0: * sl@0: * Returns the number of recorded samples up to this point. sl@0: * sl@0: * @return TInt sl@0: * Value representing recorded samples. sl@0: */ sl@0: EXPORT_C TInt CMMFDevSound::SamplesRecorded() sl@0: { sl@0: return iBody->SamplesRecorded(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::SamplesPlayed sl@0: * sl@0: * Returns the number of played samples up to this point. sl@0: * sl@0: * @return TInt sl@0: * Value representing played samples. sl@0: */ sl@0: EXPORT_C TInt CMMFDevSound::SamplesPlayed() sl@0: { sl@0: return iBody->SamplesPlayed(); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::PlayToneL sl@0: * sl@0: * Initializes audio device and starts playing a single tone according with sl@0: * the specified frequency and duration attributes. sl@0: * sl@0: * @param aFrequency. Frequency at with the tone will be played. sl@0: * @param aDuration. The period over which the tone will be played. A zero value causes sl@0: * no tone to be played. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::PlayToneL(TInt aFrequency,const TTimeIntervalMicroSeconds& aDuration) sl@0: { sl@0: iBody->PlayToneL(aFrequency, aDuration); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::PlayDualToneL sl@0: * sl@0: * Initializes audio device and starts playing a dual tone. sl@0: * The tone consists of two sine waves of different frequencies summed sl@0: * together. Both frequencies and the duration are specified in the passed sl@0: * in attributes. sl@0: * sl@0: * @param aFrequencyOne. Value representing first frequency of the dual tone. sl@0: * sl@0: * @param aFrequencyTwo. Value representing second frequency of the dual tone. sl@0: * sl@0: * @param aDuration. The period over which the tone will be played. A zero value causes sl@0: * no tone to be played. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::PlayDualToneL( sl@0: TInt aFrequencyOne, sl@0: TInt aFrequencyTwo, sl@0: const TTimeIntervalMicroSeconds& aDuration) sl@0: { sl@0: iBody->PlayDualToneL(aFrequencyOne, aFrequencyTwo, aDuration); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::PlayDTMFStringL sl@0: * sl@0: * Initializes audio device and starts playing DTMF string. sl@0: * sl@0: * @param aDTMFString. DTMF sequence in a descriptor. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::PlayDTMFStringL(const TDesC& aDTMFString) sl@0: { sl@0: iBody->PlayDTMFStringL(aDTMFString); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::PlayToneSequenceL sl@0: * sl@0: * Initializes audio device and starts playing tone sequence. sl@0: * sl@0: * @param aData. Tone sequence in a descriptor. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::PlayToneSequenceL(const TDesC8& aData) sl@0: { sl@0: iBody->PlayToneSequenceL(aData); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::PlayFixedSequenceL sl@0: * sl@0: * Initializes audio device and starts playing the specified tone sequence. sl@0: * sl@0: * Method is deprecated from OS release 9.5 sl@0: * sl@0: * @param aSequenceNumber. The index identifying the specific pre-defined tone sequence. The sl@0: * index values are relative to zero. This can be any value between sl@0: * zero and the value returned by the call to sl@0: * CMdaAudioPlayerUtility::FixedSequenceCount() - 1. The function sl@0: * raises a panic if sequence number is out of range. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::PlayFixedSequenceL(TInt /*aSequenceNumber*/) sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::SetToneRepeats sl@0: * sl@0: * Defines the number of times the audio is to be repeated during the tone sl@0: * playback operation. sl@0: * sl@0: * A period of silence can follow each playing of tone. The tone playing can sl@0: * be repeated indefinitely. sl@0: * sl@0: * @param aRepeatCount. The number of times the tone, together with the trailing silence, sl@0: * is to be repeated. If this is set to KMdaRepeatForever, then the sl@0: * tone, together with the trailing silence, is repeated indefinitely sl@0: * or until Stop() is called. If this is set to zero, then the tone is sl@0: * not repeated. Supported only during the tone playing. sl@0: sl@0: * @param aRepeatTrailingSilence. The duration of the trailing silence. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::SetToneRepeats(TInt aRepeatCount,const TTimeIntervalMicroSeconds& aRepeatTrailingSilence) sl@0: { sl@0: iBody->SetToneRepeats(aRepeatCount, aRepeatTrailingSilence); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::SetDTMFLengths sl@0: * sl@0: * Defines the duration of 'tone on/tone off' and 'tone pause' to be used sl@0: * during the DTMF playback. sl@0: * sl@0: * Supported only during tone playing. sl@0: * sl@0: * @param aToneOnLength. The period over which the tone will be played. If this is set to sl@0: * zero, then the tone is not played. sl@0: * sl@0: * @param aToneOffLength. The period over which 'no tone' will be played. sl@0: * sl@0: * @param aPauseLength. The period over which the tone playing will be paused. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::SetDTMFLengths( sl@0: TTimeIntervalMicroSeconds32& aToneOnLength, sl@0: TTimeIntervalMicroSeconds32& aToneOffLength, sl@0: TTimeIntervalMicroSeconds32& aPauseLength) sl@0: { sl@0: iBody->SetDTMFLengths(aToneOnLength, aToneOffLength, aPauseLength); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::SetVolumeRamp sl@0: * sl@0: * Defines the period over which the volume level will rise smoothly from sl@0: * mute to the normal volume level. sl@0: * sl@0: * @param aRampDuration. The period over which the volume is to rise. A zero value causes sl@0: * the tone sample to be played at the normal level for the full duration of the sl@0: * playback. A value, which is longer than the duration sl@0: * of the tone sample, will result in the sample never reaching its sl@0: * normal volume level. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) sl@0: { sl@0: iBody->SetVolumeRamp(aRampDuration); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::SetPrioritySettings sl@0: * sl@0: * Defines the priority settings that should be used for this instance. sl@0: * sl@0: * @param aPrioritySettings. A structure representing client's priority, priority sl@0: * preference and the state. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::SetPrioritySettings(const TMMFPrioritySettings& aPrioritySettings) sl@0: { sl@0: iBody->SetPrioritySettings(aPrioritySettings); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::CustomInterface sl@0: * sl@0: * Sends request to the DevSound Server to start custom interface specified sl@0: * by the TUid attribute. sl@0: * sl@0: * @param aInterface. Unique ID of the custom interface sl@0: * sl@0: * @return TAny* sl@0: * Pointer to the custom interface object. sl@0: */ sl@0: EXPORT_C TAny* CMMFDevSound::CustomInterface(TUid aInterface) sl@0: { sl@0: return iBody->CustomInterface(aInterface); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::FixedSequenceCount sl@0: * sl@0: * Returns the number of available pre-defined tone sequences. sl@0: * sl@0: * Method is deprecated from OS release 9.5 sl@0: * sl@0: * This is the number of fixed sequence supported by the DevSound by default. sl@0: * sl@0: * @return TInt sl@0: * The fixed sequence count. This value is implementation dependent sl@0: * but is always greater than or equal to zero. sl@0: */ sl@0: EXPORT_C TInt CMMFDevSound::FixedSequenceCount() sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::FixedSequenceName sl@0: * sl@0: * Returns the name assigned to a specific pre-defined tone sequence. sl@0: * sl@0: * Method is deprecated from OS release 9.5 sl@0: * sl@0: * @param aSequenceNumber. The index identifying the specific pre-defined tone sequence. sl@0: * Index values are relative to zero. This can be any value between sl@0: * zero and the value returned by the call to sl@0: * CMdaAudioPlayerUtility::FixedSequenceCount() - 1. The function sl@0: * raises a panic if sequence number is out of range. sl@0: * sl@0: * @return TDesC& sl@0: * A reference to a descriptor containing fixed sequence name sl@0: * indexed by aSequenceNumber. sl@0: */ sl@0: EXPORT_C const TDesC& CMMFDevSound::FixedSequenceName(TInt /*aSequenceNumber*/) sl@0: { sl@0: return KNullDesC; sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::GetSupportedInputDataTypesL sl@0: * sl@0: * Returns a list of supported input data types that can be sent to the sl@0: * DevSound for playing audio. sl@0: * sl@0: * @param aSupportedDataTypes. An array of supported data types. sl@0: * @param aPrioritySettings. Structure containing priority settings. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::GetSupportedInputDataTypesL(RArray& aSupportedDataTypes,const TMMFPrioritySettings& aPrioritySettings) const sl@0: { sl@0: iBody->GetSupportedInputDataTypesL(aSupportedDataTypes, sl@0: aPrioritySettings); sl@0: } sl@0: sl@0: /* sl@0: * CMMFDevSound::GetSupportedOutputDataTypesL sl@0: * sl@0: * Returns a list of supported output data types that can be received from sl@0: * the DevSound for recording audio. sl@0: * sl@0: * @param aSupportedDataTypes. An array of supported data types. sl@0: * @param aPrioritySettings. Structure containing priority settings. sl@0: */ sl@0: EXPORT_C void CMMFDevSound::GetSupportedOutputDataTypesL(RArray& aSupportedDataTypes,const TMMFPrioritySettings& aPrioritySettings) const sl@0: { sl@0: iBody->GetSupportedOutputDataTypesL(aSupportedDataTypes,aPrioritySettings); sl@0: } sl@0: sl@0: /******************************************************************************** sl@0: * Non Exported public functions ends here * sl@0: ********************************************************************************/ sl@0: sl@0: /****************************************************************************** sl@0: * Function Name: E32Dll sl@0: * sl@0: * Description: Entry point for applications. sl@0: * sl@0: ******************************************************************************/ sl@0: sl@0: enum TDllReason {}; sl@0: EXPORT_C TInt E32Dll(TDllReason /*aReason*/) sl@0: { sl@0: return KErrNone; sl@0: } sl@0: sl@0: // CMMFDevSoundEventHandler::NewL() has been declared in export table sl@0: // but since it is the only class method to be so, and .h is in source sl@0: // it is not actually usable. Just declare the following to keep linker happy sl@0: sl@0: // Need dummy abstract type - this is not the real class sl@0: class RMMFAudioPolicyProxy; sl@0: sl@0: class CMMFDevSoundEventHandler : public CActive sl@0: { sl@0: public: sl@0: IMPORT_C static CMMFDevSoundEventHandler* NewL(RMMFAudioPolicyProxy*); sl@0: private: sl@0: CMMFDevSoundEventHandler(); sl@0: }; sl@0: sl@0: EXPORT_C CMMFDevSoundEventHandler* CMMFDevSoundEventHandler::NewL(RMMFAudioPolicyProxy*) sl@0: { sl@0: _LIT(KModule, "DevSound"); sl@0: User::Panic(KModule, 1000); sl@0: return NULL; sl@0: } sl@0: sl@0: // default constructor - keep compilers happy sl@0: CMMFDevSoundEventHandler::CMMFDevSoundEventHandler(): sl@0: CActive(EPriorityStandard) sl@0: { sl@0: } sl@0: sl@0: sl@0: // End of File