OSDN Git Service

Fixed wrong copy problem in capture
authorJaroslav Kysela <perex@perex.cz>
Tue, 23 Mar 2004 14:37:34 +0000 (14:37 +0000)
committerJaroslav Kysela <perex@perex.cz>
Tue, 23 Mar 2004 14:37:34 +0000 (14:37 +0000)
src/pcm/pcm_rate.c

index 897eafa..2c0e4c5 100644 (file)
@@ -1079,6 +1079,8 @@ static int snd_pcm_rate_grab_next_period(snd_pcm_t *pcm, snd_pcm_uframes_t hw_of
              __partial:
                xfer = 0;
                cont = rate->slave->buffer_size - slave_offset;
+               if (cont > rate->slave->period_size)
+                       cont = rate->slave->period_size;
                snd_pcm_areas_copy(rate->sareas, 0,
                                   slave_areas, slave_offset,
                                   pcm->channels, cont,