Fix Haiku build

This commit is contained in:
Gustaf Alhäll authored and Alug committed 2025-12-04 15:29:05 +01:00
1 parent 8486b7add6
commit e716de35cc
2 files changed
+45

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
# Find FluidSynth
# Once done, this will define
#
# FLUIDSYNTH_FOUND - system has FluidSynth
# FLUIDSYNTH_INCLUDE_DIRS - FluidSynth include directories
# FLUIDSYNTH_LIBRARIES - link libraries
include(LibFindMacros)
libfind_pkg_check_modules(FLUIDSYNTH_PKGCONF FLUIDSYNTH)
# includes
find_path(FLUIDSYNTH_INCLUDE_DIR
NAMES fluidsynth.h
PATHS
${FLUIDSYNTH_PKGCONF_INCLUDE_DIRS}
)
# library
find_library(FLUIDSYNTH_LIBRARY
NAMES fluidsynth
PATHS
${FLUIDSYNTH_PKGCONF_LIBRARY_DIRS}
"/usr/lib"
"/usr/local/lib"
)
# set include dir variables
set(FLUIDSYNTH_PROCESS_INCLUDES FLUIDSYNTH_INCLUDE_DIR)
set(FLUIDSYNTH_PROCESS_LIBS FLUIDSYNTH_LIBRARY)
libfind_process(FLUIDSYNTH)
if(FLUIDSYNTH_FOUND AND NOT TARGET FluidSynth::libfluidsynth)
add_library(FluidSynth::libfluidsynth UNKNOWN IMPORTED)
set_target_properties(
FluidSynth::libfluidsynth
PROPERTIES
IMPORTED_LOCATION "${FLUIDSYNTH_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${FLUIDSYNTH_INCLUDE_DIR}"
)
endif()
+4
View File
@@ -1199,7 +1199,11 @@ boolean I_SetSongSpeed(float speed)
if (synth_player)
{
SDL_LockAudioStream(audio_stream);
#if FLUIDSYNTH_VERSION_MINOR < 2
fluid_player_set_bpm(synth_player, speed);
#else
fluid_player_set_tempo(synth_player, FLUID_PLAYER_TEMPO_INTERNAL, speed);
#endif
SDL_UnlockAudioStream(audio_stream);
return true;
}