thestk / rtaudio

A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO, and WASAPI) operating systems.
Other
1.49k stars 317 forks source link

Fix linking error to pthreads with MinGW #408

Closed Smail closed 1 year ago

Smail commented 1 year ago

Closes #407

Smail commented 1 year ago

pthread functions are used in rtaudio.cpp since 6.0.0 with macros called MUTEX_LOCK, etc., depending on whether the application is compiled with MSVC or not. The problem here is, that when compiled with MinGW, the MSVC macro is undefined and hence it's compiled with pthreads, but pthreads is not added as linking dependency in CMakeLists.txt.