From 255fbe4c881cc76462e7c8128207472224b9b9f9 Mon Sep 17 00:00:00 2001 From: Zachary Hall Date: Mon, 9 Dec 2024 15:27:50 -0800 Subject: [PATCH] Use proper priority for playback process on Haiku --- playback_process.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/playback_process.cpp b/playback_process.cpp index 1d26563..46a7625 100644 --- a/playback_process.cpp +++ b/playback_process.cpp @@ -25,6 +25,9 @@ #ifdef __WINDOWS__ #include #endif +#ifdef __HAIKU__ +#include +#endif #include #include "util.hpp" using namespace google::protobuf; @@ -396,6 +399,9 @@ PlaybackProcess::PlaybackProcess(PlaybackProcess *parent) { DEBUG.writeln("Host process address: (in-process)"); } PlaybackProcess::PlaybackProcess(std::vector args) { +#ifdef __HAIKU__ + set_thread_priority(find_thread(NULL), suggest_thread_priority(B_LIVE_AUDIO_MANIPULATION)); +#endif SDL_InitSubSystem(SDL_INIT_AUDIO); done = false; is_playback_process = true;