Lines Matching refs:frames

126         int frames = 0;  in audio_vbuffer_write()  local
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()
137 frames*audio_vbuffer->frame_size); in audio_vbuffer_write()
138 audio_vbuffer->live += frames; in audio_vbuffer_write()
139 frames_written += frames; 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()
153 int frames = 0; in audio_vbuffer_read() local
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()
164 frames*audio_vbuffer->frame_size); in audio_vbuffer_read()
165 audio_vbuffer->live -= frames; in audio_vbuffer_read()
166 frames_read += frames; 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()
481 int frames = audio_vbuffer_read(&out->buffer, buffer, buffer_frames); in out_write_worker() local
483 int ret = pcm_write(pcm, buffer, pcm_frames_to_bytes(pcm, frames)); in out_write_worker()
540 const size_t frames = bytes / audio_stream_out_frame_size(stream); in out_write() local
561 size_t frames_written = audio_vbuffer_write(&out->buffer, buffer, frames); in out_write()
565 out->frames_written += frames; in out_write()
566 out->frames_rendered += frames; in out_write()
567 out->frames_total_buffered += frames; in out_write()
574 int frames_sleep = out->frames_total_buffered < out->buffer.frame_count ? 0 : frames; in out_write()
595 if (frames_written < frames) { in out_write()
596 …ALOGW("Hardware backing HAL too slow, could only write %zu of %zu frames", frames_written, frames); in out_write()
604 uint64_t *frames, struct timespec *timestamp) in out_get_presentation_position() argument
607 if (stream == NULL || frames == NULL || timestamp == NULL) { in out_get_presentation_position()
613 get_current_output_position(out, frames, timestamp); in out_get_presentation_position()
1062 const size_t frames = bytes / audio_stream_in_frame_size(stream); in in_read() local
1087 … const size_t frames_wait = ((uint64_t)frames_available > frames) ? 0 : frames - frames_available; in in_read()
1104 in->standby_frames_read += frames; in in_read()
1118 read_frames = audio_vbuffer_read(&in->buffer, in->stereo_to_mono_buf, frames); in in_read()
1126 for (i = 0; i < frames; i++) { in in_read()
1132 read_frames = audio_vbuffer_read(&in->buffer, buffer, frames); in in_read()
1157 int64_t *frames, int64_t *time) in in_get_capture_position() argument
1162 get_current_input_position(in, frames, &current_time); in in_get_capture_position()