AudioProcessor and AudioSource arguments

finally tracked down a bug i had with an audio source not getting initialised properly…

the creation arguments for AudioProcessor::prepareToPlay and AudioSource::prepareToPlay are switched.

i guess it’s too late to change this now, but a warning might be nice?

OR, is there actually some reason why they are switched???

AudioProcessor::prepareToPlay (double sampleRate, int samplesPerBlock)

AudioSource::prepareToPlay (int samplesPerBlockExpected, double sampleRate)

that was pretty annoying!

I hadn’t actually noticed, but that is an interesting discrepancy. Thanks for the heads up!

On a different note, didn’t the compiler warnings about int vs double help you out?

i guess my warnings aren’t set high enough, and anyway, i often pass ints as floats, etc

+1 that did screw me not only once, specially when refactoring between AudioSource and AudioProcessor. But I also reckoned that it can’t be fixed without breaking peoples code.

The default warnings of Xcode 7 didn’t show, but now in Xcode 8 the default warning level is way better.