lol wine
[gentoo-diskmaster-overlay.git] / media-libs / alsa-lib / files / alsa-lib-1.0.17-snd-pcm-rewind.patch
blobb315c63d17693b14eb90d9aa47a4c0e76483e9f6
1 From: Lennart Poettering <mznyfn@0pointer.de>
2 Date: Fri, 18 Jul 2008 19:24:38 +0000 (+0200)
3 Subject: fix return value of snd_pcm_rewind()/snd_pcm_forward() to return how much actually ...
4 X-Git-Url: http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff_plain;h=8d3fb3102f672a7b09be92811e89d49f89c1742b;hp=15769ead725b7c215dedd4ea5196955086d2044a
6 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
8 Make snd_pcm_plugin_rewind()/_forward() actually return how much has
9 been rewound/forwarded instead of how much could have been
10 rewounded/forwarded. This makes the code actually do what the
11 documentation of snd_pcm_rewind() suggests.
13 Signed-off-by: Lennart Poettering <lennart@poettering.net>
14 Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 ---
17 diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
18 index b377cb2..c4f5b4a 100644
19 --- a/src/pcm/pcm_plugin.c
20 +++ b/src/pcm/pcm_plugin.c
21 @@ -222,7 +222,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t
22 frames = plugin->client_frames(pcm, sframes);
23 snd_pcm_mmap_appl_backward(pcm, (snd_pcm_uframes_t) frames);
24 snd_atomic_write_end(&plugin->watom);
25 - return n;
26 + return (snd_pcm_sframes_t) frames;
29 static snd_pcm_sframes_t snd_pcm_plugin_forwardable(snd_pcm_t *pcm)
30 @@ -255,7 +255,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_
31 frames = plugin->client_frames(pcm, sframes);
32 snd_pcm_mmap_appl_forward(pcm, (snd_pcm_uframes_t) frames);
33 snd_atomic_write_end(&plugin->watom);
34 - return n;
35 + return (snd_pcm_sframes_t) frames;
38 static snd_pcm_sframes_t snd_pcm_plugin_write_areas(snd_pcm_t *pcm,