diff options
| author | garyscavone <garyscavone@users.noreply.github.com> | 2022-07-01 11:52:57 -0400 |
|---|---|---|
| committer | garyscavone <garyscavone@users.noreply.github.com> | 2022-07-01 11:52:57 -0400 |
| commit | 56e69e624fe8c3edc9085e3259a8ed78def6b2e0 (patch) | |
| tree | 01814683643b145000c81e1e3131478ed3775d6d /RtAudio.cpp | |
| parent | 00d2db5f6fa4818aee75d11b019603f0f3b20cde (diff) | |
Moved escapeJackPortRegex function into UNIX_JACK API section to avoid compiler problems.
Diffstat (limited to 'RtAudio.cpp')
| -rw-r--r-- | RtAudio.cpp | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/RtAudio.cpp b/RtAudio.cpp index c1a1ca7..e5a2662 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -120,22 +120,6 @@ const char* rtaudio_api_names[][2] = { const unsigned int rtaudio_num_api_names = sizeof(rtaudio_api_names)/sizeof(rtaudio_api_names[0]); -#if defined(__UNIX_JACK__) -std::string escapeJackPortRegex(std::string &str) -{ - const std::string need_escaping = "()[]{}*+?$^.|\\"; - std::string escaped_string; - for (auto c : str) - { - if (need_escaping.find(c) != std::string::npos) - escaped_string.push_back('\\'); - - escaped_string.push_back(c); - } - return escaped_string; -} -#endif - // The order here will control the order of RtAudio's API search in // the constructor. extern "C" const RtAudio::Api rtaudio_compiled_apis[] = { @@ -2237,6 +2221,20 @@ struct JackHandle { :client(0), drainCounter(0), internalDrain(false) { ports[0] = 0; ports[1] = 0; xrun[0] = false; xrun[1] = false; } }; +std::string escapeJackPortRegex(std::string &str) +{ + const std::string need_escaping = "()[]{}*+?$^.|\\"; + std::string escaped_string; + for (auto c : str) + { + if (need_escaping.find(c) != std::string::npos) + escaped_string.push_back('\\'); + + escaped_string.push_back(c); + } + return escaped_string; +} + #if !defined(__RTAUDIO_DEBUG__) static void jackSilentError( const char * ) {}; #endif |
