--- a/mmdevicefw/mdf/src/audio/mdasoundadapter/mdasoundadapter.h Thu Aug 19 11:23:35 2010 +0300
+++ b/mmdevicefw/mdf/src/audio/mdasoundadapter/mdasoundadapter.h Tue Aug 31 16:43:06 2010 +0300
@@ -23,7 +23,7 @@
#define MDADEVSOUNDNAME _L8("RMdaDevSound")
-/**
+/*
Adapter class which routes the calls on RMdaDevSound(old sound driver interface) to RSoundSc(new sound driver interface).
The purpose of this class is to use the new sound driver in MDF without changing the calling code. This class
does not support any new functionalities supported by the shared chunk sound driver but supports the functionality of the
@@ -33,165 +33,165 @@
{
class CBody;
public:
- /**
+ /*
enum for major, minor and build version of sound device driver.
*/
enum TVer {EMajorVersionNumber=1,EMinorVersionNumber=0,EBuildVersionNumber=KE32BuildVersionNumber};
- /**
+ /*
enum for sound media device play/record request.
*/
enum TMdaRequest
{
- /** Play data request */
+ /* Play data request */
EMdaRequestPlayData,
- /** Play error notification */
+ /* Play error notification */
EMdaRequestPlayErrorNotification,
- /** Record data request */
+ /* Record data request */
EMdaRequestRecordData,
- /** Record error notification */
+ /* Record error notification */
EMdaRequestRecordErrorNotification
};
- /** enum for media device control request */
+ /* enum for media device control request */
enum TMdaControl
{
- /** play format (capability) supported request */
+ /* play format (capability) supported request */
EMdaControlPlayFormatsSupported,
- /** get the current play format request */
+ /* get the current play format request */
EMdaControlGetPlayFormat,
- /** set the play format request */
+ /* set the play format request */
EMdaControlSetPlayFormat,
- /** get play volume request */
+ /* get play volume request */
EMdaControlGetPlayVolume,
- /** set play volume request */
+ /* set play volume request */
EMdaControlSetPlayVolume,
- /** record format supported request */
+ /* record format supported request */
EMdaControlRecordFormatsSupported,
- /** get the current record format request */
+ /* get the current record format request */
EMdaControlGetRecordFormat,
- /** set record format request */
+ /* set record format request */
EMdaControlSetRecordFormat,
- /** get record volume request */
+ /* get record volume request */
EMdaControlGetRecordLevel,
- /** set record volume request */
+ /* set record volume request */
EMdaControlSetRecordLevel,
- /** stop play request */
+ /* stop play request */
EMdaControlFlushPlayBuffer,
- /** stop record request */
+ /* stop record request */
EMdaControlFlushRecordBuffer,
- /** bytes played request */
+ /* bytes played request */
EMdaControlBytesPlayed,
- /** set base value for the bytes played */
+ /* set base value for the bytes played */
EMdaControlResetBytesPlayed,
- /** Investigate for sound media driver request */
+ /* Investigate for sound media driver request */
EMdaControlIsMdaSound,
- /** pause play request */
+ /* pause play request */
EMdaControlPausePlayBuffer,
- /** resume play request */
+ /* resume play request */
EMdaControlResumePlaying
};
- /**
+ /*
This enum corresponds to supported sound encoding schemes
*/
enum TMdaSoundEncoding
{
- /** sound encoding(compression) using 8 bit PCM (pulse code modulation) */
+ /* sound encoding(compression) using 8 bit PCM (pulse code modulation) */
EMdaSoundEncoding8BitPCM = 0x00000001,
- /** sound encoding using 16 bit PCM */
+ /* sound encoding using 16 bit PCM */
EMdaSoundEncoding16BitPCM = 0x00000002,
- /** sound encoding using 8 bit A law */
+ /* sound encoding using 8 bit A law */
EMdaSoundEncoding8BitALaw = 0x00000004,
- /** sound encoding using 8 bit Mu law */
+ /* sound encoding using 8 bit Mu law */
EMdaSoundEncoding8BitMuLaw = 0x00000008,
};
- /**
+ /*
This class corresponds to a supported sound format.
The format describes the supported audio device's min/max sampling rate, encoding, channels and buffer size of play/record and volume.
*/
class TSoundFormatsSupported
{
public:
- /**
+ /*
This corresponds to minimum sample rate supported. This depends on the physical sound device used(example: 8000 hertz).
*/
TInt iMinRate;
- /**
+ /*
This corresponds to maximum sample rate supported. This depends on the physical sound device used(example: 48000 hertz).
*/
TInt iMaxRate;
- /**
+ /*
This corresponds to encoding format supported.
@see TMdaSoundEncoding
*/
TUint32 iEncodings;
- /**
+ /*
This corresponds to the number of sound channels supported. Possible values are EMono for a single channel and EStereo for two channel sound.
Also this depends on the physical device used.
*/
TInt iChannels;
- /**
+ /*
This corresponds to minimum buffer size. This depends on the physical device used and sampling rate adapted.
@see KSoundMinBufferSize
*/
TInt iMinBufferSize;
- /**
+ /*
This corresponds to maximum buffer size.This depends on the physical device used and sampling rate adapted.
@see KSoundPlayBufferSize
@see KSoundRecordBufferSize
*/
TInt iMaxBufferSize;
- /**
+ /*
This corresponds to minimum play/record volume.
*/
TInt iMinVolume;
- /**
+ /*
This corresponds to maximum play/record volume.
*/
TInt iMaxVolume;
};
- /** A typedef'd packaged RMdaDevSound::TSoundFormatsSupported for passing through a generic API method */
+ /* A typedef'd packaged RMdaDevSound::TSoundFormatsSupported for passing through a generic API method */
typedef TPckgBuf<TSoundFormatsSupported> TSoundFormatsSupportedBuf;
- /**
+ /*
This class corresponds to current supported sound format.
The format describes the supported audio device's sampling rate, encoding, channels and buffer size of play/record.
*/
class TCurrentSoundFormat
{
public:
- /**
+ /*
This corresponds to sound sampling rate like (44000 Hertz, 8000 Hertz). The possible values depends on the physical device used.
*/
TInt iRate;
- /**
+ /*
@see TMdaSoundEncoding
*/
TMdaSoundEncoding iEncoding;
- /**
+ /*
This corresponds to the number of sound channels supported. Possible values are EMono for a single channel and EStereo for two channel sound.
Also this depends on the physical device used.
*/
TInt iChannels;
- /**
+ /*
Play or Record buffer size. The possible value depends on the physical device used.
*/
TInt iBufferSize;
};
- /** A typedef'd packaged RMdaDevSound::TCurrentSoundFormat for passing through a generic API method */
+ /* A typedef'd packaged RMdaDevSound::TCurrentSoundFormat for passing through a generic API method */
typedef TPckgBuf<TCurrentSoundFormat> TCurrentSoundFormatBuf;
public:
IMPORT_C RMdaDevSound();
@@ -202,7 +202,9 @@
IMPORT_C void GetPlayFormat(TCurrentSoundFormatBuf& aFormat);
IMPORT_C TInt SetPlayFormat(const TCurrentSoundFormatBuf& aFormat);
IMPORT_C TInt PlayVolume();
- IMPORT_C void SetPlayVolume(TInt aVolume);
+ // This function mimics RMdaDevSound interface with linear volume semantics
+ IMPORT_C void SetPlayVolume(TInt aLinearVolume);
+ // This function supports volume change with logarithmic semantics
IMPORT_C void SetVolume(TInt aLogarithmicVolume);
IMPORT_C void PlayData(TRequestStatus& aStatus,const TDesC8& aData);
IMPORT_C void CancelPlayData();