#include "pbd/error.h"
-#include "jack/jack.h"
-#include "jack/thread.h"
-
#include "ardour/audioengine.h"
#include "ardour/session.h"
#include "ardour/types.h"
bool
JACKAudioBackend::in_process_thread ()
{
+#ifdef COMPILER_MINGW
+ if (_main_thread == GetCurrentThread()) {
+ return true;
+ }
+#else // pthreads
+ if (pthread_equal (_main_thread, pthread_self()) != 0) {
+ return true;
+ }
+#endif
+
for (std::vector<jack_native_thread_t>::const_iterator i = _jack_threads.begin ();
i != _jack_threads.end(); i++) {
/* JACK doesn't do this for us when we use the wait API
*/
+#ifdef COMPILER_MINGW
+ _main_thread = GetCurrentThread();
+#else
+ _main_thread = pthread_self ();
+#endif
+
+
AudioEngine::thread_init_callback (this);
while (1) {
position = pos.frame;
return starting;
}
+
+int
+JACKAudioBackend::reset_device ()
+{
+ /* XXX need to figure out what this means for JACK
+ */
+ return 0;
+}