+ ret = snd_pcm_status(pcm_handle, status);
+ RETURN_ON_ERROR("snd_pcm_status()", ret);
+
+ snd_pcm_sframes_t avail = snd_pcm_status_get_avail(status);
+ snd_htimestamp_t alsa_ts;
+ snd_pcm_status_get_htstamp(status, &alsa_ts);
+
+ snd_pcm_sframes_t frames = snd_pcm_readi(pcm_handle, buffer.get(), avail);