[Summary] Added possibility to identify IO thread which does not have required resources initialized during process callback handling

Conflicts:
	libs/ardour/ardour/audioengine.h
	libs/backends/wavesaudio/waves_audiobackend.cc
	libs/pbd/pbd/pool.h
This commit is contained in:
GZharun 2015-02-24 14:27:36 +02:00 committed by Paul Davis
parent 017e580c9f
commit ef59fbffa1
7 changed files with 42 additions and 1 deletions

View file

@ -758,6 +758,17 @@ WavesAudioBackend::_audio_device_callback (const float* input_buffer,
AudioEngine::thread_init_callback (this);
}
if ( !engine.thread_initialised_for_audio_processing () ) {
std::cerr << "\tWavesAudioBackend::_audio_device_callback (): It's an attempt to call process callback from the thread which didn't initialize it " << std::endl;
if (process_id != pthread_self() ) {
std::cerr << "Process thread ID has changed. Expected thread: " << process_id << " current thread: " << pthread_self() << std::dec << " !" << std::endl;
process_id = pthread_self();
}
AudioEngine::thread_init_callback (this);
}
engine.process_callback (nframes);
_write_audio_data_to_device (output_buffer, nframes);