Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ if(WIN32)
else()
# Linux-specific targets
add_subdirectory(linux)

# Protocol tests (Linux only - tests not needed on Windows)
add_subdirectory(protocol/test)
endif()
endif()
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ The GUI provides live feedback on:
```

#### 🛠️ Building the ASIO Driver
3. Install [CMake](https://cmake.org/download/) and a supported compiler (e.g., Visual Studio).
3. Install [CMake](https://cmake.org/download/) and a supported compiler (e.g., Visual Studio or MinGW).
4. Open a terminal and run:
```powershell
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" # or your version
cmake .. -G "Visual Studio 17 2022" # or "MingGW Makefiles"
cmake --build . --config Release
```
5. The ASIO driver DLL will be in `build/windows/asio/PWARASIO.dll`.
Expand Down
26 changes: 19 additions & 7 deletions windows/asio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,25 @@ add_library(PWARASIO SHARED ${PWARASIO_SOURCES})
# Set output name to PWARASIO.dll
set_target_properties(PWARASIO PROPERTIES OUTPUT_NAME "PWARASIO")

# Add the .def file for proper symbol exports
set_target_properties(PWARASIO PROPERTIES LINK_FLAGS "/DEF:${CMAKE_CURRENT_SOURCE_DIR}/pwarASIO.def")
if (MSVC)
# # Add the .def file for proper symbol exports
set_target_properties(PWARASIO PROPERTIES LINK_FLAGS "/DEF:${CMAKE_CURRENT_SOURCE_DIR}/pwarASIO.def")
else()
set_target_properties(PWARASIO PROPERTIES
PREFIX ""
OUTPUT_NAME "pwarASIO"
WINDOWS_EXPORT_ALL_SYMBOLS FALSE
)

# explicit exports
set_property(TARGET PWARASIO PROPERTY
LINK_FLAGS "-Wl,--export-all-symbols -Wl,--add-stdcall-alias"
)

target_sources(PWARASIO PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/pwarASIO.rc)

target_link_libraries(PWARASIO PRIVATE ws2_32 avrt)
endif()

target_include_directories(PWARASIO PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
Expand All @@ -33,8 +50,3 @@ target_compile_definitions(PWARASIO PRIVATE WIN32 _WINDOWS _CRT_SECURE_NO_DEPREC

target_link_libraries(PWARASIO PRIVATE odbc32 odbccp32 winmm)

add_custom_command(TARGET PWARASIO POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:PWARASIO>
Z:/music_production/PWAR/
)
6 changes: 3 additions & 3 deletions windows/asio/pwarASIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ STDMETHODIMP pwarASIO::NonDelegatingQueryInterface(REFIID riid, void** ppv) {
extern LONG RegisterAsioDriver(CLSID, char*, char*, char*, char*);
extern LONG UnregisterAsioDriver(CLSID, char*, char*);

HRESULT _stdcall DllRegisterServer() {
extern "C" __declspec(dllexport) HRESULT _stdcall DllRegisterServer() {
LONG rc = RegisterAsioDriver(IID_ASIO_DRIVER, "PWARASIO.dll", "PWAR ASIO Driver", "PWAR ASIO", "Apartment");
if (rc) {
char errstr[128] = {0};
Expand All @@ -68,7 +68,7 @@ HRESULT _stdcall DllRegisterServer() {
return S_OK;
}

HRESULT _stdcall DllUnregisterServer() {
extern "C" __declspec(dllexport) HRESULT _stdcall DllUnregisterServer() {
LONG rc = UnregisterAsioDriver(IID_ASIO_DRIVER, "PWARASIO.dll", "PWAR ASIO Driver");
if (rc) {
char errstr[128] = {0};
Expand All @@ -77,7 +77,7 @@ HRESULT _stdcall DllUnregisterServer() {
return -1;
}
return S_OK;
}
}

pwarASIO::pwarASIO(LPUNKNOWN pUnk, HRESULT* phr)
: CUnknown("PWARASIO", pUnk, phr),
Expand Down
12 changes: 12 additions & 0 deletions windows/asio/pwarASIO.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileDescription", "PipeWire ASIO Relay\0"
END
END
END