diff --git a/src/audio/audio.h b/src/audio/audio.h index e3039e42e..e4e3b538b 100644 --- a/src/audio/audio.h +++ b/src/audio/audio.h @@ -67,6 +67,19 @@ public: void openInput(const QString& inDevDescr); bool openOutput(const QString& outDevDescr); + inline void reinitInput(const QString& inDevDesc) + { + QMutexLocker locker(&audioInLock); + cleanupInput(); + initInput(inDevDesc); + } + inline bool reinitOutput(const QString& outDevDesc) + { + QMutexLocker locker(&audioOutLock); + cleanupOutput(); + return initOutput(outDevDesc); + } + bool isInputReady(); bool isInputSubscribed(); bool isOutputReady();