summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/osd/modules.lua
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2025-04-14 11:31:53 +0200
committer Olivier Galibert <galibert@pobox.com>2025-04-27 22:23:20 +0200
commitd0f1c15a0f6df2dd51a754cb46e6175b7079c8f2 (patch)
treebe35c94340442af08c316a8679089ee68e119fac /scripts/src/osd/modules.lua
parentec636faeba5c5841c5a4a35b7c9dc2f06a00f538 (diff)
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
Diffstat (limited to 'scripts/src/osd/modules.lua')
-rw-r--r--scripts/src/osd/modules.lua42
1 files changed, 42 insertions, 0 deletions
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
@@ -667,6 +692,23 @@ if not _OPTIONS["NO_USE_PULSEAUDIO"] then
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",
allowed = {