OSDN Git Service
(root)
/
android-x86
/
external-alsa-lib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9433839
)
Added rounding...
author
Jaroslav Kysela
<perex@perex.cz>
Wed, 24 Nov 1999 18:17:20 +0000
(18:17 +0000)
committer
Jaroslav Kysela
<perex@perex.cz>
Wed, 24 Nov 1999 18:17:20 +0000
(18:17 +0000)
src/pcm/pcm_plugin.c
patch
|
blob
|
history
diff --git
a/src/pcm/pcm_plugin.c
b/src/pcm/pcm_plugin.c
index
a460e5a
..
cea52df
100644
(file)
--- a/
src/pcm/pcm_plugin.c
+++ b/
src/pcm/pcm_plugin.c
@@
-296,7
+296,7
@@
static void swap_formats(int channel, int *src, int *dst)
*dst = tmp;
}
-#define CONVERT_RATIO(dest, ratio) dest = (
int)((double)dest * ratio
)
+#define CONVERT_RATIO(dest, ratio) dest = (
(int)(((double)dest * ratio)+0.5)
)
int snd_pcm_plugin_params(snd_pcm_t *pcm, snd_pcm_channel_params_t *params)
{