static void * pthread_process (void *arg)
{
PortAudioBackend *d = static_cast<PortAudioBackend *>(arg);
- d->main_process_thread ();
+ d->main_blocking_process_thread ();
pthread_exit (0);
return 0;
}
PortAudioBackend::start_blocking_process_thread ()
{
if (_realtime_pthread_create (SCHED_FIFO, -20, 100000,
- &_main_thread, pthread_process, this))
+ &_main_blocking_thread, pthread_process, this))
{
- if (pthread_create (&_main_thread, NULL, pthread_process, this))
+ if (pthread_create (&_main_blocking_thread, NULL, pthread_process, this))
{
DEBUG_AUDIO("Failed to create main audio thread\n");
_run = false;
{
void *status;
- if (pthread_join (_main_thread, &status)) {
+ if (pthread_join (_main_blocking_thread, &status)) {
DEBUG_AUDIO("Failed to stop main audio thread\n");
return false;
}
bool
PortAudioBackend::in_process_thread ()
{
- if (pthread_equal (_main_thread, pthread_self()) != 0) {
+ if (pthread_equal (_main_blocking_thread, pthread_self()) != 0) {
return true;
}
void *
-PortAudioBackend::main_process_thread ()
+PortAudioBackend::main_blocking_process_thread ()
{
AudioEngine::thread_init_callback (this);
_active = true;
void* get_buffer (PortHandle, pframes_t);
- void* main_process_thread ();
+ void* main_blocking_process_thread ();
private: // Methods
bool start_blocking_process_thread ();
/* processing */
float _dsp_load;
framecnt_t _processed_samples;
- pthread_t _main_thread;
+
+ /* blocking thread */
+ pthread_t _main_blocking_thread;
/* process threads */
static void* portaudio_process_thread (void *);