On 2020-11-24, Érico Nogueira <ericonr_at_disroot.org> wrote: > Michael Forney has > suggested using their pull API instead of the current push (it uses > callbacks called by the audio library for feeding audio when requested > instead of feeding audio into it ever so often) For some context, I don't know if it's a good or bad idea. I just noted that the pull API had some different requirements for the ao drivers than the push API, so was worth looking into. After some discussion with Érico, we decided that two possibilities for implementing the push API[0] are: 1. As Érico did in his branch, buffer the initial writes somewhere and then on start(), call sio_start and sio_write the locally buffered data. 2. Call sio_start on the first write(), and ignore start(). Since sndio won't start playing until you write enough frames, and mpv won't write more than mp_pcm_state.free_samples frames (which the ao driver can control) before start(), we know that playback won't be started prematurely. We weren't sure which is the better way to implement this interface, or if there is another way we hadn't considered. [0] https://github.com/mpv-player/mpv/blob/v0.33.0/audio/out/internal.h#L95-L199Received on Wed Nov 25 2020 - 03:56:07 CET
This archive was generated by hypermail 2.3.0 : Tue Aug 09 2022 - 16:23:50 CEST