]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Added rounding...
authorJaroslav Kysela <perex@perex.cz>
Wed, 24 Nov 1999 18:17:20 +0000 (18:17 +0000)
committerJaroslav Kysela <perex@perex.cz>
Wed, 24 Nov 1999 18:17:20 +0000 (18:17 +0000)
src/pcm/pcm_plugin.c

index a460e5abf9f68e10291df298f1e70b031db50d3b..cea52dfe81d59e6b92a1c0429b23b4ce7a53b182 100644 (file)
@@ -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)
 {