Browse Source

shift all possible 24-in-32 values right, not just scaled ones

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@3058 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.115.6
paul 17 years ago
parent
commit
12dc1a6c66
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      drivers/alsa/memops.c

+ 4
- 4
drivers/alsa/memops.c View File

@@ -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; \
}


Loading…
Cancel
Save