Documentation oke.

This commit is contained in:
2026-06-08 13:45:54 +02:00
parent b979be540e
commit 17846e068c
11 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ available to @racket[audio-open].
This procedure is the extension point for custom audio decoders.
}
@section{Audio handles}
@section[#:tag "audio-decoder-audio-handles"]{Audio handles}
@defproc[(audio-handle? [v any/c]) boolean?]{
+1 -1
View File
@@ -308,7 +308,7 @@ The RPC command path is protected by a mutex in the wrapper. This allows
different application threads to call playback procedures on the same handle
without interleaving the command and reply parts of a single RPC.
@section{Example}
@section[#:tag "audio-player-example"]{Example}
The following example creates a player, prints state changes, plays a file, and
then shuts the player down explicitly.
+1 -1
View File
@@ -15,7 +15,7 @@ file contents (signature sniffing) and, optionally, file extensions.
The sniffer prefers binary inspection over extensions and only falls back
to extensions when detection is inconclusive.
@section{Overview}
@section[#:tag "audio-sniffer-overview"]{Overview}
The detection strategy is as follows:
+1 -1
View File
@@ -121,7 +121,7 @@ Seeking is asynchronous with respect to @racket[ffmpeg-seek]: the
function only records the requested target sample. The read loop applies
the pending seek request before decoding the next block.
@section{Notes}
@section[#:tag "ffmpeg-decoder-notes"]{Notes}
The FFmpeg shim output is expected to be signed 32-bit interleaved PCM.
This keeps the decoder interface suitable for a playback pipeline that
+2 -2
View File
@@ -73,7 +73,7 @@ use. If a future FFmpeg major release changes a layout before one of the
fields read by this module, the supported range should be extended only after
the affected partial definitions have been checked.
@section{Implementation strategy}
@section[#:tag "ffmpeg-definitions-implementation-strategy"]{Implementation strategy}
This module talks directly to the FFmpeg shared libraries through Racket's FFI.
There is no C shim that hides FFmpeg's structs or normalizes their layout. The
@@ -329,7 +329,7 @@ audio, one sample frame contains one sample for the left channel and one sample
for the right channel.
}
@section{Seeking}
@section[#:tag "ffmpeg-definitions-seeking"]{Seeking}
@defproc[(fmpg-seek-ms! [instance any/c]
[target-pos-ms exact-nonnegative-integer?])
+1 -1
View File
@@ -105,7 +105,7 @@ When the stream ends, the callback is called as:
The command returns @racket[#t].
@section{Seeking}
@section[#:tag "ffmpeg-ffi-seeking"]{Seeking}
The @racket['seek] command takes an absolute PCM sample position:
+1 -1
View File
@@ -145,7 +145,7 @@ processing.
The block size of the most recently processed frame.
}
@section{Notes}
@section[#:tag "flac-decoder-notes"]{Notes}
The frame-header hash passed to the audio callback is produced
by @racket[flac-ffi-frame-header]. In this module it is extended
+3 -3
View File
@@ -22,7 +22,7 @@ buffers together with playback position information, and lets a Racket worker
thread feed libao. Higher-level player code should normally use the public
player interface instead of calling this module directly.
@section{Overview}
@section[#:tag "libao-async-overview"]{Overview}
The backend accepts decoded PCM buffers, converts them when needed, groups small
buffers into larger playback chunks, and sends those chunks to libao from a
@@ -195,7 +195,7 @@ larger queue elements. The target chunk size is controlled by
different @racket[music-id] values are not merged into the same output chunk.
}
@section{Playback state}
@section[#:tag "libao-async-playback-state"]{Playback state}
@defproc[(ao_is_at_second_async [handle any/c]) real?]{
Returns the playback position, in seconds, associated with the queue element
@@ -282,7 +282,7 @@ latency but increase scheduling pressure on the Racket worker thread and on the
audio backend.
}
@section{Implementation strategy}
@section[#:tag "libao-async-implementation-strategy"]{Implementation strategy}
The module keeps libao as the only native audio backend, but moves the async
queue and playback thread from C to Racket. It initializes libao lazily when
+3 -3
View File
@@ -23,7 +23,7 @@ stores the requested playback configuration together with a native
asynchronous player handle. It also records the real bit depth accepted
by the selected libao output device.
@section{Audio handles}
@section[#:tag "libao-audio-handles"]{Audio handles}
@defproc[(ao-handle? [v any/c]) boolean?]{
@@ -216,7 +216,7 @@ A true value pauses playback. @racket[#f] resumes playback.
Clears buffered asynchronous playback data for @racket[handle].
}
@section{Playback state}
@section[#:tag "libao-playback-state"]{Playback state}
@defproc[(ao-at-second [handle ao-handle?]) number?]{
@@ -259,7 +259,7 @@ Returns the current playback volume as reported by the native
asynchronous player.
}
@section{Notes}
@section[#:tag "libao-notes"]{Notes}
This module is a higher-level wrapper around the asynchronous FFI layer.
It stores the playback configuration in the handle, and reuses that
+2 -2
View File
@@ -104,7 +104,7 @@ After termination, the underlying decoder is closed and released.
The return value is otherwise unspecified.
}
@section{Seeking}
@section[#:tag "mp3-decoder-seeking"]{Seeking}
@defproc[(mp3-seek [handle struct?]
[percentage number?])
@@ -137,7 +137,7 @@ The procedure sets an internal stop flag and waits until the read loop
has terminated, sleeping briefly between checks.
}
@section{Notes}
@section[#:tag "mp3-decoder-notes"]{Notes}
The stream-info hash is shared between initialization and decoding and
is updated in place during playback.
+1 -1
View File
@@ -305,7 +305,7 @@ start of the Ogg Opus stream.
Applications that need explicit metadata editing should use the read-write API
directly, as in the examples above.
@section{Example}
@section[#:tag "taglib-example"]{Example}
@racketblock[
(define tags (id3-tags "track.flac"))