www.pudn.com > Full-Duplex_Audio_Example.rar > inputstreamthread.h


/* 
* ============================================================================= 
*  Name        : InputStreamThread.h 
*  Part of     : FullDuplexEx 
*  Description : Thread responsible for handling audio input stream 
                  
*  Version     :  
* 
*  Copyright © 2007 Nokia. All rights reserved. 
*  This material, including documentation and any related  
*  computer programs, is protected by copyright controlled by  
*  Nokia. All rights are reserved. Copying, including  
*  reproducing, storing, adapting or translating, any  
*  or all of this material requires the prior written consent of  
*  Nokia. This material also contains confidential  
*  information which may not be disclosed to others without the  
*  prior written consent of Nokia. 
* ============================================================================= 
*/ 
 
#ifndef __INPUTSTREAMTHREAD_H__ 
#define __INPUTSTREAMTHREAD_H__ 
 
#include "FullDuplexEngineBase.h" 
#include "SharedData.h" 
 
// forward declarations 
class CAO; 
 
/****************************************************************************** 
*  Class Name:  CInputStreamThread  
******************************************************************************/ 
class CInputStreamThread : public CFullDuplexEngineBase 
    { 
public: 
    // no public constructor. class is instantiated in the thread startup function 
    static TInt ThreadFunction(TAny* aData); 
    virtual ~CInputStreamThread(); 
    void DoHandleException(TExcType aExc); 
 
private: 
 
    static CInputStreamThread* NewL(TSharedData& aData); 
    void ConstructL(); 
    CInputStreamThread(TSharedData& aData); 
     
    TInt Initialize(); 
 
    void RecordL(); 
    void Stop();    
 
    // from MDevSoundObserver 
    virtual void InitializeComplete(TInt aError); 
    virtual void BufferToBeEmptied(CMMFBuffer* aBuffer);  
    virtual void RecordError(TInt aError);  
     
private: 
    TSharedData&          iShared; 
    CAO*                  iAO; 
    CActiveScheduler*     iActiveScheduler; 
    }; 
 
#endif  // __INPUTSTREAMTHREAD_H__