Lines Matching refs:n_bytes
555 static size_t check_left_to_play(struct userdata *u, size_t n_bytes, bool on_timeout) {
564 if (n_bytes <= u->hwbuf_size)
565 left_to_play = u->hwbuf_size - n_bytes;
627 size_t n_bytes;
642 n_bytes = (size_t) n * u->frame_size;
645 pa_log_debug("avail: %lu", (unsigned long) n_bytes);
648 left_to_play = check_left_to_play(u, n_bytes, on_timeout);
667 if (PA_UNLIKELY(n_bytes <= u->hwbuf_unused)) {
693 } else if (j >= 2 && (n_bytes < (DEFAULT_WRITE_ITERATION_THRESHOLD * (u->hwbuf_size - u->hwbuf_unused)))) {
700 n_bytes -= u->hwbuf_unused;
716 frames = (snd_pcm_uframes_t) (n_bytes / u->frame_size);
780 pa_log_debug("Wrote %lu bytes (of possible %lu bytes)", (unsigned long) written, (unsigned long) n_bytes);
783 if (written >= n_bytes)
786 n_bytes -= written;
824 size_t n_bytes;
836 n_bytes = (size_t) n * u->frame_size;
839 pa_log_debug("avail: %lu", (unsigned long) n_bytes);
842 left_to_play = check_left_to_play(u, n_bytes, on_timeout);
857 if (PA_UNLIKELY(n_bytes <= u->hwbuf_unused)) {
880 } else if (j >= 2 && (n_bytes < (DEFAULT_WRITE_ITERATION_THRESHOLD * (u->hwbuf_size - u->hwbuf_unused)))) {
887 n_bytes -= u->hwbuf_unused;
898 pa_sink_render(u->sink, n_bytes, &u->memchunk);
904 if (frames > (snd_pcm_sframes_t) (n_bytes/u->frame_size))
905 frames = (snd_pcm_sframes_t) (n_bytes/u->frame_size);
947 if (written >= n_bytes)
950 n_bytes -= written;