|
perex |
37d715 |
From 8d3fb3102f672a7b09be92811e89d49f89c1742b Mon Sep 17 00:00:00 2001
|
|
perex |
37d715 |
From: Lennart Poettering <mznyfn@0pointer.de>
|
|
perex |
37d715 |
Date: Fri, 18 Jul 2008 21:24:38 +0200
|
|
perex |
37d715 |
Subject: [PATCH] fix return value of snd_pcm_rewind()/snd_pcm_forward() to return how much actually has been rewound, instead of what actually could have rewound
|
|
perex |
37d715 |
|
|
perex |
37d715 |
Make snd_pcm_plugin_rewind()/_forward() actually return how much has
|
|
perex |
37d715 |
been rewound/forwarded instead of how much could have been
|
|
perex |
37d715 |
rewounded/forwarded. This makes the code actually do what the
|
|
perex |
37d715 |
documentation of snd_pcm_rewind() suggests.
|
|
perex |
37d715 |
|
|
perex |
37d715 |
Signed-off-by: Lennart Poettering <lennart@poettering.net>
|
|
perex |
37d715 |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
perex |
37d715 |
---
|
|
perex |
37d715 |
src/pcm/pcm_plugin.c | 4 ++--
|
|
perex |
37d715 |
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
perex |
37d715 |
|
|
perex |
37d715 |
diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
|
|
perex |
37d715 |
index b377cb2..c4f5b4a 100644
|
|
perex |
37d715 |
--- a/src/pcm/pcm_plugin.c
|
|
perex |
37d715 |
+++ b/src/pcm/pcm_plugin.c
|
|
perex |
37d715 |
@@ -222,7 +222,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t
|
|
perex |
37d715 |
frames = plugin->client_frames(pcm, sframes);
|
|
perex |
37d715 |
snd_pcm_mmap_appl_backward(pcm, (snd_pcm_uframes_t) frames);
|
|
perex |
37d715 |
snd_atomic_write_end(&plugin->watom);
|
|
perex |
37d715 |
- return n;
|
|
perex |
37d715 |
+ return (snd_pcm_sframes_t) frames;
|
|
perex |
37d715 |
}
|
|
perex |
37d715 |
|
|
perex |
37d715 |
static snd_pcm_sframes_t snd_pcm_plugin_forwardable(snd_pcm_t *pcm)
|
|
perex |
37d715 |
@@ -255,7 +255,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_
|
|
perex |
37d715 |
frames = plugin->client_frames(pcm, sframes);
|
|
perex |
37d715 |
snd_pcm_mmap_appl_forward(pcm, (snd_pcm_uframes_t) frames);
|
|
perex |
37d715 |
snd_atomic_write_end(&plugin->watom);
|
|
perex |
37d715 |
- return n;
|
|
perex |
37d715 |
+ return (snd_pcm_sframes_t) frames;
|
|
perex |
37d715 |
}
|
|
perex |
37d715 |
|
|
perex |
37d715 |
static snd_pcm_sframes_t snd_pcm_plugin_write_areas(snd_pcm_t *pcm,
|
|
perex |
37d715 |
--
|
|
perex |
37d715 |
1.5.5.1
|
|
perex |
37d715 |
|