diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2013-08-14 20:30:09 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2013-10-04 18:51:47 +1000 |
commit | df363a4fb3057253c1530941176cac49a7ffd409 (patch) | |
tree | 76a2423b920a8c476b5df1da44b964afcb4dc0c2 /libs/ardour/audioengine.cc | |
parent | 82f0f3a9a76097402afae8be1c9a65d526ad8cf2 (diff) |
Add AudioBackendThread class to support different thread type on windows
Diffstat (limited to 'libs/ardour/audioengine.cc')
-rw-r--r-- | libs/ardour/audioengine.cc | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 465f88de56..38e9ad0b86 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -826,21 +826,30 @@ AudioEngine::get_sync_offset (pframes_t& offset) const } int -AudioEngine::create_process_thread (boost::function<void()> func, AudioBackendNativeThread* thr, size_t stacksize) +AudioEngine::create_process_thread (boost::function<void()> func, AudioBackendThread* thread, size_t stacksize) { if (!_backend) { return -1; } - return _backend->create_process_thread (func, thr, stacksize); + return _backend->create_process_thread (func, thread, stacksize); } int -AudioEngine::wait_for_process_thread_exit (AudioBackendNativeThread thr) +AudioEngine::join_process_thread (AudioBackendThread* thr) { if (!_backend) { - return 0; + return -1; + } + return _backend->join_process_thread (thr); +} + +bool +AudioEngine::in_process_thread () +{ + if (!_backend) { + return false; } - return _backend->wait_for_process_thread_exit (thr); + return _backend->in_process_thread (); } int |