diff --git a/.github/workflows/build-libs.yml b/.github/workflows/build-libs.yml new file mode 100644 index 0000000..10e80ea --- /dev/null +++ b/.github/workflows/build-libs.yml @@ -0,0 +1,117 @@ +name: Build PortAudio lib +on: + push: + branches-ignore: + - master +permissions: + # This is needed for pushing a new commit to the repo: + contents: write +jobs: + + macos: + runs-on: macos-13 + env: + CMAKE_OSX_ARCHITECTURES: "arm64;x86_64" + MACOSX_DEPLOYMENT_TARGET: "10.9" + steps: + - name: checkout portaudio + uses: actions/checkout@v4 + with: + repository: PortAudio/portaudio + ref: v19.7.0 + path: portaudio + - name: cmake configure + run: | + cmake -S portaudio -B build -D CMAKE_BUILD_TYPE=Release + - name: cmake build + run: | + cmake --build build + - name: move dylib + run: | + mv build/libportaudio.dylib . + - name: show some information about dylib + run: | + file libportaudio.dylib + otool -L libportaudio.dylib + - name: upload dylib + uses: actions/upload-artifact@v4 + with: + name: macos-dylib + path: libportaudio.dylib + + windows: + runs-on: windows-2022 + strategy: + matrix: + platform: [x64, Win32] + asio: ["", "-asio"] + include: + - platform: x64 + platform-suffix: 64bit + - platform: Win32 + platform-suffix: 32bit + env: + # Reproducible build by avoiding time stamp + LDFLAGS: "/Brepro" + steps: + - name: checkout portaudio + uses: actions/checkout@v4 + with: + repository: PortAudio/portaudio + ref: v19.7.0 + path: portaudio + # The next portaudio release will have an auto-download feature: + - name: download and extract ASIO SDK + if: matrix.asio + run: | + curl -L -o asiosdk.zip https://www.steinberg.net/asiosdk + 7z x asiosdk.zip + - name: cmake configure + run: | + cmake -S portaudio -B build -A ${{ matrix.platform }} -D PA_USE_ASIO=${{ matrix.asio && 'ON' || 'OFF' }} + - name: cmake build + run: | + cmake --build build --config Release + - name: rename DLL + run: | + mv build/Release/portaudio_*.dll libportaudio${{ matrix.platform-suffix }}${{ matrix.asio }}.dll + - name: show some information about DLL + run: | + ldd libportaudio${{ matrix.platform-suffix }}${{ matrix.asio }}.dll + - name: upload DLL + uses: actions/upload-artifact@v4 + with: + name: windows-${{ matrix.platform }}-dll${{ matrix.asio }} + path: libportaudio${{ matrix.platform-suffix }}${{ matrix.asio }}.dll + + push: + runs-on: ubuntu-latest + needs: [macos, windows] + steps: + - name: Clone Git repository + uses: actions/checkout@v4 + - name: Retrieve dylib + uses: actions/download-artifact@v4 + with: + name: macos-dylib + - name: Retrieve x64 DLL + uses: actions/download-artifact@v4 + with: + name: windows-x64-dll + - name: Retrieve x64 DLL with ASIO support + uses: actions/download-artifact@v4 + with: + name: windows-x64-dll-asio + - name: Retrieve Win32 DLL + uses: actions/download-artifact@v4 + with: + name: windows-Win32-dll + - name: Retrieve Win32 DLL with ASIO support + uses: actions/download-artifact@v4 + with: + name: windows-Win32-dll-asio + - name: Commit and push binaries (if there are changes) + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git commit -am "Update binaries" && git push || true diff --git a/README.md b/README.md index cb60193..acbe5f5 100644 --- a/README.md +++ b/README.md @@ -7,66 +7,24 @@ This repository provides pre-compiled dynamic libraries for DLLs for Windows (32-bit and 64-bit) ------------------------------------ -The DLLs include all available host APIs, namely WMME, DirectSound, WDM/KS, -WASAPI and ASIO. For more informaton about the ASIO SDK see +There are two sets of DLL files, +one including the default host APIs, +namely MME, DirectSound, WDM/KS and WASAPI, +and another one (`*-asio.dll`) where ASIO is enabled as well. +For more information about the ASIO SDK see http://www.steinberg.net/en/company/developers.html. -The DLLs were created on a Debian GNU/Linux system using [MXE](http://mxe.cc/) -([this version](https://github.com/mxe/mxe/tree/95649828bc29334d5f9abef2718d49a55d9a5407), -using `pa_stable_v190700_20210406.tgz`) -with the following commands (after installing the -[dependencies](http://mxe.cc/#requirements)): +dylib for macOS (64-bit, "universal") +---------------------------------------- - git clone https://github.com/mxe/mxe.git - wget http://www.steinberg.net/sdk_downloads/asiosdk2.3.zip - export PATH=$(pwd)"/mxe/usr/bin:$PATH" +The file `libportaudio.dylib` is compatible both +with Intel (`x86_64`) and with Apple Silicon (`arm64`) CPUs. -Open the file `mxe/src/portaudio.mk` and change -`--with-winapi=wmme,directx,wdmks,wasapi` to -`--with-winapi=wmme,directx,wdmks,wasapi,asio` (and make sure to keep the -backslash at the end of the line). -To the first line starting with "$(MAKE)", append " EXAMPLES= SELFTESTS=" (without the quotes). -Delete the 4 lines before the last line (i.e. keep the line with "endef"). -After saving your changes, please continue: +Details +------- - for TARGET in x86_64-w64-mingw32.static i686-w64-mingw32.static - do - unzip asiosdk2.3.zip - # You'll need write access in /usr/local for this: - mv ASIOSDK2.3 /usr/local/asiosdk2 - # If it doesn't work, prepend "sudo " to the previous command - make -C mxe portaudio MXE_TARGETS=$TARGET - $TARGET-gcc -O2 -shared -o libportaudio-$TARGET.dll -Wl,--whole-archive -lportaudio -Wl,--no-whole-archive -lstdc++ -lwinmm -lole32 -lsetupapi - $TARGET-strip libportaudio-$TARGET.dll - chmod -x libportaudio-$TARGET.dll - # again, you'll probably have to use "sudo": - rm -r /usr/local/asiosdk2 - done - - mv libportaudio-x86_64-w64-mingw32.static.dll libportaudio64bit.dll - mv libportaudio-i686-w64-mingw32.static.dll libportaudio32bit.dll - -A different set of DLLs (compiled with Visual Studio) is available at -https://github.com/adfernandes/precompiled-portaudio-windows. - -dylib for Mac OS X (64-bit) ---------------------------- - -The dylib was created on a Mac OS X system using XCode. -The XCode CLI tools were installed with: - - xcode-select --install - -The following commands were used for compilation: - - curl -O http://files.portaudio.com/archives/pa_stable_v190700_20210406.tgz - tar xvf pa_stable_v190700_20210406.tgz - cd portaudio - # in configure: replace "-Werror" (just search for it) with "-DNDEBUG" - ./configure MACOSX_DEPLOYMENT_TARGET=10.6 - make - cd .. - cp portaudio/lib/.libs/libportaudio.2.dylib libportaudio.dylib +All files were auto-created with Github Actions. +For all the details, see [the config file](.github/workflows/build-libs.yml). Copyright --------- diff --git a/libportaudio.dylib b/libportaudio.dylib index 2e236a1..a7ec94d 100644 Binary files a/libportaudio.dylib and b/libportaudio.dylib differ diff --git a/libportaudio32bit-asio.dll b/libportaudio32bit-asio.dll new file mode 100644 index 0000000..f34254d Binary files /dev/null and b/libportaudio32bit-asio.dll differ diff --git a/libportaudio32bit.dll b/libportaudio32bit.dll index e900ea4..a1043e0 100644 Binary files a/libportaudio32bit.dll and b/libportaudio32bit.dll differ diff --git a/libportaudio64bit-asio.dll b/libportaudio64bit-asio.dll new file mode 100644 index 0000000..92a535c Binary files /dev/null and b/libportaudio64bit-asio.dll differ diff --git a/libportaudio64bit.dll b/libportaudio64bit.dll index 0d4c840..0a4ab4b 100644 Binary files a/libportaudio64bit.dll and b/libportaudio64bit.dll differ