Closed nwolek closed 8 years ago
We could. It defaults to 96K. Where is it being set to 0?
No where currently. It's just my instincts to be on the lookout for potential divide by zeros. The new algorithm for phasor uses something like this:
mStep = frequency / sampleRate;
That's a problem if the sampleRate could ever be zero. Right now there is nothing to stop it.
I think it's a good idea to add both a Range and Limit to that parameter.
Thanks for confirming that we aren't doing something ridiculous somewhere else :-)
I'll tackle this at some point in the near future.
great!
This could save us from having to needlessly and repeatedly check it when using it in division. I might also be nice for the AudioObject to store a variable for 1 over the SampleRate.
https://github.com/jamoma/jamoma2/blob/master/includes/core/JamomaAudioObject.h#L105
If we agree, then what should the lower limit be? My instinct is 1, but I could be convinced otherwise.