static size_t out_get_buffer_size(const struct audio_stream *stream) { const struct stream_out* out = (const struct stream_out*)stream; size_t buffer_size = proxy_get_period_size(&out->proxy) * audio_stream_out_frame_size(&(out->stream)); return buffer_size; }
unsigned proxy_get_latency(const alsa_device_proxy * proxy) { return (proxy_get_period_size(proxy) * proxy_get_period_count(proxy) * 1000) / proxy_get_sample_rate(proxy); }
static size_t in_get_buffer_size(const struct audio_stream *stream) { const struct stream_in * in = ((const struct stream_in*)stream); return proxy_get_period_size(&in->proxy) * audio_stream_in_frame_size(&(in->stream)); }