From: Jörn Nettingsmeier Date: Fri, 15 Feb 2019 16:51:17 +0000 (+0000) Subject: NOP: comment flush implementation X-Git-Tag: 3.3RC0~52^2~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6104c580f8ba3db54b025fa27887e7076413765d;p=thirdparty%2Fshairport-sync.git NOP: comment flush implementation --- diff --git a/audio_jack.c b/audio_jack.c index 23331e53..919b0d6a 100644 --- a/audio_jack.c +++ b/audio_jack.c @@ -180,8 +180,10 @@ int jack_stream_write_cb(jack_nframes_t nframes, __attribute__((unused)) void *a int frames_required = 0; if (flush_please) { + // we just move the read pointer ahead without doing anything with the data. jack_ringbuffer_read_advance(jackbuf, jack_ringbuffer_read_space(jackbuf)); flush_please = 0; + // since we don't change nframes, the whole buffer will be zeroed later. } else { jack_ringbuffer_get_read_vector(jackbuf, v); // an array of two elements because of possible ringbuffer wrap-around for (i=0; i<2; i++) {