Move drain method to subclass CAudioOutput
[platform/core/api/audio-io.git] / src / cpp / CAudioIO.cpp
index c39ec15..00cfd59 100644 (file)
@@ -276,26 +276,6 @@ void CAudioIO::resume() {
         throw;
     }
 }
-
-void CAudioIO::drain() {
-    if (!__mIsInit || !IsReady())
-        THROW_ERROR_MSG(CAudioError::EError::ERROR_NOT_INITIALIZED, "Did not initialize or prepare CAudioIO"); //LCOV_EXCL_LINE
-
-    try {
-        if (mpPulseAudioClient->isInThread()) {
-            mpPulseAudioClient->drain();
-        } else {
-            internalLock();
-            mpPulseAudioClient->drain();
-            internalUnlock();
-        }
-    } catch (const CAudioError& e) {
-        if (!mpPulseAudioClient->isInThread())
-            internalUnlock();
-        throw;
-    }
-}
-
 void CAudioIO::flush() {
     if (!__mIsInit || !IsReady())
         THROW_ERROR_MSG(CAudioError::EError::ERROR_NOT_INITIALIZED, "Did not initialize or prepare CAudioIO"); //LCOV_EXCL_LINE