I am a beginner, and I am having a hard time using JUCE. In short, I am still waiting for the fruit to ripen. I want to process the input data real time and do pitch tracking. So, for beginners, I started exploring on how to input audio and record it. I dug into the AudioRecordingDemo.cpp from the JUCE Demo, and all I want to write is a simple button that says record to record without any visualization whatsoever. This is the code
Yes Jules, it tells me to " pass in the same number of valid pointers as numChannels " And yet I don't see where I am going wrong. From my perspective, I am clueless as to where exactly I am doing the mistake of passing mismatched no. of pointers.
It's telling you that the number of channels is wrong, so go and look at the code you wrote that generates that number. Hint: your code is passing in uninitialised garbage to the function. I'm actually surprised the compiler didn't give you at least a warning about it.
You set the number of channels to the number of channels of the buffer you are just creating, which is of course not known at that moment. Use numOutputChannels instead. Or since you don't use the buffer at all right now, you might as well delete that line altogether.