mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Compare commits
3 commits
a04e56f3a8
...
728558e51c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
728558e51c | ||
|
|
b938daca95 | ||
|
|
0f3760a8d1 |
10 changed files with 24 additions and 23 deletions
|
|
@ -315,7 +315,7 @@ public:
|
||||||
|
|
||||||
virtual bool reconfigure_io (ChanCount /*in*/, ChanCount /*aux_in*/, ChanCount /*out*/) { return true; }
|
virtual bool reconfigure_io (ChanCount /*in*/, ChanCount /*aux_in*/, ChanCount /*out*/) { return true; }
|
||||||
virtual bool match_variable_io (ChanCount& /*in*/, ChanCount& /*aux_in*/, ChanCount& /*out*/) { return false; }
|
virtual bool match_variable_io (ChanCount& /*in*/, ChanCount& /*aux_in*/, ChanCount& /*out*/) { return false; }
|
||||||
virtual void request_bus_layout (ChanCount const& /*in*/, ChanCount const& /*aux_in*/, ChanCount const& /*out*/);
|
virtual void request_bus_layout (ChanCount const& /*in*/, ChanCount const& /*aux_in*/, ChanCount const& /*out*/) { }
|
||||||
|
|
||||||
virtual ChanCount output_streams () const;
|
virtual ChanCount output_streams () const;
|
||||||
virtual ChanCount input_streams () const;
|
virtual ChanCount input_streams () const;
|
||||||
|
|
|
||||||
|
|
@ -846,7 +846,7 @@ JACKAudioBackend::join_process_threads ()
|
||||||
bool
|
bool
|
||||||
JACKAudioBackend::in_process_thread ()
|
JACKAudioBackend::in_process_thread ()
|
||||||
{
|
{
|
||||||
#if defined COMPILER_MINGW && (!defined PTW32_VERSION || defined __jack_systemdeps_h__)
|
#if defined COMPILER_MINGW && (!defined __PTW32_VERSION || defined __jack_systemdeps_h__)
|
||||||
if (_main_thread == GetCurrentThread()) {
|
if (_main_thread == GetCurrentThread()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -858,7 +858,7 @@ JACKAudioBackend::in_process_thread ()
|
||||||
|
|
||||||
for (auto & thread : _jack_threads) {
|
for (auto & thread : _jack_threads) {
|
||||||
|
|
||||||
#if defined COMPILER_MINGW && (!defined PTW32_VERSION || defined __jack_systemdeps_h__)
|
#if defined COMPILER_MINGW && (!defined __PTW32_VERSION || defined __jack_systemdeps_h__)
|
||||||
if (thread == GetCurrentThread()) {
|
if (thread == GetCurrentThread()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -909,7 +909,7 @@ JACKAudioBackend::process_thread ()
|
||||||
/* JACK doesn't do this for us when we use the wait API
|
/* JACK doesn't do this for us when we use the wait API
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined COMPILER_MINGW && (!defined PTW32_VERSION || defined __jack_systemdeps_h__)
|
#if defined COMPILER_MINGW && (!defined __PTW32_VERSION || defined __jack_systemdeps_h__)
|
||||||
_main_thread = GetCurrentThread();
|
_main_thread = GetCurrentThread();
|
||||||
#else
|
#else
|
||||||
_main_thread = pthread_self ();
|
_main_thread = pthread_self ();
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@
|
||||||
|
|
||||||
#include "pbd/cpus.h"
|
#include "pbd/cpus.h"
|
||||||
|
|
||||||
#if defined(COMPILER_MSVC) && !defined(PTW32_VERSION)
|
#if defined(COMPILER_MSVC) && !defined(__PTW32_VERSION)
|
||||||
#include <ardourext/pthread.h> // Gets us 'PTW32_VERSION'
|
#include <ardourext/pthread.h> // Gets us '__PTW32_VERSION'
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
|
|
@ -69,7 +69,7 @@ PBD::hardware_concurrency()
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if defined(PTW32_VERSION) || defined(__hpux)
|
#if defined(__PTW32_VERSION) || defined(__hpux)
|
||||||
return pthread_num_processors_np();
|
return pthread_num_processors_np();
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
int count;
|
int count;
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ protected:
|
||||||
};
|
};
|
||||||
typedef typename RequestBuffer::rw_vector RequestBufferVector;
|
typedef typename RequestBuffer::rw_vector RequestBufferVector;
|
||||||
|
|
||||||
#if defined(COMPILER_MINGW) && defined(PTW32_VERSION)
|
#if defined(COMPILER_MINGW) && defined(__PTW32_VERSION)
|
||||||
struct pthread_cmp
|
struct pthread_cmp
|
||||||
{
|
{
|
||||||
bool operator() (const ptw32_handle_t& thread1, const ptw32_handle_t& thread2)
|
bool operator() (const ptw32_handle_t& thread1, const ptw32_handle_t& thread2)
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
#include "pbd/libpbd_visibility.h"
|
#include "pbd/libpbd_visibility.h"
|
||||||
#include "pbd/timing.h"
|
#include "pbd/timing.h"
|
||||||
|
|
||||||
/* check for PTW32_VERSION */
|
/* check for __PTW32_VERSION */
|
||||||
#ifdef COMPILER_MSVC
|
#ifdef COMPILER_MSVC
|
||||||
#include <ardourext/pthread.h>
|
#include <ardourext/pthread.h>
|
||||||
#else
|
#else
|
||||||
|
|
@ -83,7 +83,7 @@ namespace PBD {
|
||||||
#define DEBUG_STR(id) __debug_str ## id
|
#define DEBUG_STR(id) __debug_str ## id
|
||||||
#define DEBUG_STR_APPEND(id,s) __debug_str ## id << s;
|
#define DEBUG_STR_APPEND(id,s) __debug_str ## id << s;
|
||||||
#define DEBUG_ENABLED(bits) (((bits) & PBD::debug_bits).any())
|
#define DEBUG_ENABLED(bits) (((bits) & PBD::debug_bits).any())
|
||||||
#ifdef PTW32_VERSION
|
#ifdef __PTW32_VERSION
|
||||||
#define DEBUG_THREAD_SELF pthread_self().p
|
#define DEBUG_THREAD_SELF pthread_self().p
|
||||||
#define DEBUG_THREAD_PRINT(t) t.p
|
#define DEBUG_THREAD_PRINT(t) t.p
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,13 @@
|
||||||
*/
|
*/
|
||||||
#ifndef PTHREAD_MACROS_DEFINED
|
#ifndef PTHREAD_MACROS_DEFINED
|
||||||
#define PTHREAD_MACROS_DEFINED
|
#define PTHREAD_MACROS_DEFINED
|
||||||
#ifdef PTW32_VERSION /* pthread_win32 */
|
#ifdef __PTW32_VERSION /* pthread_win32 */
|
||||||
#define mark_pthread_inactive(threadID) threadID.p=0
|
#define mark_pthread_inactive(threadID) threadID.p=0
|
||||||
#define is_pthread_active(threadID) (threadID.p!=0)
|
#define is_pthread_active(threadID) (threadID.p!=0)
|
||||||
#else /* normal pthread */
|
#else /* normal pthread */
|
||||||
#define mark_pthread_inactive(threadID) threadID=0
|
#define mark_pthread_inactive(threadID) threadID=0
|
||||||
#define is_pthread_active(threadID) threadID!=0
|
#define is_pthread_active(threadID) threadID!=0
|
||||||
#endif /* PTW32_VERSION */
|
#endif /* __PTW32_VERSION */
|
||||||
#endif /* PTHREAD_MACROS_DEFINED */
|
#endif /* PTHREAD_MACROS_DEFINED */
|
||||||
|
|
||||||
#ifdef COMPILER_MSVC
|
#ifdef COMPILER_MSVC
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ pthread_set_name (const char* str)
|
||||||
/* copy string and delete it when exiting */
|
/* copy string and delete it when exiting */
|
||||||
thread_name.set (strdup (str)); // leaks
|
thread_name.set (strdup (str)); // leaks
|
||||||
|
|
||||||
#if !defined PTW32_VERSION && defined _GNU_SOURCE
|
#if !defined __PTW32_VERSION && defined _GNU_SOURCE
|
||||||
/* set public thread name, up to 16 chars */
|
/* set public thread name, up to 16 chars */
|
||||||
char ptn[16];
|
char ptn[16];
|
||||||
memset (ptn, 0, 16);
|
memset (ptn, 0, 16);
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,11 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <windows.h> // Needed for MSVC 'Sleep()'
|
#include <windows.h> // Needed for MSVC 'Sleep()'
|
||||||
|
#else
|
||||||
|
#include <unistd.h> // for usleep ()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "zita-convolver/zita-convolver.h"
|
#include "zita-convolver/zita-convolver.h"
|
||||||
|
|
@ -432,7 +433,7 @@ Convlevel::Convlevel (void)
|
||||||
, _npar (0)
|
, _npar (0)
|
||||||
, _parsize (0)
|
, _parsize (0)
|
||||||
, _options (0)
|
, _options (0)
|
||||||
#ifndef PTW32_VERSION
|
#ifndef __PTW32_VERSION
|
||||||
, _pthr (0)
|
, _pthr (0)
|
||||||
#endif
|
#endif
|
||||||
, _inp_list (0)
|
, _inp_list (0)
|
||||||
|
|
@ -607,7 +608,7 @@ Convlevel::start (int abspri, int policy)
|
||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
struct sched_param parm;
|
struct sched_param parm;
|
||||||
|
|
||||||
#ifndef PTW32_VERSION
|
#ifndef __PTW32_VERSION
|
||||||
_pthr = 0;
|
_pthr = 0;
|
||||||
#endif
|
#endif
|
||||||
min = sched_get_priority_min (policy);
|
min = sched_get_priority_min (policy);
|
||||||
|
|
@ -685,7 +686,7 @@ void*
|
||||||
Convlevel::static_main (void* arg)
|
Convlevel::static_main (void* arg)
|
||||||
{
|
{
|
||||||
((Convlevel*)arg)->main ();
|
((Convlevel*)arg)->main ();
|
||||||
#if !defined PTW32_VERSION && defined _GNU_SOURCE
|
#if !defined __PTW32_VERSION && defined _GNU_SOURCE
|
||||||
pthread_setname_np (pthread_self(), "ZConvlevel");
|
pthread_setname_np (pthread_self(), "ZConvlevel");
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -699,7 +700,7 @@ Convlevel::main (void)
|
||||||
_trig.wait ();
|
_trig.wait ();
|
||||||
if (_stat == ST_TERM) {
|
if (_stat == ST_TERM) {
|
||||||
_stat = ST_IDLE;
|
_stat = ST_IDLE;
|
||||||
#ifndef PTW32_VERSION
|
#ifndef __PTW32_VERSION
|
||||||
_pthr = 0;
|
_pthr = 0;
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include "zita-convolver/zconvolver_visibility.h"
|
#include "zita-convolver/zconvolver_visibility.h"
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(PTW32_VERSION) || defined(__WINPTHREADS_VERSION)
|
#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__PTW32_VERSION) || defined(__WINPTHREADS_VERSION)
|
||||||
#include <semaphore.h>
|
#include <semaphore.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -38,7 +38,7 @@ namespace ArdourZita {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* note: mingw and msvc actually use PTW32's implementation of semaphores */
|
/* note: mingw and msvc actually use PTW32's implementation of semaphores */
|
||||||
#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(PTW32_VERSION) || defined (__WINPTHREADS_VERSION)
|
#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__PTW32_VERSION) || defined (__WINPTHREADS_VERSION)
|
||||||
|
|
||||||
class LIBZCONVOLVER_API ZCsema
|
class LIBZCONVOLVER_API ZCsema
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@
|
||||||
* See the README file for an explanation of the pthreads-win32 version
|
* See the README file for an explanation of the pthreads-win32 version
|
||||||
* numbering scheme and how the DLL is named etc.
|
* numbering scheme and how the DLL is named etc.
|
||||||
*/
|
*/
|
||||||
#define PTW32_VERSION 2,9,1,0
|
#define __PTW32_VERSION 2,9,1,0
|
||||||
#define PTW32_VERSION_STRING "2, 9, 1, 0\0"
|
#define __PTW32_VERSION_STRING "2, 9, 1, 0\0"
|
||||||
|
|
||||||
/* There are three implementations of cancel cleanup.
|
/* There are three implementations of cancel cleanup.
|
||||||
* Note that pthread.h is included in both application
|
* Note that pthread.h is included in both application
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue