SamiPerttu / fundsp

Library for audio processing and synthesis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide `hacker` in 32-bit "mode"

Emilgardis opened this issue · comments

Would it be possible to expose another hacker module but for 32-bit mode? Potentially a hacker32 module behind a feature flag.

I tried doing this myself, but I'm not very successful as some items make assumptions about the sample size/type and wrongly(?) sets some type bounds, making it hard to progress without good knowledge of how everything fits together.

One example of this is Limiter, where the sample needs to be f64

fundsp/src/dynamics.rs

Lines 161 to 166 in 1dea143

impl<T, N, S> AudioNode for Limiter<T, N, S>
where
T: Float,
N: Size<T>,
S: ScalarOrPair<Sample = f64>,
{

Can make a pr if this is something that is wanted, I think this works!

Emilgardis@1a831b4

The limiter thingy looks like a bug, I'll look into it. I agree with your request in that it would make sense to have 64-bit and 32-bit preludes and discard the generic prelude. If you want to make a PR, that would be fine. Otherwise I'll look into it.