www.pudn.com > Tetris.rar > CMixerThread.h
#ifndef __CMIXERTHREAD_H #define __CMIXERTHREAD_H #include "TAudioShared.h" #include#include #include class CMixerThread : CBase, MMdaAudioOutputStreamCallback { // Construct and destruct public: static TInt ThreadFunction( TAny* aData); // Thread entry point ~CMixerThread(); private: CMixerThread(TAny* aData); TInt Construct(); void ConstructL(); ////////////////////////////////////////////////////////////////////// // Other Method private: static CMixerThread* Create(TAny* aData); static void ExcHandler(TExcType aExc); void HandleException(TExcType aExc); void StartMixer(); void StopMixer(); // MMdaAudioOutputStreamCallback void MaoscPlayComplete( TInt aError ); void MaoscBufferCopied( TInt aError, const TDesC8& aBuffer ); void MaoscOpenComplete( TInt aError ); // void FillBuffer(); ////////////////////////////////////////////////////////////////////// // Data private: CTrapCleanup* iCleanupStack; CActiveScheduler* iActiveScheduler; CMdaAudioOutputStream* iStream; TMdaAudioDataSettings iSet; TInt16* iBuffer; // buffer to CMdaAudioOutput TInt* iMixBuffer; // 32-bit buffer to mixing TPtrC8 iBufferPtr; // pointer to iBuffer TInt iError; // contains CMdaAudioOutput errors TAudioShared& iShared; // reference to shared data with client TInt16* iAudioData[ KMaxChannels ]; // current sample data pointers TInt iAudioPos[ KMaxChannels ]; // These are shifted by KAudioShift TInt iAudioEnd[ KMaxChannels ]; TInt iRepStart[ KMaxChannels ]; TInt iRepEnd[ KMaxChannels ]; }; #endif