Lines Matching refs:frame_count

76     size_t     frame_count;  member
82 static int audio_vbuffer_init (audio_vbuffer_t * audio_vbuffer, size_t frame_count, in audio_vbuffer_init() argument
88 audio_vbuffer->frame_count = frame_count; in audio_vbuffer_init()
89 size_t bytes = frame_count * frame_size; in audio_vbuffer_init()
121 …_t audio_vbuffer_write (audio_vbuffer_t * audio_vbuffer, const void * buffer, size_t frame_count) { in audio_vbuffer_write() argument
125 while (frame_count != 0) { in audio_vbuffer_write()
128 frames = MIN(frame_count, audio_vbuffer->frame_count - audio_vbuffer->head); in audio_vbuffer_write()
130 frames = MIN(frame_count, audio_vbuffer->tail - (audio_vbuffer->head)); in audio_vbuffer_write()
140 frame_count -= frames; in audio_vbuffer_write()
141 audio_vbuffer->head = (audio_vbuffer->head + frames) % audio_vbuffer->frame_count; in audio_vbuffer_write()
148 …ic size_t audio_vbuffer_read (audio_vbuffer_t * audio_vbuffer, void * buffer, size_t frame_count) { in audio_vbuffer_read() argument
152 while (frame_count != 0) { in audio_vbuffer_read()
154 if (audio_vbuffer->live == audio_vbuffer->frame_count || in audio_vbuffer_read()
156 frames = MIN(frame_count, audio_vbuffer->frame_count - audio_vbuffer->tail); in audio_vbuffer_read()
158 frames = MIN(frame_count, audio_vbuffer->head - audio_vbuffer->tail); in audio_vbuffer_read()
167 frame_count -= frames; in audio_vbuffer_read()
168 audio_vbuffer->tail = (audio_vbuffer->tail + frames) % audio_vbuffer->frame_count; in audio_vbuffer_read()
574 int frames_sleep = out->frames_total_buffered < out->buffer.frame_count ? 0 : frames; in out_write()