reSound question
David Betz
Posts: 14,516
in Propeller 2
I'm converting one of the reSound examples to C and I'm wondering why this code does coginit:
PUB start coginit(cogid, reSoundSampleDemo, @stack) PUB reSoundSampleDemo | input1, input2, input3Why not just this:
PUB start | input1, input2, input3
Comments
Here is my translated code and below that are the errors I got. Some are due to my attempt to replace "sound#SIGNED16" with "sound.SIGNED16". I'm not sure what caused the others.
And here are the errors I got:
@ersmith Do you know why this takes a long time to compiler with fastspin?
Starting like this gives you control of where you want your stack and its size.
Parsing of large initializers was using an O(n^2) algorithm. I've improved that, the current github is still a bit slower than I'd like but much much better than before.
Is it working now, or is something funky with the system clock or mixing rate?
Changing all "waitcnt(cnt + 70_000_000);" to "waitx(70_000_000);" fixed the problem.
The question is why the waitcnt() function behaves differently on Spin2 and C... Eric?!
To answer your question regarding the pitch/frequency; Just change the "44100|Hz" to any sample rate you would like to replay at. (The original samples are sampled at 44100 Hz) This can be independantly set for all inputs.