jack_client_close working properly now

pull/1653/head
kennypm 2022-08-11 15:49:24 -04:00
parent ddd5b4e157
commit bfed2114e4
1 changed files with 2 additions and 3 deletions

View File

@ -1,5 +1,4 @@
#include "modules/jack.hpp" #include "modules/jack.hpp"
#include <spdlog/spdlog.h>
namespace waybar::modules { namespace waybar::modules {
@ -26,7 +25,7 @@ std::string JACK::JACKState() {
samplerate_ = 0; samplerate_ = 0;
if (client_) { if (client_) {
// jack_client_close(client_); jack_client_close(client_);
client_ = NULL; client_ = NULL;
} }
@ -52,7 +51,7 @@ std::string JACK::JACKState() {
auto JACK::update() -> void { auto JACK::update() -> void {
std::string format; std::string format;
auto state = JACKState(); std::string state = JACKState();
float latency = 1000 * (float)bufsize_ / (float)samplerate_; float latency = 1000 * (float)bufsize_ / (float)samplerate_;
if (label_.get_style_context()->has_class("xrun")) { if (label_.get_style_context()->has_class("xrun")) {