-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
921 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[wrap-file] | ||
directory = miniaudio-0.11.21 | ||
source_url = https://github.com/mackron/miniaudio/archive/refs/tags/0.11.21.tar.gz | ||
source_filename = v0.11.21.tar.gz | ||
source_hash = 6afb5c231613d2fab4f1c668b7243ff9a7d6d78a7f5a2692c133f026fe508506 | ||
patch_directory = miniaudio | ||
|
||
[provide] | ||
dependency_names = miniaudio |
248 changes: 248 additions & 0 deletions
248
subprojects/packagefiles/miniaudio/examples/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,248 @@ | ||
ma_example_broken = disabler() | ||
|
||
sdl_dep = disabler() | ||
if device_io.enabled() | ||
sdl_dep = dependency('sdl2', required: false) | ||
if sdl_dep.found() | ||
executable( | ||
'custom_backend', | ||
'custom_backend.c', | ||
dependencies: ma_sys_deps + ma_backend_deps + sdl_dep, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
endif | ||
|
||
if decoding and device_io.enabled() and ( | ||
opus_dep.found() | ||
and opusfile_dep.found() | ||
and vorbis_dep.found() | ||
and vorbisfile_dep.found() | ||
) | ||
executable( | ||
'custom_decoder', | ||
'custom_decoder.c', | ||
dependencies: ma_sys_deps | ||
+ ma_backend_deps | ||
+ [opus_dep, opusfile_dep, vorbis_dep, vorbisfile_dep], | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
|
||
if engine and resource_manager.enabled() | ||
executable( | ||
'custom_decoder_engine', | ||
'custom_decoder_engine.c', | ||
dependencies: ma_sys_deps | ||
+ ma_backend_deps | ||
+ [opus_dep, opusfile_dep, vorbis_dep, vorbisfile_dep], | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
endif | ||
|
||
if decoding and device_io.enabled() | ||
executable( | ||
'data_source_chaining', | ||
'data_source_chaining.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
|
||
if node_graph.enabled() and device_io.enabled() | ||
executable( | ||
'duplex_effect', | ||
'duplex_effect.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
|
||
if engine and device_io.enabled() and resource_manager.enabled() | ||
executable( | ||
'engine_hello_world', | ||
'engine_hello_world.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
executable( | ||
'engine_advanced', | ||
'engine_advanced.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
if sdl_dep.found() | ||
executable( | ||
'engine_sdl', | ||
'engine_sdl.c', | ||
dependencies: ma_sys_deps + ma_backend_deps + sdl_dep, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
endif | ||
|
||
if engine and node_graph.enabled() | ||
executable( | ||
'engine_effects', | ||
'engine_effects.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
|
||
if engine | ||
phonon_dep = dependency('phonon', required: false) | ||
if phonon_dep.found() | ||
executable( | ||
'engine_steamaudio', | ||
'engine_steamaudio.c', | ||
dependencies: ma_sys_deps + ma_backend_deps + phonon_dep, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
endif | ||
|
||
if device_io.enabled() and engine | ||
executable( | ||
'hilo_interop', | ||
'hilo_interop.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
|
||
if node_graph.enabled() and decoding and device_io.enabled() | ||
executable( | ||
'node_graph', | ||
'node_graph.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
|
||
if resource_manager.enabled() and device_io.enabled() | ||
executable( | ||
'resource_manager', | ||
'resource_manager.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
executable( | ||
'resource_manager_advanced', | ||
'resource_manager_advanced.c', | ||
# FIXME: resource_manager_advanced.c:194:37: | ||
# error: ‘MA_RESOURCE_MANAGER_JOB_QUIT’ undeclared | ||
ma_example_broken, | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
|
||
if device_io.enabled() and encoding | ||
executable( | ||
'simple_capture', | ||
'simple_capture.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
if device_io.enabled() | ||
executable( | ||
'simple_duplex', | ||
'simple_duplex.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
executable( | ||
'simple_enumeration', | ||
'simple_enumeration.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
|
||
if device_io.enabled() and ( | ||
'wasapi' in backends | ||
or (backends == ['_miniaudio_default'] and host_system == 'windows') | ||
) | ||
executable( | ||
'simple_loopback', | ||
'simple_loopback.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
|
||
if device_io.enabled() and decoding | ||
executable( | ||
'simple_looping', | ||
'simple_looping.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
executable( | ||
'simple_mixing', | ||
'simple_mixing.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
executable( | ||
'simple_playback', | ||
'simple_playback.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif | ||
|
||
if device_io.enabled() and generation | ||
executable( | ||
'simple_playback_sine', | ||
'simple_playback_sine.c', | ||
dependencies: ma_sys_deps + ma_backend_deps, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
ma_extras_c_args = ma_c_args | ||
if cc.get_argument_syntax() == 'msvc' | ||
ma_extras_c_args += '/FIminiaudio.h' | ||
else | ||
ma_extras_c_args += ['-include', 'miniaudio.h'] | ||
endif | ||
|
||
ma_extra_srcs = [] | ||
|
||
opus_dep = dependency('opus', required: get_option('libopus')) | ||
opusfile_dep = dependency('opusfile', required: get_option('libopus')) | ||
if opus_dep.found() and opusfile_dep.found() | ||
ma_all_libs += static_library( | ||
'miniaudio_libopus', | ||
configure_file( | ||
input: 'miniaudio_libopus.h', | ||
output: 'miinaudio_libopus.c', | ||
copy: true, | ||
), | ||
extra_files: 'miniaudio_libopus.h', | ||
dependencies: ma_sys_deps + [opus_dep, opusfile_dep], | ||
c_args: ma_extras_c_args, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
pic: true, | ||
) | ||
endif | ||
|
||
vorbis_dep = dependency('vorbis', required: get_option('libvorbis')) | ||
vorbisfile_dep = dependency('vorbisfile', required: get_option('libvorbis')) | ||
if vorbis_dep.found() and vorbisfile_dep.found() | ||
ma_all_libs += static_library( | ||
'miniaudio_libvorbis', | ||
configure_file( | ||
input: 'miniaudio_libvorbis.h', | ||
output: 'miinaudio_libvorbis.c', | ||
copy: true, | ||
), | ||
extra_files: 'miniaudio_libvorbis.h', | ||
dependencies: ma_sys_deps + [vorbis_dep, vorbisfile_dep], | ||
c_args: ma_extras_c_args, | ||
install: false, | ||
implicit_include_directories: false, | ||
include_directories: ma_inc, | ||
pic: true, | ||
) | ||
|
||
if get_option('stbvorbis') | ||
warning( | ||
'you might want to disable the built-in stb_vorbis decoder to ensure the libvorbis decoder is picked.', | ||
) | ||
endif | ||
endif | ||
|
||
if get_option('stbvorbis') | ||
stbvorbis_file = files('stb_vorbis.c') | ||
ma_all_libs += static_library( | ||
'miniaudio_stbvorbis', | ||
stbvorbis_file, | ||
dependencies: ma_sys_deps, | ||
c_args: ma_c_args, | ||
install: false, | ||
pic: true, | ||
) | ||
|
||
ma_extra_srcs += stbvorbis_file | ||
ma_c_args += '-DSTB_VORBIS_HEADER_ONLY' | ||
else | ||
ma_c_args += '-DMA_NO_VORBIS' | ||
endif | ||
|
||
if node_graph.enabled() | ||
subdir('nodes') | ||
endif |
Oops, something went wrong.