Open muellmusik opened 9 years ago
The simplest fix would be checkSameRateAsFirstInput
, right? Seems nonsensical to feed an ar signal into a kr Peak...?
Seems nonsensical to feed an ar signal into a kr Peak...?
Why? There are many similar cases where it does work. The implications seem clear enough to me, just update the peak once per control block. I thought it was only restricted where it really is nonsensical or mathematically impossible.
I see your point -- as long as we're careful about semantics. It would not be valid for Peak.kr(Something.ar) to check only the first sample of each control block. But, I just doublechecked the source code (which I hadn't done before my previous reply) -- it seems that case is handled in Peak_next_aa_k, which does appear to loop over all the input samples (provided that inNumSamples = INBUFLENGTH(0)
is the control block size).
So in that case, indeed, it makes more sense to bring the corresponding SIMD function in line with this behavior (rather than crashing).
This is okay:
This causes a crash in Peak_next_ai_k_nova: