try {
if (mpAudioSessionHandler->getId() >= 0 && !mIsInterrupted) {
if (isForceIgnore() == false && mpAudioSessionHandler->isSkipSession() == false) {
- CPulseStreamSpec::EStreamLatency streamSpec;
- streamSpec = mpPulseAudioClient->getStreamSpec().getStreamLatency();
- if (CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_OUTPUT_DEFAULT_ASYNC != streamSpec)
+ if (mStreamCallback.onStream == NULL)
CAudioIO::drain();
}
}
}
void CAudioOutput::drain() {
- CPulseStreamSpec::EStreamLatency streamSpec;
-
if (__IsInit() == false || __IsReady() == false) {
THROW_ERROR_MSG(CAudioError::EError::ERROR_NOT_INITIALIZED,
"Did not initialize or prepare CAudioOutput");
}
- streamSpec = mpPulseAudioClient->getStreamSpec().getStreamLatency();
- if (CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_OUTPUT_DEFAULT_ASYNC == streamSpec)
+ if (mStreamCallback.onStream)
THROW_ERROR_MSG(CAudioError::EError::ERROR_INVALID_OPERATION, "async type don't support drain");
try {