13
0

Add API to query backend realtime thread priority

This commit is contained in:
Robin Gareus 2018-10-11 01:36:10 +02:00
parent 5c47ce32ec
commit 94e6164bc3
3 changed files with 19 additions and 0 deletions

View File

@ -106,6 +106,17 @@ class LIBARDOUR_API AudioEngine : public PortManager, public SessionHandlePtr
bool in_process_thread ();
uint32_t process_thread_count ();
/* internal backends
* -20 : main thread
* -21 : additional I/O threads e.g. MIDI
* -22 : client/process threads
*
* search for
* - pbd_realtime_pthread_create
* - pbd_set_thread_priority
*/
virtual int client_real_time_priority () { return -22; }
int backend_reset_requested();
void request_backend_reset();
void request_device_list_update();

View File

@ -926,6 +926,13 @@ JACKAudioBackend::process_thread_count ()
return _jack_threads.size();
}
int
JACKAudioBackend::client_real_time_priority ()
{
GET_PRIVATE_JACK_POINTER_RET (_priv_jack, 0);
return jack_client_real_time_priority (_priv_jack);
}
void*
JACKAudioBackend::_start_process_thread (void* arg)
{

View File

@ -110,6 +110,7 @@ class JACKAudioBackend : public AudioBackend {
int join_process_threads ();
bool in_process_thread ();
uint32_t process_thread_count ();
int client_real_time_priority ();
void transport_start ();
void transport_stop ();