Please excuse the simplicity of this post - new here to C++ and relatively new to audio programming in general.
I’ve been working through the API and demo code. I’ve had some of the basics working, the demo, and also a program to simply load and play a .wav file using AudioSource. This uses an AudioSourcePlayer to to pass into the device manager.
Now I’m trying to do some processing on a simple sine wave, and ultimately have a few controls to play with the sound, maybe frequency, amplitude etc. This is what I’m having trouble with. I think I should be using AudioProcessor here, rather than AudioSource. So I’ve tried to link up a simple source (the demo plugin source) to an AudioProcessorPlayer. I can compile, but when I debug, and stick breakpoints in the processors prepareToPlay, or processBlock methods, I’m not getting there. I hoped I would be, but guessing I’m omitting something pretty fundamental. I can accept this might not link up and play the sine synth in response to the midi keyboard in the default demo editor, but I hoped I’d get into those methods.
private: AudioProcessorPlayer processorPlayer; AudioDeviceManager deviceManager; JuceDemoPluginAudioProcessor processor;
deviceManager.initialise(1, 2, 0, false); addAndMakeVisible(processor.createEditor()); processorPlayer.setProcessor(&processor); deviceManager.addAudioCallback(&processorPlayer);
Hope this makes sense, any help gratefully received,