Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #29 from oleg68/bugfix/bad-jack-client-name
Browse files Browse the repository at this point in the history
Fix some issues with pipewire
  • Loading branch information
oleg68 authored May 8, 2021
2 parents 9327422 + 7b56f0c commit 2bc76a3
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ else()
endif ()

if (RTAUDIO_USE_JACK OR RTMIDI_USE_JACK OR GO_USE_JACK)
pkg_check_modules(JACK REQUIRED jack)
pkg_check_modules(JACK REQUIRED IMPORTED_TARGET jack)
endif()

# include RtAudio
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/for-linux/prepare-fedora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

set -e
sudo dnf install -y cmake gcc-c++ make gettext docbook-style-xsl zip po4a \
jack-audio-connection-kit-devel fftw-devel zlib-devel wavpack-devel wxGTK3-devel \
pipewire-jack-audio-connection-kit-devel fftw-devel zlib-devel wavpack-devel wxGTK3-devel \
alsa-lib-devel systemd-devel
2 changes: 1 addition & 1 deletion src/grandorgue/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,5 @@ add_custom_target(runperftest COMMAND perftest "${CMAKE_SOURCE_DIR}/tests" DEPEN

if (GO_USE_JACK STREQUAL "ON")
add_definitions(-DGO_USE_JACK)
target_link_libraries(GrandOrgue jack)
target_link_libraries(GrandOrgue PkgConfig::JACK)
endif ()
2 changes: 1 addition & 1 deletion src/grandorgue/GOrgueSoundJackPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GOrgueSoundJackPort::~GOrgueSoundJackPort()

static const wxString DEVICE_NAME = "Jack Output";
static const jack_options_t JACK_OPTIONS = JackNullOption;
static const char * CLIENT_NAME = "GrandOrgue";
static const char * CLIENT_NAME = "GrandOrgueAudio";

void GOrgueSoundJackPort::JackLatencyCallback (jack_latency_callback_mode_t mode, void *data) {
if (mode == JackPlaybackLatency) {
Expand Down
2 changes: 1 addition & 1 deletion src/grandorgue/GOrgueSoundPortaudioPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ wxString GOrgueSoundPortaudioPort::getName(unsigned index)
{
const PaDeviceInfo* info = Pa_GetDeviceInfo(index);
const PaHostApiInfo *api = Pa_GetHostApiInfo(info->hostApi);
return wxGetTranslation(wxString::FromAscii(api->name)) + wxString(_(" (PA): ")) + wxString::FromAscii(info->name);
return wxGetTranslation(wxString::FromAscii(api->name)) + wxString(_(" (PA): ")) + wxString(info->name);
}

GOrgueSoundPort* GOrgueSoundPortaudioPort::create(GOrgueSound* sound, wxString name)
Expand Down
2 changes: 1 addition & 1 deletion src/grandorgue/GOrgueSoundRtPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ wxString GOrgueSoundRtPort::getName(RtAudio::Api api, RtAudio* rt_api, unsigned
try
{
RtAudio::DeviceInfo info = rt_api->getDeviceInfo(index);
return prefix + wxString::FromAscii(info.name.c_str());
return prefix + wxString(info.name);
}
catch (RtAudioError &e)
{
Expand Down
11 changes: 8 additions & 3 deletions src/portaudio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ set(PortAudio_Mac
hostapi/coreaudio/pa_mac_core_blocking.c
hostapi/coreaudio/pa_mac_core_utilities.c)

set(PA_LIBDIRS)
set(PA_Libs)

if (WIN32)
Expand Down Expand Up @@ -109,7 +110,8 @@ if (WIN32)
if (RTAUDIO_USE_JACK)
add_definitions(-DPA_USE_JACK)
set(PortAudio_Sources ${PortAudio_Sources} hostapi/jack/pa_jack.c)
set(PA_Libs ${PA_Libs} jack)
set(PA_LIBDIRS ${PA_LIBDIRS} ${JACK_LIBRARY_DIRS})
set(PA_Libs ${PA_Libs} ${JACK_LIBRARIES})
endif ()

set(PortAudio_Sources ${PortAudio_Sources} ${PortAudio_Win})
Expand All @@ -126,7 +128,8 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (RTAUDIO_USE_JACK)
add_definitions(-DPA_USE_JACK)
set(PortAudio_Sources ${PortAudio_Sources} hostapi/jack/pa_jack.c)
set(PA_Libs ${PA_Libs} jack)
set(PA_LIBDIRS ${PA_LIBDIRS} ${JACK_LIBRARY_DIRS})
set(PA_Libs ${PA_Libs} ${JACK_LIBRARIES})
endif ()

if (RTAUDIO_USE_ALSA)
Expand Down Expand Up @@ -156,7 +159,8 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if (RTAUDIO_USE_JACK)
add_definitions(-DPA_USE_JACK)
set(PortAudio_Sources ${PortAudio_Sources} hostapi/jack/pa_jack.c)
set(PA_Libs ${PA_Libs} jack)
set(PA_LIBDIRS ${PA_LIBDIRS} ${JACK_LIBRARY_DIRS})
set(PA_Libs ${PA_Libs} ${JACK_LIBRARIES})
endif ()

if (RTAUDIO_USE_CORE)
Expand All @@ -174,6 +178,7 @@ endif ()
include_directories(${JACK_INCLUDE_DIRS})

add_library(PortAudio STATIC ${PortAudio_Sources})
target_link_directories(PortAudio PUBLIC ${PA_LIBDIRS})
target_link_libraries(PortAudio ${PA_Libs})

message(STATUS "============================================================================")
4 changes: 2 additions & 2 deletions src/rt/rtaudio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")

if (RTAUDIO_USE_JACK)
add_definitions(-D__UNIX_JACK__)
target_link_libraries(RtAudio jack)
target_link_libraries(RtAudio PkgConfig::JACK)
endif ()

if (RTAUDIO_USE_ALSA)
Expand All @@ -87,7 +87,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

if (RTAUDIO_USE_JACK)
add_definitions(-D__UNIX_JACK__)
target_link_libraries(RtAudio jack)
target_link_libraries(RtAudio PkgConfig::JACK)
endif ()

if (RTAUDIO_USE_CORE)
Expand Down
6 changes: 3 additions & 3 deletions src/rt/rtmidi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (WIN32)

if (RTMIDI_USE_JACK)
add_definitions(-D__UNIX_JACK__)
target_link_libraries(RtMidi jack)
target_link_libraries(RtMidi PkgConfig::JACK)
endif ()

if (RTMIDI_USE_MM)
Expand All @@ -48,7 +48,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")

if (RTMIDI_USE_JACK)
add_definitions(-D__UNIX_JACK__)
target_link_libraries(RtMidi jack)
target_link_libraries(RtMidi PkgConfig::JACK)
endif ()

if (RTMIDI_USE_ALSA)
Expand All @@ -69,7 +69,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

if (RTMIDI_USE_JACK)
add_definitions(-D__UNIX_JACK__)
target_link_libraries(RtMidi jack)
target_link_libraries(RtMidi PkgConfig::JACK)
endif ()

if (RTMIDI_USE_CORE)
Expand Down

0 comments on commit 2bc76a3

Please sign in to comment.