audio-play! returns the file id.
The file id is now a randomized number
This commit is contained in:
@@ -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)].}
|
||||
|
||||
Reference in New Issue
Block a user