summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sconv.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-05-01 04:22:08 +0200
committerColin Guthrie <cguthrie@mandriva.org>2009-06-08 22:31:51 +0100
commitd622b229871038b97681c465432e3da14bc85782 (patch)
tree04da3c5dff27f4e258e37c02c4138ac124680e1a /src/pulsecore/sconv.c
parent9c467514c504c294415de99655fb4c3630bf1e57 (diff)
sconv: fix a few minor conversion issues
Diffstat (limited to 'src/pulsecore/sconv.c')
-rw-r--r--src/pulsecore/sconv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulsecore/sconv.c b/src/pulsecore/sconv.c
index 29a9a453..d89f4283 100644
--- a/src/pulsecore/sconv.c
+++ b/src/pulsecore/sconv.c
@@ -75,7 +75,7 @@ static void u8_from_s16ne(unsigned n, const int16_t *a, uint8_t *b) {
pa_assert(b);
for (; n > 0; n--, a++, b++)
- *b = (uint8_t) (*a / 0x100 + 0x80);
+ *b = (uint8_t) ((uint16_t) *a >> 8) + (uint8_t) 0x80U;
}
/* float32 */