Lines Matching refs:frames

68 static void timestamp_adjust(struct timespec* ts, ssize_t frames, uint32_t sampling_rate) {  in timestamp_adjust()  argument
72 long adj_nsec = (frames / (float) sampling_rate) * 1E9L; in timestamp_adjust()
95 ssize_t frames; in get_pcm_timestamp() local
97 frames = pcm_get_buffer_size(pcm) - info->available; in get_pcm_timestamp()
99 frames = -info->available; /* rewind timestamp */ in get_pcm_timestamp()
101 timestamp_adjust(&info->timestamp, frames, sample_rate); in get_pcm_timestamp()
385 uint64_t *frames, struct timespec *timestamp) in out_get_presentation_position() argument
387 if (stream == NULL || frames == NULL || timestamp == NULL) { in out_get_presentation_position()
392 *frames = out->frames_written; in out_get_presentation_position()
394 ALOGV("%s: frames: %" PRIu64 ", timestamp (nsec): %" PRIu64, __func__, *frames, in out_get_presentation_position()
484 static size_t get_input_buffer_size(size_t frames, audio_format_t format, in get_input_buffer_size() argument
488 frames = ((frames + 15) / 16) * 16; in get_input_buffer_size()
491 size_t buffer_size = frames * bytes_per_frame; in get_input_buffer_size()
517 size_t frames = CAPTURE_PERIOD_SIZE; in in_get_buffer_size() local
519 frames = CAPTURE_PERIOD_SIZE * PLAYBACK_CODEC_SAMPLING_RATE / CAPTURE_CODEC_SAMPLING_RATE; in in_get_buffer_size()
523 get_input_buffer_size(frames, stream->get_format(stream), stream->get_channels(stream)); in in_get_buffer_size()
750 static int in_get_capture_position(const struct audio_stream_in* stream, int64_t* frames, in in_get_capture_position() argument
752 if (stream == NULL || frames == NULL || time == NULL) { in in_get_capture_position()
757 *frames = in->frames_read; in in_get_capture_position()