epoc32/include/mmf/common/mmfutilities.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
     1.1 --- a/epoc32/include/mmf/common/mmfutilities.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/mmf/common/mmfutilities.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,9 +1,9 @@
     1.4  // Copyright (c) 2002-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     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.symbianfoundation.org/legal/licencesv10.html".
    1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12  //
    1.13  // Initial Contributors:
    1.14  // Nokia Corporation - initial contribution.
    1.15 @@ -213,155 +213,13 @@
    1.16  	TUint32 iFourCC;
    1.17  };
    1.18  
    1.19 -/**
    1.20 -@internalAll
    1.21  
    1.22 -Base utility class to change the sample rate of audio data in a buffer
    1.23 -*/
    1.24 -class CMMFChannelAndSampleRateConverter : public CBase
    1.25 -	{
    1.26 -public:
    1.27 -	/**
    1.28 -	Reads the audio data from the source buffer,
    1.29 -	converts the number of channels and the sample rate
    1.30 -	and copies the result to the destination buffer
    1.31 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
    1.32 +#include <mmf/common/mmfhelper.h>
    1.33 +#endif
    1.34  
    1.35 -	@param  aSrcBuffer
    1.36 -	        A pointer to a source buffer containing the audio data to convert.
    1.37 -	@param  aDstBuffer
    1.38 -	        A pointer to a destination buffer.
    1.39 -
    1.40 -	@return The length of the destination buffer.
    1.41 -	*/
    1.42 -	virtual TInt Convert(const CMMFDataBuffer& aSrcBuffer, CMMFDataBuffer& aDstBuffer) =0;
    1.43 -	virtual void Reset() {};
    1.44 -
    1.45 -	/*
    1.46 -	Indicates what buffer size is required to hold the converted data.
    1.47 -	*/
    1.48 -	virtual TUint MaxConvertBufferSize(TUint aSrcBufferSize) {return aSrcBufferSize;}
    1.49 -
    1.50 -	void SetRates(TInt aSrcRate,TInt aSrcChannels,TInt aDstRate,TInt aDstChannels);
    1.51 -public:
    1.52 -	/*
    1.53 -	The sample rate of the data in the source buffer
    1.54 -	*/
    1.55 -	TInt iFromRate;
    1.56 -	/*
    1.57 -	The sample rate of the data in the destination buffer
    1.58 -	*/
    1.59 -	TInt iToRate;
    1.60 -	/*
    1.61 -	The number of channels of data in the source buffer
    1.62 -	*/
    1.63 -	TInt iFromChannels;
    1.64 -	/*
    1.65 -	The number of channels of data in the destination buffer
    1.66 -	*/
    1.67 -	TInt iToChannels;
    1.68 -protected:
    1.69 -	TReal iRatio;
    1.70 -	TInt iFraction;
    1.71 -	TInt iIndex;
    1.72 -	};
    1.73 -
    1.74 -/**
    1.75 -@internalAll
    1.76 -*/
    1.77 -class CMMFStereoToMonoRateConverter : public CMMFChannelAndSampleRateConverter
    1.78 -	{
    1.79 -	public:
    1.80 -		virtual TInt Convert(const CMMFDataBuffer& aSrcBuffer, CMMFDataBuffer& aDstBuffer);
    1.81 -		virtual TUint MaxConvertBufferSize(TUint aSrcBufferSize);
    1.82 -
    1.83 -	};
    1.84 -
    1.85 -/**
    1.86 -@internalAll
    1.87 -*/
    1.88 -class CMMFStereoToMonoConverter : public CMMFChannelAndSampleRateConverter
    1.89 -	{
    1.90 -	public:
    1.91 -		virtual TInt Convert(const CMMFDataBuffer& aSrcBuffer, CMMFDataBuffer& aDstBuffer);
    1.92 -		virtual TUint MaxConvertBufferSize(TUint aSrcBufferSize);
    1.93 -	};
    1.94 -
    1.95 -/**
    1.96 -@internalAll
    1.97 -*/
    1.98 -class CMMFStereoToStereoRateConverter : public CMMFChannelAndSampleRateConverter
    1.99 -	{
   1.100 -	public:
   1.101 -		virtual TInt Convert(const CMMFDataBuffer& aSrcBuffer, CMMFDataBuffer& aDstBuffer);
   1.102 -	};
   1.103 -
   1.104 -/**
   1.105 -@internalAll
   1.106 -*/
   1.107 -class CMMFMonoToMonoRateConverter : public CMMFChannelAndSampleRateConverter
   1.108 -	{
   1.109 -	public:
   1.110 -		virtual TInt Convert(const CMMFDataBuffer& aSrcBuffer, CMMFDataBuffer& aDstBuffer);
   1.111 -	};
   1.112 -
   1.113 -/**
   1.114 -@internalAll
   1.115 -*/
   1.116 -class CMMFMonoToStereoConverter : public CMMFChannelAndSampleRateConverter
   1.117 -	{
   1.118 -	public:
   1.119 -		virtual TInt Convert(const CMMFDataBuffer& aSrcBuffer, CMMFDataBuffer& aDstBuffer);
   1.120 -		virtual TUint MaxConvertBufferSize(TUint aSrcBufferSize);
   1.121 -	};
   1.122 -
   1.123 -/**
   1.124 -@internalAll
   1.125 -*/
   1.126 -class CMMFMonoToStereoRateConverter : public CMMFChannelAndSampleRateConverter
   1.127 -	{
   1.128 -	public:
   1.129 -		virtual TInt Convert(const CMMFDataBuffer& aSrcBuffer, CMMFDataBuffer& aDstBuffer);
   1.130 -		virtual TUint MaxConvertBufferSize(TUint aSrcBufferSize);
   1.131 -	};
   1.132 -
   1.133 -/**
   1.134 -@internalAll
   1.135 -
   1.136 -Factory class to create the appropriate CMMFChannelAndSampleRateConverter-derived
   1.137 -class depending on the supplied number of channels and bit rate
   1.138 -*/
   1.139 -class CMMFChannelAndSampleRateConverterFactory : public CBase
   1.140 -	{
   1.141 -
   1.142 -public:
   1.143 -	IMPORT_C CMMFChannelAndSampleRateConverter* CreateConverterL(TInt aFromRate,TInt aFromChannels,
   1.144 -												 TInt aToRate,TInt aToChannels);
   1.145 -	IMPORT_C CMMFChannelAndSampleRateConverter* CreateConverterL();
   1.146 -	CMMFChannelAndSampleRateConverter* Converter() {return iConverter;}
   1.147 -	IMPORT_C ~CMMFChannelAndSampleRateConverterFactory();
   1.148 -	TInt Rate() {return iToRate;}
   1.149 -	TInt Channels() {return iToChannels;}
   1.150 -public:
   1.151 -	/**
   1.152 -	The sample rate of the data in the source buffer
   1.153 -	*/
   1.154 -	TInt iFromRate;
   1.155 -	/**
   1.156 -	The sample rate of the data in the destination buffer
   1.157 -	*/
   1.158 -	TInt iToRate;
   1.159 -	/**
   1.160 -	The number of channels of data in the source buffer
   1.161 -	*/
   1.162 -	TInt iFromChannels;
   1.163 -	/**
   1.164 -	The number of channels of data in the destination buffer
   1.165 -	*/
   1.166 -	TInt iToChannels;
   1.167 -private:
   1.168 -	CMMFChannelAndSampleRateConverter* iConverter;
   1.169 -	};
   1.170  
   1.171  #include <mmf/common/mmfutilities.inl>
   1.172  
   1.173  #endif
   1.174 +