From c8c0af300dde117a839f2d5d6b777694d7f118e9 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Mon, 28 Apr 2025 14:11:28 -0400 Subject: Minor restructure and dependency updates Signed-off-by: Andrew Opalach --- .gitignore | 4 +- env/wsl/bootstrap-configuration.nix | 2 +- env/wsl/noto_cjk_no_variable.diff | 40 ---- env/wsl/wsl-dev-host.nix | 11 +- flake.lock | 18 +- flake.nix | 24 ++- hardware/cmsb-001/configuration.nix | 1 - meson.build | 6 +- scripts/cmv.sh | 18 -- src/codec/ffmpeg/decoder.c | 2 +- src/codec/ffmpeg/demuxer.c | 12 +- src/fruits/cmc/ui/widgets/now_playing.c | 2 +- src/fruits/cmv/cmv.c | 9 +- src/fruits/ctv/ctv.c | 6 +- src/libsink/desktop.c | 265 ++++++++++++++++++++++++ src/libsink/desktop.h | 26 +++ src/libsink/input_simulator.c | 68 +++++++ src/libsink/input_simulator.h | 10 + src/libsink/meson.build | 5 + src/server/server.c | 2 +- src/sink/desktop.c | 266 ------------------------- src/sink/desktop.h | 26 --- src/sink/input_simulator.c | 68 ------- src/sink/input_simulator.h | 10 - src/sink/meson.build | 4 - src/sink/util.h | 21 -- src/util/print_time.h | 21 ++ subprojects/BLAKE3.wrap | 4 +- subprojects/libalabaster.wrap | 2 +- subprojects/libnaunet.wrap | 2 +- subprojects/linmath.h.wrap | 1 + subprojects/miniaudio.wrap | 6 +- subprojects/packagefiles/miniaudio/meson.build | 2 +- subprojects/packagefiles/stb/meson.build | 2 +- subprojects/stb.wrap | 1 + subprojects/stela.wrap | 2 +- 36 files changed, 466 insertions(+), 503 deletions(-) delete mode 100644 env/wsl/noto_cjk_no_variable.diff delete mode 100755 scripts/cmv.sh create mode 100644 src/libsink/desktop.c create mode 100644 src/libsink/desktop.h create mode 100644 src/libsink/input_simulator.c create mode 100644 src/libsink/input_simulator.h delete mode 100644 src/sink/desktop.c delete mode 100644 src/sink/desktop.h delete mode 100644 src/sink/input_simulator.c delete mode 100644 src/sink/input_simulator.h delete mode 100644 src/sink/meson.build delete mode 100644 src/sink/util.h create mode 100644 src/util/print_time.h diff --git a/.gitignore b/.gitignore index e4bf260..1f4ec79 100644 --- a/.gitignore +++ b/.gitignore @@ -58,14 +58,14 @@ subprojects/libpng-*/ subprojects/libpng.wrap subprojects/libxml2-*/ subprojects/libxml2.wrap -subprojects/linmath.h/ +subprojects/linmath.h-*/ subprojects/miniaudio-*/ subprojects/notcurses-*/ subprojects/packagecache/ subprojects/pcre2-*/ subprojects/pcre2.wrap subprojects/shaderc-*/ -subprojects/stb/ +subprojects/stb-*/ subprojects/stela subprojects/stela/ subprojects/vulkan-headers-*/ diff --git a/env/wsl/bootstrap-configuration.nix b/env/wsl/bootstrap-configuration.nix index b66147c..1dddade 100755 --- a/env/wsl/bootstrap-configuration.nix +++ b/env/wsl/bootstrap-configuration.nix @@ -8,5 +8,5 @@ environment.systemPackages = with pkgs; [ git nfs-utils ]; - system.stateVersion = "23.05"; + system.stateVersion = "25.05"; } diff --git a/env/wsl/noto_cjk_no_variable.diff b/env/wsl/noto_cjk_no_variable.diff deleted file mode 100644 index 152c140..0000000 --- a/env/wsl/noto_cjk_no_variable.diff +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/pkgs/by-name/no/noto-fonts-cjk-sans/package.nix b/pkgs/by-name/no/noto-fonts-cjk-sans/package.nix -index 5c7ab768..79981e27 100644 ---- a/pkgs/by-name/no/noto-fonts-cjk-sans/package.nix -+++ b/pkgs/by-name/no/noto-fonts-cjk-sans/package.nix -@@ -13,12 +13,12 @@ stdenvNoCC.mkDerivation rec { - owner = "notofonts"; - repo = "noto-cjk"; - rev = "Sans${version}"; -- hash = "sha256-IgalJkiOAVjNxKaPAQWfb5hKeqclliR4qVXCq63FGWY="; -- sparseCheckout = [ "Sans/Variable/OTC" ]; -+ hash = "sha256-GXULnRPsIJRdiL3LdFtHbqTqSvegY2zodBxFm4P55to="; -+ sparseCheckout = [ "Sans/OTC" ]; - }; - - installPhase = '' -- install -m444 -Dt $out/share/fonts/opentype/noto-cjk Sans/Variable/OTC/*.otf.ttc -+ install -m444 -Dt $out/share/fonts/opentype/noto-cjk Sans/OTC/*.ttc - ''; - - passthru.tests.noto-fonts = nixosTests.noto-fonts; -diff --git a/pkgs/by-name/no/noto-fonts-cjk-serif/package.nix b/pkgs/by-name/no/noto-fonts-cjk-serif/package.nix -index d9fddcc6..55cde591 100644 ---- a/pkgs/by-name/no/noto-fonts-cjk-serif/package.nix -+++ b/pkgs/by-name/no/noto-fonts-cjk-serif/package.nix -@@ -13,12 +13,12 @@ stdenvNoCC.mkDerivation rec { - owner = "notofonts"; - repo = "noto-cjk"; - rev = "Serif${version}"; -- hash = "sha256-GLjpTAiHfygj1J4AdUVDJh8kykkFOglq+h4kyat5W9s="; -- sparseCheckout = [ "Serif/Variable/OTC" ]; -+ hash = "sha256-ihbhbv875XEHupFUzIdEweukqEmwQXCXCiTG7qisE64="; -+ sparseCheckout = [ "Serif/OTC" ]; - }; - - installPhase = '' -- install -m444 -Dt $out/share/fonts/opentype/noto-cjk Serif/Variable/OTC/*.otf.ttc -+ install -m444 -Dt $out/share/fonts/opentype/noto-cjk Serif/OTC/*.ttc - ''; - - passthru.tests.noto-fonts = nixosTests.noto-fonts; diff --git a/env/wsl/wsl-dev-host.nix b/env/wsl/wsl-dev-host.nix index ccd0ac4..0e9877e 100755 --- a/env/wsl/wsl-dev-host.nix +++ b/env/wsl/wsl-dev-host.nix @@ -6,7 +6,6 @@ in { enable = true; defaultUser = user; useWindowsDriver = true; - nativeSystemd = true; }; users.users.${user}.extraGroups = [ "audio" "video" ]; @@ -47,6 +46,16 @@ in { cmatrix ]; + # @TEMP: https://github.com/nix-community/NixOS-WSL/issues/650 + # Needed for Wayland. + systemd.services."user-runtime-dir@" = { + overrideStrategy = "asDropin"; + serviceConfig.ExecStart = [ + "" # unset old value + "${pkgs.coreutils}/bin/true" + ]; + }; + fonts = { fontDir.enable = true; packages = with pkgs; [ diff --git a/flake.lock b/flake.lock index 99da824..ea307ab 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ ] }, "locked": { - "lastModified": 1745439012, - "narHash": "sha256-TwbdiH28QK7Da2JQTqFHdb+UCJq6QbF2mtf+RxHVzEA=", + "lastModified": 1745782215, + "narHash": "sha256-mx27J2HYQT+nGXTyUWKrUuxRzpr1FVVr59ZH4oNzOyw=", "owner": "nix-community", "repo": "home-manager", - "rev": "d31710fb2cd536b1966fee2af74e99a0816a61a8", + "rev": "7b2aae3fb39928aecc5e41c10a9c87c4881614d5", "type": "github" }, "original": { @@ -39,11 +39,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1745392233, - "narHash": "sha256-xmqG4MZArM1JNxPJ33s0MtuBzgnaCO9laARoU3AfP8E=", + "lastModified": 1745503349, + "narHash": "sha256-bUGjvaPVsOfQeTz9/rLTNLDyqbzhl0CQtJJlhFPhIYw=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "8bf8a2a0822365bd8f44fd1a19d7ed0a1d629d64", + "rev": "f7bee55a5e551bd8e7b5b82c9bc559bc50d868d1", "type": "github" }, "original": { @@ -91,11 +91,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1745391562, - "narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=", + "lastModified": 1745526057, + "narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7", + "rev": "f771eb401a46846c1aebd20552521b233dd7e18b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 7ad79c1..93aba68 100644 --- a/flake.nix +++ b/flake.nix @@ -344,6 +344,11 @@ }); # https://github.com/nix-community/NixOS-WSL?tab=readme-ov-file#quick-start + # sudo nix-channel --update + # sudo cp bootstrap-configuration.nix /etc/nixos/configuration.nix + # sudo nixos-rebuild switch + # sudo nixos-rebuild --flake .#wsl-dev boot + # kitty_new_window.bat nixosConfigurations.wsl-dev = let system = "x86_64-linux"; source-pkgs = nixpkgs.legacyPackages.${system}; @@ -356,7 +361,13 @@ in nixosSystem { system = system; modules = [ - ({ pkgs, ... }: { nixpkgs.overlays = [ ]; }) + ({ pkgs, ... }: { + nixpkgs.overlays = []; + environment.systemPackages = [ + packages.${system}.default + packages.${system}.shellWrapper + ]; + }) nixos-wsl.nixosModules.wsl home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -380,14 +391,11 @@ system = system; modules = [ ({ pkgs, ... }: { - nixpkgs.overlays = [ - (self: super: { - camu = packages.${system}.default.overrideAttrs (oldAttrs: { - #mesonFlags = ["-Dsink-for-rpi=true"]; - }); - }) + nixpkgs.overlays = []; + environment.systemPackages = [ + (packages.${system}.default.overrideAttrs (oldAttrs: { mesonFlags = ["-Dsink-for-rpi=true"]; })) + packages.${system}.shellWrapper ]; - environment.systemPackages = [ packages.${system}.shellWrapper ]; }) nixos-hardware.nixosModules.raspberry-pi-3 ./hardware/cmsb-001/configuration.nix diff --git a/hardware/cmsb-001/configuration.nix b/hardware/cmsb-001/configuration.nix index 3390cfe..dcc9b67 100644 --- a/hardware/cmsb-001/configuration.nix +++ b/hardware/cmsb-001/configuration.nix @@ -123,7 +123,6 @@ cage nfs-utils mpv - camu ]; security.wrappers = { diff --git a/meson.build b/meson.build index 94a8d08..e12e909 100644 --- a/meson.build +++ b/meson.build @@ -21,7 +21,8 @@ naunet_has_mmap = naunet.get_variable('naunet_has_mmap') common_deps = [alabaster.get_variable('alabaster'), naunet.get_variable('naunet')] no_video = meson.is_subproject() -if not no_video +# @TODO: Does it make sense for stela to be a dependency for server-side(headless) transcode. +#if not no_video stela_opts = ['poll=inline', 'event-buffer=false', 'pause=true'] if is_linux stela_opts += get_option('sink-use-vulkan') ? 'window=glfw' : 'window=wayland' @@ -43,7 +44,7 @@ if not no_video stela_opts += 'egl-brcm=true' endif stela = subproject('stela', default_options: stela_opts).get_variable('stela') -endif +#endif subdir('src/util') common_deps += [util] @@ -72,7 +73,6 @@ if get_option('sink').enabled() subdir('src/screen') endif subdir('src/libsink') - subdir('src/sink') endif if not meson.is_subproject() diff --git a/scripts/cmv.sh b/scripts/cmv.sh deleted file mode 100755 index 0bf2de5..0000000 --- a/scripts/cmv.sh +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env bash -ORIGIN="$PWD" -CMD=() -for dir in "$@" -do - if [[ $dir == http\://* || $dir == https\://* || $dir == cdda\://* ]]; then - EXP=$dir - else - EXP=$(realpath -s "`printf '%b' \"$dir\"`") - if [[ ! -f $EXP ]]; then - EXP=";"$dir - fi - fi - CMD+=("$EXP") -done -cd $HOME/c/camu/build/ -../scripts/run.sh "${CMD[@]}" -cd "$ORIGIN" diff --git a/src/codec/ffmpeg/decoder.c b/src/codec/ffmpeg/decoder.c index cae56d1..80b1d12 100644 --- a/src/codec/ffmpeg/decoder.c +++ b/src/codec/ffmpeg/decoder.c @@ -262,7 +262,7 @@ static bool ff_decoder_init(struct camu_decoder *dec, struct camu_renderer *rend av->codec_context->thread_count = cpus; // FF_THREAD_FRAME or FF_THREAD_SLICE. // SLICE seems to work better based on videos that got completely choked - // in THREAD_FRAME mode (4k60 hevc, FFMpeg 7.1.1, AMD 3900x). + // in THREAD_FRAME mode (4k60 HEVC, FFmpeg 7.1.1, AMD 3900x). av->codec_context->thread_type = FF_THREAD_SLICE; log_info("Using %i threads for decoder.", cpus); } diff --git a/src/codec/ffmpeg/demuxer.c b/src/codec/ffmpeg/demuxer.c index cb2ed91..d45a970 100644 --- a/src/codec/ffmpeg/demuxer.c +++ b/src/codec/ffmpeg/demuxer.c @@ -75,12 +75,14 @@ static bool ff_demuxer_init(struct camu_demuxer *demux, struct cch_handle *handl goto err; } -#define GUESS_STREAM_IS_IMAGE(stream) \ - (stream->duration >= 0 && stream->nb_frames <= 1 && (stream->avg_frame_rate.den == 0 && stream->r_frame_rate.den > 0)) - s64 default_duration = (av->format_context->duration < 0) ? 0 : av->format_context->duration; av->duration = 0; +#define GUESS_STREAM_IS_IMAGE(stream) \ + ((stream->duration >= 0 && stream->nb_frames <= 1 && \ + (stream->avg_frame_rate.den == 0 && stream->r_frame_rate.den > 0)) || \ + (stream->duration < 0 && default_duration == 0)) + for (u32 i = 0; i < av->format_context->nb_streams; i++) { AVStream *stream = av->format_context->streams[i]; enum AVMediaType type = stream->codecpar->codec_type; @@ -88,12 +90,12 @@ static bool ff_demuxer_init(struct camu_demuxer *demux, struct cch_handle *handl if (type == AVMEDIA_TYPE_AUDIO || type == AVMEDIA_TYPE_VIDEO || type == AVMEDIA_TYPE_SUBTITLE) { // Try to detect attached images. if (type == AVMEDIA_TYPE_VIDEO && GUESS_STREAM_IS_IMAGE(stream)) { - log_info("Assuming stream #%u is an image.", i); + log_debug("Assuming stream #%u is an image.", i); } else { if (stream->duration < 0) { stream->duration = av_rescale_q(default_duration, AV_TIME_BASE_Q, stream->time_base); al_assert(stream->duration >= 0); - log_info("Stream #%u has an invalid duration, defaulting to %.3fs.", + log_warn("Stream #%u has an invalid duration, defaulting to %.3fs.", i, stream->duration * av_q2d(stream->time_base)); } duration = (u64)av_rescale_q(stream->duration, stream->time_base, AV_TIME_BASE_Q); diff --git a/src/fruits/cmc/ui/widgets/now_playing.c b/src/fruits/cmc/ui/widgets/now_playing.c index d30590c..845a572 100644 --- a/src/fruits/cmc/ui/widgets/now_playing.c +++ b/src/fruits/cmc/ui/widgets/now_playing.c @@ -1,7 +1,7 @@ #include #include "../../../../liana/list.h" -#include "../../../../sink/util.h" +#include "../../../../util/print_time.h" #include "../../cmc.h" diff --git a/src/fruits/cmv/cmv.c b/src/fruits/cmv/cmv.c index 7fc6baa..2dda139 100644 --- a/src/fruits/cmv/cmv.c +++ b/src/fruits/cmv/cmv.c @@ -4,9 +4,9 @@ #include #include "../../util/color_palette.h" -#include "../../sink/desktop.h" -#include "../../server/common.h" #include "../../codec/ffmpeg/common.h" +#include "../../libsink/desktop.h" +#include "../../server/common.h" #ifndef CAMU_SINK_ONLY #include "../../server/server.h" #endif @@ -167,7 +167,7 @@ s32 window_system_main(u32 argc, str *argv, void *extra) } #endif - if (!camu_desktop_init(&c.desktop, "cmv")) { + if (!camu_desktop_open(&c.desktop, "cmv")) { return EXIT_FAILURE; } #ifndef CAMU_SINK_ONLY @@ -176,7 +176,8 @@ s32 window_system_main(u32 argc, str *argv, void *extra) c.desktop.userdata = &c; } #endif - if (!camu_desktop_connect(&c.desktop, &c.loop, type, &addr, CAMU_PORT)) { + str *name = local ? &al_str_c("local") : &al_str_c("desktop"); + if (!camu_desktop_connect(&c.desktop, name, &c.loop, type, &addr, CAMU_PORT)) { return EXIT_FAILURE; } diff --git a/src/fruits/ctv/ctv.c b/src/fruits/ctv/ctv.c index 804cbed..5becb88 100644 --- a/src/fruits/ctv/ctv.c +++ b/src/fruits/ctv/ctv.c @@ -2,7 +2,7 @@ #include #include "../../libsink/sink.h" -#include "../../sink/desktop.h" +#include "../../libsink/desktop.h" #ifdef CAMU_HAVE_FFMPEG #include "../../codec/ffmpeg/common.h" #endif @@ -26,7 +26,7 @@ static nn_thread_result NNWT_THREADCALL event_loop_thread(void *userdata) prefs->audio_lang = CAMU_LANG_ENGLISH; prefs->subtitle_lang = CAMU_LANG_ENGLISH; - if (!camu_desktop_connect(&c->desktop, &c->loop, CAMU_TEST_TYPE, &CAMU_TEST_ADDR, CAMU_PORT)) { + if (!camu_desktop_connect(&c->desktop, &al_str_c("ctv"), &c->loop, CAMU_TEST_TYPE, &CAMU_TEST_ADDR, CAMU_PORT)) { return 0; } @@ -56,7 +56,7 @@ s32 stl_platform_main(u32 argc, str *argv) camu_ff_common_init(); #endif - if (!camu_desktop_init(&c.desktop, "ctv")) { + if (!camu_desktop_open(&c.desktop, "ctv")) { return 0; } diff --git a/src/libsink/desktop.c b/src/libsink/desktop.c new file mode 100644 index 0000000..2bbe906 --- /dev/null +++ b/src/libsink/desktop.c @@ -0,0 +1,265 @@ +#define AL_LOG_SECTION "desktop" +#include + +//#define DESKTOP_NULL_AUDIO + +#ifdef DESKTOP_NULL_AUDIO +#include "../mixer/audio_null.h" +#else +#include "../mixer/audio_miniaudio.h" +#endif +#if defined CAMU_RENDERER_TIGER +#include "../render/renderer_tiger.h" +#elif defined CAMU_RENDERER_LIBPLACEBO +#include "../render/renderer_libplacebo.h" +#endif +#include "../util/print_time.h" + +#include "desktop.h" +#ifdef CAMU_SCREEN_DEBUG_KEY +#include "input_simulator.h" +#endif + +static u8 sink_callback(void *userdata, u8 op, u8 type, void *opaque) +{ + struct camu_desktop *c = (struct camu_desktop *)userdata; + struct camu_mixer *mixer = &c->mixer; + struct camu_screen *scr = &c->scr; + switch (op) { + case CAMU_SINK_ADD_BUFFER: + switch (type) { + case CAMU_SINK_AUDIO: { + struct camu_audio_buffer *buf = (struct camu_audio_buffer *)opaque; + camu_mixer_add_buffer(mixer, buf); + log_debug("Audio buffer added."); + break; + } + case CAMU_SINK_VIDEO: { + struct camu_video_buffer *buf = (struct camu_video_buffer *)opaque; + camu_screen_add_buffer(scr, buf); + log_debug("Video buffer added."); + break; + } + } + break; + case CAMU_SINK_REMOVE_BUFFER: + switch (type) { + case CAMU_SINK_AUDIO: { + struct camu_audio_buffer *buf = (struct camu_audio_buffer *)opaque; + camu_mixer_remove_buffer(mixer, buf); + log_debug("Audio buffer removed."); + break; + } + case CAMU_SINK_VIDEO: { + struct camu_video_buffer *buf = (struct camu_video_buffer *)opaque; + camu_screen_remove_buffer(scr, buf); + log_debug("Video buffer removed."); + break; + } + } + break; + case CAMU_SINK_START: + switch (type) { + case CAMU_SINK_AUDIO: + camu_mixer_resume(mixer); + log_info("Audio started."); + break; + case CAMU_SINK_VIDEO: + camu_screen_set_state(scr, CAMU_SCREEN_PLAYING); + camu_screen_wake(scr); + log_info("Video started."); + break; + } + break; + case CAMU_SINK_STOP: + switch (type) { + case CAMU_SINK_AUDIO: + camu_mixer_pause(mixer); + log_info("Audio stopped."); + break; + case CAMU_SINK_VIDEO: + camu_screen_set_state(scr, CAMU_SCREEN_PAUSED); + log_info("Video stopped."); + break; + } + break; + case CAMU_SINK_REFRESH_VIDEO: + camu_screen_force_refresh(scr); + break; + case CAMU_SINK_CLEAR: + switch (type) { + case CAMU_SINK_AUDIO: + camu_mixer_clear(mixer); + break; + case CAMU_SINK_VIDEO: + camu_screen_clear(scr); + break; + } + break; + case CAMU_SINK_MOCK_CLOSE: + c->should_quit = 1; + camu_screen_wake(&c->scr); + break; + case CAMU_SINK_EXIT: + camu_sink_close(&c->sink); + if (c->exit_callback) { + c->exit_callback(c->userdata, c); + } + break; + } + return CAMU_SINK_OK; +} + +static char status[64]; +static void log_playback_pos(struct camu_sink *sink) +{ + struct camu_sink_entry *current = camu_sink_get_current(sink); + if (!current) { + camu_sink_return_current(sink); + goto notplaying; + } + + u64 pts = camu_clock_get_last_pts(¤t->clock) * 1000000u; + u64 duration = current->client.duration; + pts = MIN(duration, pts); + bool paused = current->paused; + + camu_sink_return_current(sink); + + u64 remaining = duration - pts; + if (remaining == 0) { + goto notplaying; + } + + bool show_hour = duration > 60u * 60u * 1000000u; + s32 offset = al_snprintf(status, sizeof(status), paused ? "⏸ " : "⏵ "); + offset += al_snprintf(status + offset, sizeof(status) - offset, "["); + offset += camu_print_time(status + offset, sizeof(status) - offset, pts, show_hour, 2); + offset += al_snprintf(status + offset, sizeof(status) - offset, "/"); + offset += camu_print_time(status + offset, sizeof(status) - offset, duration, show_hour, 2); + offset += al_snprintf(status + offset, sizeof(status) - offset, "]"); + status[offset] = '\0'; + + log_info("%s", status); + return; +notplaying: + log_info("Not playing."); +} + +static void screen_callback(void *userdata, u8 op, void *opaque) +{ + struct camu_desktop *c = (struct camu_desktop *)userdata; + switch (op) { + case CAMU_SCREEN_SET_VOLUME: + camu_mixer_set_volume(&c->mixer, *(f32 *)opaque); + break; + case CAMU_SCREEN_OFFSET_VOLUME: + camu_mixer_offset_volume(&c->mixer, *(f32 *)opaque); + break; + case CAMU_SCREEN_SKIP: + camu_sink_skip(&c->sink, *(s32 *)opaque); + break; + case CAMU_SCREEN_TOGGLE_PAUSE: + camu_sink_toggle_pause(&c->sink); + break; + case CAMU_SCREEN_PERCENT_SEEK: + camu_sink_seek(&c->sink, opaque, CAMU_SEEK_PERCENT); + break; + case CAMU_SCREEN_RELATIVE_SEEK: + camu_sink_seek(&c->sink, opaque, CAMU_SEEK_RELATIVE); + break; + case CAMU_SCREEN_RESEEK: + camu_sink_reseek(&c->sink); + break; + case CAMU_SCREEN_SHUFFLE: + camu_sink_shuffle(&c->sink); + break; + case CAMU_SCREEN_STATUS: + log_playback_pos(&c->sink); + break; +#ifdef CAMU_SCREEN_DEBUG_KEY + case CAMU_SCREEN_DEBUG: + if (camu_input_simulator_running()) { + camu_input_simulator_stop(); + } else { + camu_input_simulator_run(&c->sink); + } + break; +#endif + case CAMU_SCREEN_CLOSE: + c->should_quit = 1; + break; + } +} + +bool camu_desktop_open(struct camu_desktop *c, const char *window_name) +{ + c->scr.callback = screen_callback; + c->scr.userdata = c; + if (!camu_screen_init(&c->scr) || !camu_screen_create_window(&c->scr, window_name)) { + return false; + } +#if defined CAMU_RENDERER_TIGER + c->renderer = camu_renderer_tiger_create(); +#elif defined CAMU_RENDERER_LIBPLACEBO + c->renderer = camu_renderer_lp_create(); +#endif + if (!camu_screen_create_renderer(&c->scr, c->renderer)) { + return false; + } + c->renderer->render(c->renderer, &c->scr, true); +#ifdef DESKTOP_NULL_AUDIO + if (!camu_mixer_init(&c->mixer, (struct camu_audio *)&audio_plugin_null)) { +#else + if (!camu_mixer_init(&c->mixer, camu_audio_miniaudio_create())) { +#endif + return false; + } + if (!c->mixer.audio->configure_stream(c->mixer.audio, NULL)) { + return false; + } + camu_mixer_pick_format(&c->mixer, &c->mixer.fmt); + c->should_quit = 0; + c->exit_callback = NULL; + c->userdata = NULL; + return true; +} + +bool camu_desktop_connect(struct camu_desktop *c, str *name, struct nn_event_loop *loop, u8 type, str *addr, u16 port) +{ + c->loop = loop; + camu_sink_init(&c->sink, c->loop, &c->mixer, c->renderer); + al_str_from(&c->sink.default_list, "default"); + c->sink.callback = sink_callback; + c->sink.userdata = c; + return camu_sink_connect(&c->sink, name, type, addr, port); +} + +bool camu_desktop_tick(struct camu_desktop *c) +{ + bool force; + if (!c->should_quit && camu_screen_tick(&c->scr, &force)) { + c->renderer->render(c->renderer, &c->scr, force); + } + return !c->should_quit; +} + +void camu_desktop_stop(struct camu_desktop *c) +{ +#ifdef CAMU_SCREEN_DEBUG_KEY + if (camu_input_simulator_running()) { + camu_input_simulator_stop(); + } +#endif + // We have already stopped ticking the screen at this point. + camu_screen_clear(&c->scr); + camu_sink_stop(&c->sink); +} + +void camu_desktop_free(struct camu_desktop *c) +{ + camu_sink_free(&c->sink); + camu_mixer_close(&c->mixer); + c->renderer->free(&c->renderer); + camu_screen_close(&c->scr); +} diff --git a/src/libsink/desktop.h b/src/libsink/desktop.h new file mode 100644 index 0000000..279fd7b --- /dev/null +++ b/src/libsink/desktop.h @@ -0,0 +1,26 @@ +#pragma once + +#include +#include +#include + +#include "../libsink/sink.h" + +#include "../screen/screen.h" + +struct camu_desktop { + struct nn_event_loop *loop; + s32 should_quit; + struct camu_screen scr; + struct camu_renderer *renderer; + struct camu_mixer mixer; + struct camu_sink sink; + void (*exit_callback)(void *, struct camu_desktop *); + void *userdata; +}; + +bool camu_desktop_open(struct camu_desktop *c, const char *window_name); +bool camu_desktop_connect(struct camu_desktop *c, str *name, struct nn_event_loop *loop, u8 type, str *addr, u16 port); +bool camu_desktop_tick(struct camu_desktop *c); +void camu_desktop_stop(struct camu_desktop *c); +void camu_desktop_free(struct camu_desktop *c); diff --git a/src/libsink/input_simulator.c b/src/libsink/input_simulator.c new file mode 100644 index 0000000..80fde02 --- /dev/null +++ b/src/libsink/input_simulator.c @@ -0,0 +1,68 @@ +#include "../screen/screen.h" +#ifdef CAMU_SCREEN_DEBUG_KEY +#include +#include + +#include "input_simulator.h" + +// This is ignoring all thread-safety. +static s32 quit = 1; +static struct nn_thread thread; + +enum { + SEEK, + SKIP, + BACKSKIP, + TOGGLE_PAUSE, + SHUFFLE, + MARK, // count +}; + +static nn_thread_result NNWT_THREADCALL input_simulation_thread(void *userdata) +{ + struct camu_sink *sink = (struct camu_sink *)userdata; + while (!quit) { + nn_thread_sleep(NNWT_TS_FROM_USEC(30000)); + switch (al_rand() % MARK) { + case SKIP: + camu_sink_skip(sink, (al_rand() % 5)); + break; + case BACKSKIP: + camu_sink_skip(sink, -(al_rand() % 5)); + break; + case SHUFFLE: + camu_sink_shuffle(sink); + break; + case TOGGLE_PAUSE: + camu_sink_toggle_pause(sink); + break; + case SEEK: { + f64 pos = al_rand() / (f64)AL_RAND_MAX; + if (pos < 0.005) pos = 0.0; + if (pos > 0.995) pos = 1.0; + else if (pos > 0.99) pos = .9999; + camu_sink_seek(sink, &pos, CAMU_SEEK_PERCENT); + break; + } + } + } + return 0; +} + +void camu_input_simulator_run(struct camu_sink *sink) +{ + quit = 0; + nn_thread_create(&thread, input_simulation_thread, sink); +} + +bool camu_input_simulator_running(void) +{ + return quit == 0; +} + +void camu_input_simulator_stop(void) +{ + quit = 1; + nn_thread_join(&thread); +} +#endif diff --git a/src/libsink/input_simulator.h b/src/libsink/input_simulator.h new file mode 100644 index 0000000..e05b03e --- /dev/null +++ b/src/libsink/input_simulator.h @@ -0,0 +1,10 @@ +#pragma once + +#include "../screen/screen.h" +#ifdef CAMU_SCREEN_DEBUG_KEY +#include "../libsink/sink.h" + +void camu_input_simulator_run(struct camu_sink *sink); +bool camu_input_simulator_running(void); +void camu_input_simulator_stop(void); +#endif diff --git a/src/libsink/meson.build b/src/libsink/meson.build index a0805af..153e371 100644 --- a/src/libsink/meson.build +++ b/src/libsink/meson.build @@ -9,3 +9,8 @@ else endif libsink = declare_dependency(sources: libsink_src, dependencies: libsink_deps, compile_args: libsink_args) + +desktop_src = ['desktop.c', 'input_simulator.c'] +desktop_deps = [libsink] +desktop_args = ['-DCAMU_MIXER_THREADED', '-DCAMU_SCREEN_THREADED'] +desktop = declare_dependency(sources: desktop_src, dependencies: desktop_deps, compile_args: desktop_args) diff --git a/src/server/server.c b/src/server/server.c index dfeee78..0275147 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -151,7 +151,7 @@ static bool identify_callback(void *userdata, struct nn_rpc_connection *conn, sink->server = server; al_array_push(server->sinks, sink); handle_toggle_sink(server, &al_str_c("default"), sink, true); - log_info("New sink."); + log_info("Sink \"%.*s\" connected.", al_str_x(&name)); break; } } diff --git a/src/sink/desktop.c b/src/sink/desktop.c deleted file mode 100644 index fcb7cf1..0000000 --- a/src/sink/desktop.c +++ /dev/null @@ -1,266 +0,0 @@ -#define AL_LOG_SECTION "desktop" -#include - -//#define DESKTOP_NULL_AUDIO - -#ifdef DESKTOP_NULL_AUDIO -#include "../mixer/audio_null.h" -#else -#include "../mixer/audio_miniaudio.h" -#endif -#if defined CAMU_RENDERER_TIGER -#include "../render/renderer_tiger.h" -#elif defined CAMU_RENDERER_LIBPLACEBO -#include "../render/renderer_libplacebo.h" -#endif - -#include "desktop.h" -#include "util.h" -#ifdef CAMU_SCREEN_DEBUG_KEY -#include "input_simulator.h" -#endif - -static u8 sink_callback(void *userdata, u8 op, u8 type, void *opaque) -{ - struct camu_desktop *c = (struct camu_desktop *)userdata; - struct camu_mixer *mixer = &c->mixer; - struct camu_screen *scr = &c->scr; - switch (op) { - case CAMU_SINK_ADD_BUFFER: - switch (type) { - case CAMU_SINK_AUDIO: { - struct camu_audio_buffer *buf = (struct camu_audio_buffer *)opaque; - camu_mixer_add_buffer(mixer, buf); - log_info("Audio buffer added."); - break; - } - case CAMU_SINK_VIDEO: { - struct camu_video_buffer *buf = (struct camu_video_buffer *)opaque; - camu_screen_add_buffer(scr, buf); - log_info("Video buffer added."); - break; - } - } - break; - case CAMU_SINK_REMOVE_BUFFER: - switch (type) { - case CAMU_SINK_AUDIO: { - struct camu_audio_buffer *buf = (struct camu_audio_buffer *)opaque; - camu_mixer_remove_buffer(mixer, buf); - log_info("Audio buffer removed."); - break; - } - case CAMU_SINK_VIDEO: { - struct camu_video_buffer *buf = (struct camu_video_buffer *)opaque; - camu_screen_remove_buffer(scr, buf); - log_info("Video buffer removed."); - break; - } - } - break; - case CAMU_SINK_START: - switch (type) { - case CAMU_SINK_AUDIO: - camu_mixer_resume(mixer); - log_info("Audio started."); - break; - case CAMU_SINK_VIDEO: - camu_screen_set_state(scr, CAMU_SCREEN_PLAYING); - camu_screen_wake(scr); - log_info("Video started."); - break; - } - break; - case CAMU_SINK_STOP: - switch (type) { - case CAMU_SINK_AUDIO: - camu_mixer_pause(mixer); - log_info("Audio stopped."); - break; - case CAMU_SINK_VIDEO: - camu_screen_set_state(scr, CAMU_SCREEN_PAUSED); - log_info("Video stopped."); - break; - } - break; - case CAMU_SINK_REFRESH_VIDEO: - camu_screen_force_refresh(scr); - break; - case CAMU_SINK_CLEAR: - switch (type) { - case CAMU_SINK_AUDIO: - camu_mixer_clear(mixer); - break; - case CAMU_SINK_VIDEO: - camu_screen_clear(scr); - break; - } - break; - case CAMU_SINK_MOCK_CLOSE: - c->should_quit = 1; - camu_screen_wake(&c->scr); - break; - case CAMU_SINK_EXIT: - camu_sink_close(&c->sink); - if (c->exit_callback) { - c->exit_callback(c->userdata, c); - } - break; - } - return CAMU_SINK_OK; -} - -static char status[64]; - -static void print_status(struct camu_sink *sink) -{ - struct camu_sink_entry *current = camu_sink_get_current(sink); - if (!current) { - camu_sink_return_current(sink); - goto notplaying; - } - - u64 pts = camu_clock_get_last_pts(¤t->clock) * 1000000u; - u64 duration = current->client.duration; - pts = MIN(duration, pts); - bool paused = current->paused; - - camu_sink_return_current(sink); - - u64 remaining = duration - pts; - if (remaining == 0) { - goto notplaying; - } - - bool show_hour = duration > 60u * 60u * 1000000u; - s32 offset = al_snprintf(status, sizeof(status), paused ? "⏸ " : "⏵ "); - offset += al_snprintf(status + offset, sizeof(status) - offset, "["); - offset += camu_print_time(status + offset, sizeof(status) - offset, pts, show_hour, 2); - offset += al_snprintf(status + offset, sizeof(status) - offset, "/"); - offset += camu_print_time(status + offset, sizeof(status) - offset, duration, show_hour, 2); - offset += al_snprintf(status + offset, sizeof(status) - offset, "]"); - status[offset] = '\0'; - - log_info("%s", status); - return; -notplaying: - log_info("Not playing."); -} - -static void screen_callback(void *userdata, u8 op, void *opaque) -{ - struct camu_desktop *c = (struct camu_desktop *)userdata; - switch (op) { - case CAMU_SCREEN_SET_VOLUME: - camu_mixer_set_volume(&c->mixer, *(f32 *)opaque); - break; - case CAMU_SCREEN_OFFSET_VOLUME: - camu_mixer_offset_volume(&c->mixer, *(f32 *)opaque); - break; - case CAMU_SCREEN_SKIP: - camu_sink_skip(&c->sink, *(s32 *)opaque); - break; - case CAMU_SCREEN_TOGGLE_PAUSE: - camu_sink_toggle_pause(&c->sink); - break; - case CAMU_SCREEN_PERCENT_SEEK: - camu_sink_seek(&c->sink, opaque, CAMU_SEEK_PERCENT); - break; - case CAMU_SCREEN_RELATIVE_SEEK: - camu_sink_seek(&c->sink, opaque, CAMU_SEEK_RELATIVE); - break; - case CAMU_SCREEN_RESEEK: - camu_sink_reseek(&c->sink); - break; - case CAMU_SCREEN_SHUFFLE: - camu_sink_shuffle(&c->sink); - break; - case CAMU_SCREEN_STATUS: - print_status(&c->sink); - break; -#ifdef CAMU_SCREEN_DEBUG_KEY - case CAMU_SCREEN_DEBUG: - if (camu_input_simulator_running()) { - camu_input_simulator_stop(); - } else { - camu_input_simulator_run(&c->sink); - } - break; -#endif - case CAMU_SCREEN_CLOSE: - c->should_quit = 1; - break; - } -} - -bool camu_desktop_init(struct camu_desktop *c, const char *name) -{ - c->scr.callback = screen_callback; - c->scr.userdata = c; - if (!camu_screen_init(&c->scr) || !camu_screen_create_window(&c->scr, name)) { - return false; - } -#if defined CAMU_RENDERER_TIGER - c->renderer = camu_renderer_tiger_create(); -#elif defined CAMU_RENDERER_LIBPLACEBO - c->renderer = camu_renderer_lp_create(); -#endif - if (!camu_screen_create_renderer(&c->scr, c->renderer)) { - return false; - } - c->renderer->render(c->renderer, &c->scr, true); -#ifdef DESKTOP_NULL_AUDIO - if (!camu_mixer_init(&c->mixer, (struct camu_audio *)&audio_plugin_null)) { -#else - if (!camu_mixer_init(&c->mixer, camu_audio_miniaudio_create())) { -#endif - return false; - } - if (!c->mixer.audio->configure_stream(c->mixer.audio, NULL)) { - return false; - } - camu_mixer_pick_format(&c->mixer, &c->mixer.fmt); - c->should_quit = 0; - c->exit_callback = NULL; - c->userdata = NULL; - return true; -} - -bool camu_desktop_connect(struct camu_desktop *c, struct nn_event_loop *loop, u8 type, str *addr, u16 port) -{ - c->loop = loop; - camu_sink_init(&c->sink, c->loop, &c->mixer, c->renderer); - al_str_from(&c->sink.default_list, "default"); - c->sink.callback = sink_callback; - c->sink.userdata = c; - return camu_sink_connect(&c->sink, &al_str_c("desktop"), type, addr, port); -} - -bool camu_desktop_tick(struct camu_desktop *c) -{ - bool force; - if (!c->should_quit && camu_screen_tick(&c->scr, &force)) { - c->renderer->render(c->renderer, &c->scr, force); - } - return !c->should_quit; -} - -void camu_desktop_stop(struct camu_desktop *c) -{ -#ifdef CAMU_SCREEN_DEBUG_KEY - if (camu_input_simulator_running()) { - camu_input_simulator_stop(); - } -#endif - // We have already stopped ticking the screen at this point. - camu_screen_clear(&c->scr); - camu_sink_stop(&c->sink); -} - -void camu_desktop_free(struct camu_desktop *c) -{ - camu_sink_free(&c->sink); - camu_mixer_close(&c->mixer); - c->renderer->free(&c->renderer); - camu_screen_close(&c->scr); -} diff --git a/src/sink/desktop.h b/src/sink/desktop.h deleted file mode 100644 index 65fcfe0..0000000 --- a/src/sink/desktop.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include -#include -#include - -#include "../libsink/sink.h" - -#include "../screen/screen.h" - -struct camu_desktop { - struct nn_event_loop *loop; - s32 should_quit; - struct camu_screen scr; - struct camu_renderer *renderer; - struct camu_mixer mixer; - struct camu_sink sink; - void (*exit_callback)(void *, struct camu_desktop *); - void *userdata; -}; - -bool camu_desktop_init(struct camu_desktop *c, const char *name); -bool camu_desktop_connect(struct camu_desktop *c, struct nn_event_loop *loop, u8 type, str *addr, u16 port); -bool camu_desktop_tick(struct camu_desktop *c); -void camu_desktop_stop(struct camu_desktop *c); -void camu_desktop_free(struct camu_desktop *c); diff --git a/src/sink/input_simulator.c b/src/sink/input_simulator.c deleted file mode 100644 index 80fde02..0000000 --- a/src/sink/input_simulator.c +++ /dev/null @@ -1,68 +0,0 @@ -#include "../screen/screen.h" -#ifdef CAMU_SCREEN_DEBUG_KEY -#include -#include - -#include "input_simulator.h" - -// This is ignoring all thread-safety. -static s32 quit = 1; -static struct nn_thread thread; - -enum { - SEEK, - SKIP, - BACKSKIP, - TOGGLE_PAUSE, - SHUFFLE, - MARK, // count -}; - -static nn_thread_result NNWT_THREADCALL input_simulation_thread(void *userdata) -{ - struct camu_sink *sink = (struct camu_sink *)userdata; - while (!quit) { - nn_thread_sleep(NNWT_TS_FROM_USEC(30000)); - switch (al_rand() % MARK) { - case SKIP: - camu_sink_skip(sink, (al_rand() % 5)); - break; - case BACKSKIP: - camu_sink_skip(sink, -(al_rand() % 5)); - break; - case SHUFFLE: - camu_sink_shuffle(sink); - break; - case TOGGLE_PAUSE: - camu_sink_toggle_pause(sink); - break; - case SEEK: { - f64 pos = al_rand() / (f64)AL_RAND_MAX; - if (pos < 0.005) pos = 0.0; - if (pos > 0.995) pos = 1.0; - else if (pos > 0.99) pos = .9999; - camu_sink_seek(sink, &pos, CAMU_SEEK_PERCENT); - break; - } - } - } - return 0; -} - -void camu_input_simulator_run(struct camu_sink *sink) -{ - quit = 0; - nn_thread_create(&thread, input_simulation_thread, sink); -} - -bool camu_input_simulator_running(void) -{ - return quit == 0; -} - -void camu_input_simulator_stop(void) -{ - quit = 1; - nn_thread_join(&thread); -} -#endif diff --git a/src/sink/input_simulator.h b/src/sink/input_simulator.h deleted file mode 100644 index e05b03e..0000000 --- a/src/sink/input_simulator.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "../screen/screen.h" -#ifdef CAMU_SCREEN_DEBUG_KEY -#include "../libsink/sink.h" - -void camu_input_simulator_run(struct camu_sink *sink); -bool camu_input_simulator_running(void); -void camu_input_simulator_stop(void); -#endif diff --git a/src/sink/meson.build b/src/sink/meson.build deleted file mode 100644 index 8d13b26..0000000 --- a/src/sink/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -desktop_src = ['desktop.c', 'input_simulator.c'] -desktop_deps = [libsink] -desktop_args = ['-DCAMU_MIXER_THREADED', '-DCAMU_SCREEN_THREADED'] -desktop = declare_dependency(sources: desktop_src, dependencies: desktop_deps, compile_args: desktop_args) diff --git a/src/sink/util.h b/src/sink/util.h deleted file mode 100644 index d9dd4cc..0000000 --- a/src/sink/util.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include - -static inline s32 camu_print_time(char *buf, size_t size, u64 nanoseconds, bool always_show_hour, u32 hour_padding) -{ - u32 hours = nanoseconds / 3600000000u; - u32 minutes = nanoseconds / 60000000u; - bool show_hour = always_show_hour || minutes >= 60u; - u32 seconds = nanoseconds / 1000000u; - seconds -= minutes * 60u; - minutes -= hours * 60u; - s32 offset = 0; - if (show_hour) { - static const char *padding_table[] = { "%.2u:", "%.3u:", "%.4u:" }; - hour_padding = CLAMP(hour_padding, 2u, 4u) - 2u; - offset += al_snprintf(buf, size, padding_table[hour_padding], hours); - } - offset += al_snprintf(buf + offset, size - offset, "%.2u:%.2u", minutes, seconds); - return offset; -} diff --git a/src/util/print_time.h b/src/util/print_time.h new file mode 100644 index 0000000..d9dd4cc --- /dev/null +++ b/src/util/print_time.h @@ -0,0 +1,21 @@ +#pragma once + +#include + +static inline s32 camu_print_time(char *buf, size_t size, u64 nanoseconds, bool always_show_hour, u32 hour_padding) +{ + u32 hours = nanoseconds / 3600000000u; + u32 minutes = nanoseconds / 60000000u; + bool show_hour = always_show_hour || minutes >= 60u; + u32 seconds = nanoseconds / 1000000u; + seconds -= minutes * 60u; + minutes -= hours * 60u; + s32 offset = 0; + if (show_hour) { + static const char *padding_table[] = { "%.2u:", "%.3u:", "%.4u:" }; + hour_padding = CLAMP(hour_padding, 2u, 4u) - 2u; + offset += al_snprintf(buf, size, padding_table[hour_padding], hours); + } + offset += al_snprintf(buf + offset, size - offset, "%.2u:%.2u", minutes, seconds); + return offset; +} diff --git a/subprojects/BLAKE3.wrap b/subprojects/BLAKE3.wrap index 7f3b7da..8cfea07 100644 --- a/subprojects/BLAKE3.wrap +++ b/subprojects/BLAKE3.wrap @@ -1,7 +1,7 @@ [wrap-git] -directory = BLAKE3-d2e8069 +directory = BLAKE3-1.8.2 url = https://github.com/BLAKE3-team/BLAKE3.git -revision = d2e8069161fef13bf0a5198a75dbaee81d8854d9 +revision = 1.8.2 depth = 1 patch_directory = BLAKE3 method = cmake diff --git a/subprojects/libalabaster.wrap b/subprojects/libalabaster.wrap index b3661b4..fe96079 100644 --- a/subprojects/libalabaster.wrap +++ b/subprojects/libalabaster.wrap @@ -1,4 +1,4 @@ [wrap-git] url = https://git.akon.city/libalabaster -revision = 85fb9ba380540ce24f1c99f21c14653459161a63 +revision = a5516233d66eb1552cf7fdfe03779b2bf896c82d depth = 1 diff --git a/subprojects/libnaunet.wrap b/subprojects/libnaunet.wrap index f41426f..4700180 100644 --- a/subprojects/libnaunet.wrap +++ b/subprojects/libnaunet.wrap @@ -1,4 +1,4 @@ [wrap-git] url = https://git.akon.city/libnaunet -revision = 65d25cd7796a473ce669a1f61da7961b8baf479a +revision = 23ec05f871f53b724dc6eb5e1c62d0245109c69d depth = 1 diff --git a/subprojects/linmath.h.wrap b/subprojects/linmath.h.wrap index e089d78..0d4f2cf 100644 --- a/subprojects/linmath.h.wrap +++ b/subprojects/linmath.h.wrap @@ -1,4 +1,5 @@ [wrap-git] +directory = linmath.h-3eef828 url = https://github.com/datenwolf/linmath.h.git revision = 3eef82841046507e16a0f6194a61cee2eadd34b3 depth = 1 diff --git a/subprojects/miniaudio.wrap b/subprojects/miniaudio.wrap index f643ff8..bf46443 100644 --- a/subprojects/miniaudio.wrap +++ b/subprojects/miniaudio.wrap @@ -1,7 +1,7 @@ [wrap-git] -directory = miniaudio-484a564 +directory = miniaudio-29c17fc url = https://github.com/mackron/miniaudio.git -revision = 484a56499d3e03a5f6fa8702bdc5a8ab0817c7ac +revision = 29c17fcb22933c17f4cd375fdf49ecd8f5a4f924 depth = 1 patch_directory = miniaudio -diff_files = miniaudio/miniaudio_pulse_flush.diff, miniaudio/miniaudio_alsa_compile.diff +diff_files = miniaudio/miniaudio_pulse_flush.diff diff --git a/subprojects/packagefiles/miniaudio/meson.build b/subprojects/packagefiles/miniaudio/meson.build index 5e8ab38..c980787 100644 --- a/subprojects/packagefiles/miniaudio/meson.build +++ b/subprojects/packagefiles/miniaudio/meson.build @@ -1,2 +1,2 @@ -project('miniaudio', 'c', version: 'git-12a8d4e') +project('miniaudio', 'c', version: 'git-29c17fc') miniaudio = declare_dependency(include_directories: include_directories('.')) diff --git a/subprojects/packagefiles/stb/meson.build b/subprojects/packagefiles/stb/meson.build index 783ed0f..608000d 100644 --- a/subprojects/packagefiles/stb/meson.build +++ b/subprojects/packagefiles/stb/meson.build @@ -1,2 +1,2 @@ -project('stb', 'c', version: 'git-2e2bef4') +project('stb', 'c', version: 'git-5c20573') stb = declare_dependency(include_directories: include_directories('.')) diff --git a/subprojects/stb.wrap b/subprojects/stb.wrap index 58ed832..adde311 100644 --- a/subprojects/stb.wrap +++ b/subprojects/stb.wrap @@ -1,4 +1,5 @@ [wrap-git] +directory = stb-5c20573 url = https://github.com/nothings/stb.git revision = 5c205738c191bcb0abc65c4febfa9bd25ff35234 depth = 1 diff --git a/subprojects/stela.wrap b/subprojects/stela.wrap index fbb9cf3..62748d5 100644 --- a/subprojects/stela.wrap +++ b/subprojects/stela.wrap @@ -1,4 +1,4 @@ [wrap-git] url = https://git.akon.city/stela -revision = 10fe1253ffdc3ffc775226291a87159a626e4823 +revision = e2304d573cbfa5fe3076b0f702e384bcf7229695 depth = 1 -- cgit v1.2.3-101-g0448