- struct SInterruptCallback {
- void* mUserData;
- void (*onInterrupt)(IAudioSessionEventListener::EInterruptCode code, void* user_data);
-
- SInterruptCallback() : mUserData(NULL), onInterrupt(NULL)
- {/* Empty Body */}
- };
-
- private:
- pthread_mutex_t mMutex;
- pthread_cond_t mCond;
- bool mIsInit;
- bool mForceIgnore;
-
- protected:
- CAudioSessionHandler* mpAudioSessionHandler;
- CPulseAudioClient* mpPulseAudioClient;
- CAudioInfo mAudioInfo;
-
- SStreamCallback mStreamCallback;
- SStateChangedCallback mStateChangedCallback;
- SInterruptCallback mInterruptCallback;
-
- CAudioInfo::EAudioIOState mState;
- CAudioInfo::EAudioIOState mStatePrev;
- bool mByPolicy;
-
- /* Protected Methods */
- virtual void setInit(bool flag);
- virtual bool isInit();
- virtual bool IsReady();
-
- void internalLock() throw (CAudioError);
- void internalUnlock() throw (CAudioError);
- void internalWait() throw (CAudioError);
- void internalSignal() throw (CAudioError);
-
- bool isForceIgnore();
-
- public: