audio-play! returns the file id.
The file id is now a randomized number
This commit is contained in:
@@ -76,10 +76,12 @@ is invalidated and @racket[audio-play?] returns @racket[#f].}
|
||||
|
||||
@defproc[(audio-play! [player audio-play?]
|
||||
[audio-file path-string?])
|
||||
symbol?]{
|
||||
number?]{
|
||||
Starts playback of @racket[audio-file]. The file is opened by the worker side,
|
||||
a decoder is selected, and audio feeding begins asynchronously. In normal use
|
||||
the return value is @racket['ok].
|
||||
the return value is @racket[music-id], where @tt{music-id} is the
|
||||
given @tt{id}, a @tt{number? >= 1} to the file to play, which will be used when reporting in
|
||||
callbacks about e.g. state.
|
||||
|
||||
Calling @racket[audio-play!] while another file is still active replaces the
|
||||
current stream. The worker side interrupts the old decoder, clears the output
|
||||
|
||||
Reference in New Issue
Block a user