We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f321d2b commit d8df2b3Copy full SHA for d8df2b3
2 files changed
dpf
plugins/common/gen_dsp/genlib_ops.h
@@ -682,9 +682,11 @@ struct Noise {
682
683
inline t_sample operator()() {
684
last = 1664525L * last + 1013904223L;
685
- unsigned long itemp = 0x3f800000 | (0x007fffff & last);
686
- unsigned long* itempptr = &itemp;
687
- return ((*(float *)itempptr) * 2.f) - 3.f;
+ union {
+ unsigned long ul;
+ float f;
688
+ } itemp = { 0x3f800000 | (0x007fffff & last) };
689
+ return itemp.f * 2.f - 3.f;
690
}
691
};
692
0 commit comments