X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2FCPulseAudioClient.h;h=13b4a1afda730220fd02a974a7aabfa7341e4a3f;hb=d13d568ce0a6d6525d9079004cb5b698942c61be;hp=86ae2ed5f52009ce7a55860e16e409e282214e98;hpb=c5fdaacfee62cba3cfb89e4d8bd264e21207b3b5;p=platform%2Fcore%2Fapi%2Faudio-io.git diff --git a/include/CPulseAudioClient.h b/include/CPulseAudioClient.h index 86ae2ed..13b4a1a 100644 --- a/include/CPulseAudioClient.h +++ b/include/CPulseAudioClient.h @@ -22,7 +22,6 @@ #include -#include namespace tizen_media_audio { @@ -51,30 +50,31 @@ namespace tizen_media_audio { ~CPulseAudioClient(); /* Implemented Methods */ - void initialize() throw (CAudioError); + void initialize(); void finalize(); /* Methods */ - int peek(const void** data, size_t* length) throw (CAudioError); - int drop() throw (CAudioError); - int write(const void* data, size_t length) throw (CAudioError); + int read(void* buffer, size_t length); + int peek(const void** buffer, size_t* length); + int drop(); + int write(const void* buffer, size_t length); - void cork(bool cork) throw (CAudioError); - bool isCorked() throw (CAudioError); + void cork(bool cork); + bool isCorked(); - bool drain() throw (CAudioError); - bool flush() throw (CAudioError); + bool drain(); + bool flush(); - void checkRunningState() throw (CAudioError); - bool isInThread() throw (CAudioError); + void checkRunningState(); + bool isInThread(); - size_t getWritableSize() throw (CAudioError); - size_t getReadableSize() throw (CAudioError); + size_t getWritableSize(); + size_t getReadableSize(); - size_t getBufferSize() throw (CAudioError); + size_t getBufferSize(); - pa_usec_t getLatency() throw (CAudioError); - pa_usec_t getFinalLatency() throw (CAudioError); + pa_usec_t getLatency(); + pa_usec_t getFinalLatency(); /* Setter & Getter */ EStreamDirection getStreamDirection(); @@ -94,6 +94,14 @@ namespace tizen_media_audio { bool __mIsInit; bool __mIsOperationSuccess; + const void* __mpSyncReadDataPtr; + size_t __mSyncReadIndex; + size_t __mSyncReadLength; + bool __mIsUsedSyncRead; + bool __mIsFirstStream; + bool __mIsDraining; + bool __mIsStarted; + /* Static Methods */ /* Private Method */ @@ -106,7 +114,12 @@ namespace tizen_media_audio { static void __streamCaptureCb(pa_stream* s, size_t length, void* user_data); static void __streamPlaybackCb(pa_stream* s, size_t length, void* user_data); static void __streamLatencyUpdateCb(pa_stream* s, void* user_data); + static void __streamStartedCb(pa_stream* s, void* user_data); + static void __streamUnderflowCb(pa_stream* s, void* user_data); + static void __streamEventCb(pa_stream* s, const char *name, pa_proplist *pl, void *user_data); static void __successStreamCb(pa_stream* s, int success, void* user_data); + static void __successDrainCb(pa_stream* s, int success, void* user_data); + static void __successDrainCbInThread(pa_stream* s, int success, void* user_data); };