OSDN Git Service

pcm: fix the pcm_frames_diff -> pcm_frame_diff typo
authorJaroslav Kysela <perex@perex.cz>
Wed, 14 Oct 2020 15:55:18 +0000 (17:55 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 14 Oct 2020 15:55:20 +0000 (17:55 +0200)
BugLink: https://github.com/alsa-project/alsa-lib/issues/85
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm_dmix.c
src/pcm/pcm_dshare.c
src/pcm/pcm_dsnoop.c

index bcac273..5b7472d 100644 (file)
@@ -716,7 +716,7 @@ static snd_pcm_sframes_t snd_pcm_dmix_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t f
         * So they can be remixed.
         */
 
-       size = pcm_frames_diff(dmix->last_appl_ptr, dmix->appl_ptr, pcm->boundary);
+       size = pcm_frame_diff(dmix->last_appl_ptr, dmix->appl_ptr, pcm->boundary);
        if (frames < size)
                size = frames;
        snd_pcm_mmap_appl_backward(pcm, size);
@@ -728,10 +728,10 @@ static snd_pcm_sframes_t snd_pcm_dmix_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t f
        /* Always at this point last_appl_ptr == appl_ptr
         * So (appl_ptr - hw_ptr) indicates the frames which can be remixed
         */
-       size = pcm_frames_diff(dmix->appl_ptr, dmix->hw_ptr, pcm->boundary);
+       size = pcm_frame_diff(dmix->appl_ptr, dmix->hw_ptr, pcm->boundary);
        if (size > frames)
                size = frames;
-       slave_size = pcm_frames_diff(dmix->slave_appl_ptr, dmix->slave_hw_ptr, pcm->boundary);
+       slave_size = pcm_frame_diff(dmix->slave_appl_ptr, dmix->slave_hw_ptr, pcm->boundary);
        if (slave_size < size)
                size = slave_size;
 
index f211c1a..8a67257 100644 (file)
@@ -112,7 +112,7 @@ static void snd_pcm_dshare_sync_area(snd_pcm_t *pcm)
        const snd_pcm_channel_area_t *src_areas, *dst_areas;
        
        /* calculate the size to transfer */
-       size = pcm_frames_diff(dshare->appl_ptr, dshare->last_appl_ptr, pcm->boundary);
+       size = pcm_frame_diff(dshare->appl_ptr, dshare->last_appl_ptr, pcm->boundary);
        if (! size)
                return;
        slave_hw_ptr = dshare->slave_hw_ptr;
@@ -123,7 +123,7 @@ static void snd_pcm_dshare_sync_area(snd_pcm_t *pcm)
        slave_hw_ptr += dshare->slave_buffer_size;
        if (slave_hw_ptr >= dshare->slave_boundary)
                slave_hw_ptr -= dshare->slave_boundary;
-       slave_size = pcm_frames_diff(slave_hw_ptr, dshare->slave_appl_ptr, dshare->slave_boundary);
+       slave_size = pcm_frame_diff(slave_hw_ptr, dshare->slave_appl_ptr, dshare->slave_boundary);
        if (slave_size < size)
                size = slave_size;
        if (! size)
@@ -166,7 +166,7 @@ static int snd_pcm_dshare_sync_ptr0(snd_pcm_t *pcm, snd_pcm_uframes_t slave_hw_p
 
        old_slave_hw_ptr = dshare->slave_hw_ptr;
        dshare->slave_hw_ptr = slave_hw_ptr;
-       diff = pcm_frames_diff(slave_hw_ptr, old_slave_hw_ptr, dshare->slave_boundary);
+       diff = pcm_frame_diff(slave_hw_ptr, old_slave_hw_ptr, dshare->slave_boundary);
        if (diff == 0)          /* fast path */
                return 0;
        if (dshare->state != SND_PCM_STATE_RUNNING &&
index bafb6dd..c6e8cd2 100644 (file)
@@ -152,7 +152,7 @@ static int snd_pcm_dsnoop_sync_ptr(snd_pcm_t *pcm)
        old_slave_hw_ptr = dsnoop->slave_hw_ptr;
        snoop_timestamp(pcm);
        slave_hw_ptr = dsnoop->slave_hw_ptr;
-       diff = pcm_frames_diff(slave_hw_ptr, old_slave_hw_ptr, dsnoop->slave_boundary);
+       diff = pcm_frame_diff(slave_hw_ptr, old_slave_hw_ptr, dsnoop->slave_boundary);
        if (diff == 0)          /* fast path */
                return 0;
        snd_pcm_dsnoop_sync_area(pcm, old_slave_hw_ptr, diff);