projects
/
profile
/
ivi
/
pulseaudio-panda.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b218404
)
adhere to struct gcc aliasing rules
author
Lennart Poettering
<lennart@poettering.net>
Mon, 11 Aug 2008 13:17:30 +0000
(15:17 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 11 Aug 2008 13:17:30 +0000
(15:17 +0200)
src/pulsecore/sample-util.c
patch
|
blob
|
history
diff --git
a/src/pulsecore/sample-util.c
b/src/pulsecore/sample-util.c
index
b42b79d
..
5a93367
100644
(file)
--- a/
src/pulsecore/sample-util.c
+++ b/
src/pulsecore/sample-util.c
@@
-559,19
+559,15
@@
size_t pa_mix(
if (PA_UNLIKELY(cv <= 0) || PA_UNLIKELY(!!mute) || PA_UNLIKELY(linear[channel] <= 0))
v = 0;
- else {
- uint32_t z = *(uint32_t*) m->ptr;
- z = PA_UINT32_SWAP(z);
- v = *((float*) &z);
- v *= cv;
- }
+ else
+ v = PA_FLOAT32_SWAP(*(float*) m->ptr) *cv;
sum += v;
m->ptr = (uint8_t*) m->ptr + sizeof(float);
}
sum *= linear[channel];
- *((
uint32_t*) data) = PA_UINT32_SWAP(*(uint32_t*) &
sum);
+ *((
float*) data) = PA_FLOAT32_SWAP(
sum);
data = (uint8_t*) data + sizeof(float);