pcm: snd_pcm_readi - plugin type multi, the overun appears when read

After type route use type multi, merge the two input streams.There was
PCM error due to insufficient readable data.Cause the underlying read
pointer cannot be updated, and then it will be overrun.
This commit is contained in:
Owen Chen 2020-11-26 21:08:32 +08:00
parent e5c350d7bc
commit c43c7ff5ed

View file

@ -498,6 +498,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_avail_update(snd_pcm_t *pcm)
* there is more data available. * there is more data available.
*/ */
slave_size = snd_pcm_avail_update(slave); slave_size = snd_pcm_avail_update(slave);
slave_frames = slave_size;
result = snd_pcm_mmap_begin(slave, &slave_areas, &slave_offset, &slave_frames); result = snd_pcm_mmap_begin(slave, &slave_areas, &slave_offset, &slave_frames);
if (result < 0) { if (result < 0) {
err = result; err = result;