Skip to content

Commit

Permalink
ao_jack: modularize
Browse files Browse the repository at this point in the history
  • Loading branch information
t-8ch committed Jan 14, 2023
1 parent 420ebfd commit 423dc0b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion audio/out/ao.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static struct ao_module audio_out_drivers[] = {
#endif
// wrappers:
#if HAVE_JACK
BUILTIN(&audio_out_jack),
MODULAR(jack),
#endif
#if HAVE_OPENAL
BUILTIN(&audio_out_openal),
Expand Down
2 changes: 1 addition & 1 deletion audio/out/ao_jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static void uninit(struct ao *ao)
jack_client_close(p->client);
}

const struct ao_driver audio_out_jack = {
const struct ao_driver AO_MODULE_DRIVER(audio_out_jack) = {
.description = "JACK audio output",
.name = "jack",
.init = init,
Expand Down
14 changes: 12 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,18 @@ jack_opt = get_option('jack').require(
jack = dependency('jack', required: jack_opt)
features += {'jack': jack.found()}
if features['jack']
dependencies += jack
sources += files('audio/out/ao_jack.c')
if features['modular-drivers']
shared_module(
'mpv-ao-jack',
'audio/out/ao_jack.c',
dependencies: [jack],
install: true,
install_dir: moduledir,
)
else
dependencies += jack
sources += files('audio/out/ao_jack.c')
endif
endif

openal = dependency('openal', version: '>= 1.13', required: get_option('openal'))
Expand Down

0 comments on commit 423dc0b

Please sign in to comment.