# HG changeset patch # User coaljoe # Date 1737074853 -10800 # Fri Jan 17 03:47:33 2025 +0300 # Node ID 388946afcc39b3cfccd0d4293abebc51dfb8c85e # Parent d58e675c38d25398a5ad5b87b9a94b184405ed3e sync diff --git a/player_lib/api.txt b/player_lib/api.txt --- a/player_lib/api.txt +++ b/player_lib/api.txt @@ -25,15 +25,21 @@ - (?) Render frame. RenderFrameFloat(ctx *Context) -> ([][2]float64, int) - (?) Render frame as float64. +? RenderFrameInt16(ctx *Context) -> ([][2]int64, int) +? - (?) Render frame as int16. +? (optional ?) RenderBuffer(ctx *Context, size int, loop bool, outNumSamplesWritten *int) -> ([]byte, int) - - Render buffer as data. + - Render buffer as bytes of audio data. parameters: `size` - render buffer size in bytes. `loop` play in loop. `outNumSamplesWritten` - ? - output is audio data buffer. (s16, s16_le ?) + output is audio data buffer (bytes). (bytes/s16 ?) RenderBufferFloat(ctx *Context, sizeSamples int, loop bool, outNumSamplesWritten *int) -> ([][2]float64, int) - Render buffer as float64. `sizeSamples` - render buffer size in samples. `outNumSamplesWritten` - ? number of samples written to buffer (?). (out parameter). output is audio data buffer (as float64). +? RenderBufferInt16(ctx *Context, sizeSamples int, loop bool, outNumSamplesWritten *int) -> ([][2]int16, int) +? - Render buffer as int16/s16 int values. +? output is audio data buffer (as int16). EndPlayer(ctx *Context) - ?