Update contrib.
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 class CWavDecodeUtility: public CBase
19 static CWavDecodeUtility* NewL(TDesC8& aBuffer);
22 inline TUint GetChannels(void) const {return iChannels;};
23 inline TUint GetSampleRate(void) const {return iSampleRate;};
24 inline TUint GetBitsPerSample(void) const {return iBitsPerSample;};
25 inline TUint GetDataLength(void) const {return iDataLength;};
27 inline TUint GetSamples(void) const {return iDataLength / (iChannels * iBitsPerSample / 8);};
32 void ConstructL(TDesC8& aBuffer);
33 TUint16 Read16(const TUint8* aPtr);
34 TUint32 Read32(const TUint8* aPtr);
35 void FindRiffChunksL(void);
36 void ProcessFormatHeaderL();
37 void ReadChunk(TMdaRiffChunk* aChunk);
38 void AssignChunkTo(TMdaRiffChunk* aAssignedChunk);
41 // CMMFDataBuffer* iBuffer;
43 const TUint8* iStartPtr;
44 TUint iLastReadPosition;
46 TMdaRiffChunk iCurrent;
47 TMdaRiffChunk iFormatChunk;
48 TMdaRiffChunk iFactChunk;
49 TMdaRiffChunk iDataChunk;
50 TUint iRiffChunkLength;
58 TUint iBlockAlign; //needed for correct IMA
62 TUint iAverageBytesPerSecond; //needed for correct IMA
63 TUint iSamplesPerBlock;