mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-11-04 09:42:42 +01:00 
			
		
		
		
	jack_client_close working properly now
This commit is contained in:
		@@ -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")) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user