audio-play! returns the file id.

The file id is now a randomized number
This commit is contained in:
2026-05-17 20:19:06 +02:00
parent f706d4e8e6
commit 65ca59bef8
7 changed files with 170 additions and 499 deletions
+4 -2
View File
@@ -72,7 +72,8 @@ The important command-level behaviour is:
@item{@racket['init] installs the reply and event channels and moves the
player into the initialized command loop.}
@item{@racket['open] starts a decoder and a read worker. If another worker is
still feeding audio, it is first interrupted and joined.}
still feeding audio, it is first interrupted and joined. Returns
a @tt{music id} for the given file.}
@item{@racket['pause] only changes @racket[player-state]. The worker observes
that state and applies @racket[ao-pause] to the output side.}
@item{@racket['seek] clears the async output queue and seeks the decoder, but
@@ -96,7 +97,8 @@ an RPC-style command is sent on the reply channel installed by
@item{@racket[(list 'init ch-out ch-evt)] installs @racket[ch-out] and
@racket[ch-evt], and replies with @racket['(initialized)].}
@item{@racket[(list 'open file)] opens @racket[file], starts the decoder
worker, and replies with @racket['(ok)].}
worker, and replies with @racket[(list ok music-id)], where
@tt{music-id} is the given music id to the file to play.}
@item{@racket[(list 'pause paused?)] sets @racket[player-state] to
@racket['paused] or @racket['playing] when the player is already active,
and replies with @racket['(ok)].}