]> git.alsa-project.org Git - alsa-oss.git/commitdiff
Update appl_ptr when rewind() is called (mmap)
authorJaroslav Kysela <perex@perex.cz>
Thu, 26 Feb 2004 15:31:46 +0000 (15:31 +0000)
committerJaroslav Kysela <perex@perex.cz>
Thu, 26 Feb 2004 15:31:46 +0000 (15:31 +0000)
alsa/pcm.c

index 5d1a324e1d99eb72c9f04cc6be002c7e313defa8..ae0cde7b4be993ec3345a091606976b67f49b6a4 100644 (file)
@@ -705,6 +705,8 @@ static void oss_dsp_mmap_update(oss_dsp_t *dsp, snd_pcm_stream_t stream,
                        /* fallback to not very accurate method */
                        size = str->mmap_advance - delay;
                } else {
+                       str->alsa.appl_ptr -= err;
+                       str->alsa.appl_ptr %= str->alsa.boundary;
                        size = str->mmap_advance;
                }
 //             fprintf(stderr, "delay=%ld rewind=%ld forward=%ld\n",