From d0f1c15a0f6df2dd51a754cb46e6175b7079c8f2 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Mon, 14 Apr 2025 11:31:53 +0200 Subject: New sound infrastructure. Should be added soon: - mute - speaker/microphone resampling To be added a little later: - compression - reverb Needs to be added by someone else: - coreaudio - direct - portaudio - xaudio2 - js --- scripts/src/osd/modules.lua | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'scripts/src/osd/modules.lua') diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index ca49a2682ca..b532124302f 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -52,6 +52,7 @@ function osdmodulesbuild() files { MAME_DIR .. "src/osd/watchdog.cpp", MAME_DIR .. "src/osd/watchdog.h", + MAME_DIR .. "src/osd/interface/audio.h", MAME_DIR .. "src/osd/interface/inputcode.h", MAME_DIR .. "src/osd/interface/inputdev.h", MAME_DIR .. "src/osd/interface/inputfwd.h", @@ -134,7 +135,9 @@ function osdmodulesbuild() MAME_DIR .. "src/osd/modules/sound/none.cpp", MAME_DIR .. "src/osd/modules/sound/pa_sound.cpp", MAME_DIR .. "src/osd/modules/sound/pulse_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/pipewire_sound.cpp", MAME_DIR .. "src/osd/modules/sound/sdl_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/sound_module.cpp", MAME_DIR .. "src/osd/modules/sound/sound_module.h", MAME_DIR .. "src/osd/modules/sound/xaudio2_sound.cpp", } @@ -302,6 +305,22 @@ function osdmodulesbuild() } end + err = os.execute(pkgconfigcmd() .. " --exists libpipewire-0.3") + if not err then + _OPTIONS["NO_USE_PIPEWIRE"] = "1" + end + + if _OPTIONS["NO_USE_PIPEWIRE"]=="1" then + defines { + "NO_USE_PIPEWIRE", + } + else + buildoptions { + backtick(pkgconfigcmd() .. " --cflags libpipewire-0.3"), + } + end + + if _OPTIONS["NO_USE_MIDI"]=="1" then defines { "NO_USE_MIDI", @@ -564,6 +583,12 @@ function osdmodulestargetconf() ext_lib("pulse"), } end + + if _OPTIONS["NO_USE_PIPEWIRE"]=="0" then + local str = backtick(pkgconfigcmd() .. " --libs libpipewire-0.3") + addlibfromstring(str) + addoptionsfromstring(str) + end end @@ -666,6 +691,23 @@ if not _OPTIONS["NO_USE_PULSEAUDIO"] then end end +newoption { + trigger = "NO_USE_PIPEWIRE", + description = "Disable Pipewire interface", + allowed = { + { "0", "Enable Pipewire" }, + { "1", "Disable Pipewire" }, + }, +} + +if not _OPTIONS["NO_USE_PIPEWIRE"] then + if _OPTIONS["targetos"]=="linux" then + _OPTIONS["NO_USE_PIPEWIRE"] = "0" + else + _OPTIONS["NO_USE_PIPEWIRE"] = "1" + end +end + newoption { trigger = "MODERN_WIN_API", description = "Use Modern Windows APIs", -- cgit v1.2.3-70-g09d2