diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-29 20:35:36 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-29 20:35:36 +0200 |
commit | 467c801ce80b69abdb7efb4c23120532bed3fc96 (patch) | |
tree | e0ed5e4592819392a5f37d6a8c44003dd96daf0f /libs/backends/portaudio | |
parent | df659e91f1ad8b5d71838abc130dce8eacdf7cc1 (diff) |
Abstract definition of rt-scheduler policy
pthread-w32 does not support pthread_setschedparam() with
SCHED_FIFO and bails out. While pthread_create() simply ignores the policy
and sets the priority regadless.
This only affects ctrl-surface event-loops & AutomationWatch on Windows.
Diffstat (limited to 'libs/backends/portaudio')
-rw-r--r-- | libs/backends/portaudio/portaudio_backend.cc | 4 | ||||
-rw-r--r-- | libs/backends/portaudio/winmmemidi_output_device.cc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libs/backends/portaudio/portaudio_backend.cc b/libs/backends/portaudio/portaudio_backend.cc index 3433ca3585..46e508fba7 100644 --- a/libs/backends/portaudio/portaudio_backend.cc +++ b/libs/backends/portaudio/portaudio_backend.cc @@ -787,7 +787,7 @@ PortAudioBackend::process_callback(const float* input, bool PortAudioBackend::start_blocking_process_thread () { - if (pbd_realtime_pthread_create (SCHED_FIFO, -20, 100000, + if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, -20, 100000, &_main_blocking_thread, blocking_thread_func, this)) { if (pthread_create (&_main_blocking_thread, NULL, blocking_thread_func, this)) @@ -1115,7 +1115,7 @@ PortAudioBackend::create_process_thread (boost::function<void()> func) ThreadData* td = new ThreadData (this, func, stacksize); - if (pbd_realtime_pthread_create (SCHED_FIFO, -22, stacksize, + if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, -22, stacksize, &thread_id, portaudio_process_thread, td)) { pthread_attr_init (&attr); pthread_attr_setstacksize (&attr, stacksize); diff --git a/libs/backends/portaudio/winmmemidi_output_device.cc b/libs/backends/portaudio/winmmemidi_output_device.cc index 25201af67b..72b1494ac5 100644 --- a/libs/backends/portaudio/winmmemidi_output_device.cc +++ b/libs/backends/portaudio/winmmemidi_output_device.cc @@ -230,7 +230,7 @@ WinMMEMidiOutputDevice::start_midi_output_thread () size_t stacksize = 100000; // TODO Use native threads - if (pbd_realtime_pthread_create (SCHED_FIFO, -21, stacksize, + if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, -21, stacksize, &m_output_thread_handle, midi_output_thread, this)) { return false; } |