ERROR_INVALID_FORMAT,
ERROR_INVALID_POINTER,
ERROR_INVALID_OPERATION,
+ ERROR_INVALID_STATE,
ERROR_NOT_INITIALIZED,
ERROR_NOT_SUPPORTED,
Name: capi-media-audio-io
Summary: An Audio Input & Audio Output library in Tizen Native API
-Version: 0.3.52
+Version: 0.3.53
Release: 0
Group: Multimedia/API
License: Apache-2.0
case EError::ERROR_INVALID_FORMAT: return COLOR_RED "ERROR_INVALID_FORMAT" COLOR_END;
case EError::ERROR_INVALID_POINTER: return COLOR_RED "ERROR_INVALID_POINTER" COLOR_END;
case EError::ERROR_INVALID_OPERATION: return COLOR_RED "ERROR_INVALID_OPERATION" COLOR_END;
+ case EError::ERROR_INVALID_STATE: return COLOR_RED "ERROR_INVALID_STATE" COLOR_END;
case EError::ERROR_NOT_INITIALIZED: return COLOR_RED "ERROR_NOT_INITIALIZED" COLOR_END;
case EError::ERROR_NOT_SUPPORTED: return COLOR_RED "ERROR_NOT_SUPPORTED" COLOR_END;
case EError::ERROR_NOT_SUPPORTED_TYPE: return COLOR_RED "ERROR_NOT_SUPPORTED_TYPE" COLOR_END;
THROW_ERROR_MSG(CAudioError::EError::ERROR_NOT_INITIALIZED, "Did not initialize or prepare CAudioInput");
}
+ if (CAudioIO::getState() != CAudioInfo::EAudioIOState::AUDIO_IO_STATE_RUNNING) {
+ THROW_ERROR_MSG(CAudioError::EError::ERROR_INVALID_STATE,
+ "Can't pause if not in Running state");
+ }
+
+ if (mpPulseAudioClient->isInThread() == true) {
+ THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_OPERATION, "Can't pause in thread");
+ }
+
try {
CAudioIO::pause();
THROW_ERROR_MSG(CAudioError::EError::ERROR_NOT_INITIALIZED, "Did not initialize or prepare CAudioInput");
}
+ if (CAudioIO::getState() != CAudioInfo::EAudioIOState::AUDIO_IO_STATE_PAUSED) {
+ THROW_ERROR_MSG(CAudioError::EError::ERROR_INVALID_STATE,
+ "Can't resume if not in Paused state");
+ }
+
+ if (mpPulseAudioClient->isInThread() == true) {
+ THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_OPERATION, "Can't resume in thread");
+ }
+
try {
internalLock();
THROW_ERROR_MSG(CAudioError::EError::ERROR_NOT_INITIALIZED, "Did not initialize or prepare CAudioOutput");
}
+ if (CAudioIO::getState() != CAudioInfo::EAudioIOState::AUDIO_IO_STATE_RUNNING) {
+ THROW_ERROR_MSG(CAudioError::EError::ERROR_INVALID_STATE,
+ "Can't pause if not in Running state");
+ }
+
+ if (mpPulseAudioClient->isInThread() == true) {
+ THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_OPERATION, "Can't pause in thread");
+ }
+
try {
CAudioIO::pause();
THROW_ERROR_MSG(CAudioError::EError::ERROR_NOT_INITIALIZED, "Did not initialize or prepare CAudioOutput");
}
+ if (CAudioIO::getState() != CAudioInfo::EAudioIOState::AUDIO_IO_STATE_PAUSED) {
+ THROW_ERROR_MSG(CAudioError::EError::ERROR_INVALID_STATE,
+ "Can't resume if not in Paused state");
+ }
+
+ if (mpPulseAudioClient->isInThread() == true) {
+ THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_OPERATION, "Can't resume in thread");
+ }
+
try {
internalLock();
case CAudioError::EError::ERROR_INVALID_OPERATION:
ret = AUDIO_IO_ERROR_INVALID_OPERATION;
break;
+ case CAudioError::EError::ERROR_INVALID_STATE:
+ ret = AUDIO_IO_ERROR_INVALID_STATE;
+ break;
case CAudioError::EError::ERROR_OUT_OF_MEMORY:
case CAudioError::EError::ERROR_INVALID_POINTER:
ret = AUDIO_IO_ERROR_INVALID_BUFFER;