Use proper priority for playback process on Haiku

This commit is contained in:
Zachary Hall 2024-12-09 15:27:50 -08:00
parent 5f67083eea
commit 255fbe4c88

View file

@ -25,6 +25,9 @@
#ifdef __WINDOWS__
#include <windows.h>
#endif
#ifdef __HAIKU__
#include <kernel/scheduler.h>
#endif
#include <google/protobuf/message.h>
#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<std::string> 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;