From 46a171ec9bf326c7f5d802b930ecbaefba42f4e5 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Wed, 20 Jun 2018 19:51:10 +0900 Subject: [PATCH] Fix querying sinks/sources Previous implementation did not halt the program if querying failed. --- CMakeLists.txt | 2 +- Changelog.md | 5 +++++ src/MfPA/GetSinkSourceInfo.cpp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dc2a016..ecd3a13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.0) -project(MeterForPulseAudio VERSION 1.6) +project(MeterForPulseAudio VERSION 1.7) set(MeterForPulseAudio_SOURCES GameDevTools/src/GDT/GameLoop.cpp diff --git a/Changelog.md b/Changelog.md index c95dd45..761647e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,8 @@ +# Version 1.7 + +Fix listing sinks/sources to halt even when querying failed (previously, only +halted on successful query of all sinks/sources). + # Version 1.6 Improve options "--list-sinks" and "--list-sources" (now halts after querying diff --git a/src/MfPA/GetSinkSourceInfo.cpp b/src/MfPA/GetSinkSourceInfo.cpp index f20df71..20f15b8 100644 --- a/src/MfPA/GetSinkSourceInfo.cpp +++ b/src/MfPA/GetSinkSourceInfo.cpp @@ -110,7 +110,7 @@ void MfPA::GetSinkSourceInfo::startMainLoop() [this] (float /* dt */) { pa_mainloop_iterate(mainLoop, 0, nullptr); if(operation - && pa_operation_get_state(operation) == PA_OPERATION_DONE) + && pa_operation_get_state(operation) != PA_OPERATION_RUNNING) { pa_operation_unref(operation); operation = nullptr; -- 2.49.0