Skip to content

Commit

Permalink
[rtaudio] add asio feature (#17617)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyfer authored May 18, 2021
1 parent 764ed56 commit c1d7e28
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 4 deletions.
8 changes: 7 additions & 1 deletion ports/rtaudio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ vcpkg_from_github(
REF 34a3752e0c8249dc1780d196cd24e745425f0c77
SHA512 00fea107f409f6dc43154aaf69aeffa1a3385031778b5f7d1ae1cc8337ed4ab92a7917cc9eade848dedd746016b6eff6234088619cb8d6a9a3f26a63efde493e
HEAD_REF master
PATCHES remove-unused-variable.patch
)

if(VCPKG_CRT_LINKAGE STREQUAL static)
Expand All @@ -14,10 +15,15 @@ else()
set(RTAUDIO_STATIC_MSVCRT OFF)
endif()

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
asio RTAUDIO_API_ASIO
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS -DRTAUDIO_STATIC_MSVCRT=${RTAUDIO_STATIC_MSVCRT}
OPTIONS -DRTAUDIO_STATIC_MSVCRT=${RTAUDIO_STATIC_MSVCRT} ${FEATURE_OPTIONS}
)

vcpkg_install_cmake()
Expand Down
20 changes: 20 additions & 0 deletions ports/rtaudio/remove-unused-variable.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/include/asiolist.cpp b/include/asiolist.cpp
index e4c73c2..333a662 100644
--- a/include/asiolist.cpp
+++ b/include/asiolist.cpp
@@ -166,7 +166,6 @@ AsioDriverList::AsioDriverList ()
LPASIODRVSTRUCT pdl;
LONG cr;
DWORD index = 0;
- BOOL fin = FALSE;

numdrv = 0;
lpdrvlist = 0;
@@ -184,7 +183,6 @@ AsioDriverList::AsioDriverList ()
#endif
lpdrvlist = newDrvStruct (hkEnum,keyname,0,lpdrvlist);
}
- else fin = TRUE;
}
if (hkEnum) RegCloseKey(hkEnum);

9 changes: 7 additions & 2 deletions ports/rtaudio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"name": "rtaudio",
"version-date": "2021-01-25",
"version-date": "2021-04-30",
"description": "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.",
"homepage": "https://github.com/thestk/rtaudio",
"supports": "!uwp"
"supports": "!uwp",
"features": {
"asio": {
"description": "Build with ASIO backend"
}
}
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5413,7 +5413,7 @@
"port-version": 1
},
"rtaudio": {
"baseline": "2021-01-25",
"baseline": "2021-04-30",
"port-version": 0
},
"rtlsdr": {
Expand Down
5 changes: 5 additions & 0 deletions versions/r-/rtaudio.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "59166c851bb292b52492034aa3167e1be5142663",
"version-date": "2021-04-30",
"port-version": 0
},
{
"git-tree": "088d877f612f5f77cb47a93b0854491baebb5178",
"version-date": "2021-01-25",
Expand Down

0 comments on commit c1d7e28

Please sign in to comment.