From 7a06b5d2d7ac329dc5cba794b019ba185b9b09e2 Mon Sep 17 00:00:00 2001 From: YP3 Audiobook Date: Fri, 27 Nov 2026 00:51:12 +0000 Subject: Release 1.1 - Hold Up/Down to keep changing the volume - Pulling the SD card powers the player off instead of crashing; with no card at power-on it says so and turns off - Long M4B books load without freezing the controls, with a "Loading book N%" screen - The Center press that powers the player on no longer pauses the book as it resumes (which also made it load twice) - No "Bookmark saved" pause at power-off - USB disk shows up right away while a book loads (flasher's "NO USB DISK") - tests/m4a: host test of the M4B index loader --- tests/m4a/run.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 tests/m4a/run.sh (limited to 'tests/m4a/run.sh') diff --git a/tests/m4a/run.sh b/tests/m4a/run.sh new file mode 100755 index 0000000..0a1a98e --- /dev/null +++ b/tests/m4a/run.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# Host check of libm4a's index parser (lib/rbcodec/codecs/libm4a/demux.c): +# runs qtmovie_read() on an M4B through a model of the playback buffer and +# prints the seek table it builds and what it cost (buffer calls, card +# reads, rebuffers, yields). +# +# tests/m4a/run.sh FILE.m4b [HEAP_BYTES] [ROCKBOX_TREE] [STOP_AFTER] +# STOP_AFTER: load_progress says "stop" from that call on, and the load +# must give up there. +set -eu +HERE=$(cd "$(dirname "$0")" && pwd) +REPO=$(cd "$HERE/../.." && pwd) +FILE=$1 +HEAP=${2:-65536} +TREE=${3:-$REPO/build/rockbox} +STOP=${4:-} +M4A=$TREE/lib/rbcodec/codecs/libm4a +T=$(mktemp -d) +trap 'rm -rf "$T"' EXIT +# m4a.c's stream_* helpers, up to stream_create() (its seek code needs the +# whole codec API) +awk '{print} /^void stream_create/{f=1} f && /^}/{exit}' "$M4A/m4a.c" > "$T/stream.c" +gcc -O2 -g -fsanitize=address,undefined -fno-sanitize-recover=all \ + -Wall -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable \ + -I"$HERE/shim" -I"$M4A" -o "$T/harness" \ + "$HERE/harness.c" "$M4A/demux.c" "$T/stream.c" +"$T/harness" "$FILE" "$HEAP" $STOP -- cgit v1.2.3