From ab5459c3868a145f7b7958e71fd3a8bbd6eed4b3 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 28 Oct 2008 15:19:49 +0000 Subject: [PATCH] shift all possible 24-in-32 values right, not just scaled ones git-svn-id: http://subversion.jackaudio.org/jack/trunk/jack@3058 0c269be4-1314-0410-8aa9-9f06e86f4224 --- drivers/alsa/memops.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/alsa/memops.c b/drivers/alsa/memops.c index 2698d72..18c1178 100644 --- a/drivers/alsa/memops.c +++ b/drivers/alsa/memops.c @@ -118,9 +118,9 @@ #define float_24u32(s, d) \ if ((s) <= NORMALIZED_FLOAT_MIN) {\ - (d) = SAMPLE_24BIT_MIN;\ + (d) = SAMPLE_24BIT_MIN << 8;\ } else if ((s) >= NORMALIZED_FLOAT_MAX) {\ - (d) = SAMPLE_24BIT_MAX;\ + (d) = SAMPLE_24BIT_MAX << 8;\ } else {\ (d) = f_round ((s) * SAMPLE_24BIT_SCALING) << 8;\ } @@ -130,9 +130,9 @@ #define float_24u32_scaled(s, d)\ if ((s) <= SAMPLE_24BIT_MIN_F) {\ - (d) = SAMPLE_24BIT_MIN;\ + (d) = SAMPLE_24BIT_MIN << 8;\ } else if ((s) >= SAMPLE_24BIT_MAX_F) { \ - (d) = SAMPLE_24BIT_MAX; \ + (d) = SAMPLE_24BIT_MAX << 8; \ } else {\ (d) = f_round ((s)) << 8; \ } -- 2.11.4.GIT