No Audio Being Generated but Compiles Fine...Confusing


Hi everyone,

so I’m relatively new to Juce and trying to create a basic plugin that creates white noise from processBlock() but unfortunately can’t seem to hear anything when i run it in the plugin host. The code compiles fine and to me it looks like there shouldn’t be a problem but would appreciate some extra eyes to help me out.

Here is my code in the processBlock() method:

void KrotosResonatorAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
    for(int chan=0; chan<buffer.getNumChannels(); chan++)
        float * const float_buffer = buffer.getWritePointer(chan, 1);
        for(int i;i<buffer.getNumSamples();i++)
            float_buffer[i] = random->nextFloat();


Should probably be :
for(int i=0;i<buffer.getNumSamples();i++) :wink:


Was just about to say!


Absolute Heros thank you! Working perfectly now! :smiley:


I think you need to increase your compiler warning level!



I’ve set that to 0 now so it starts from the beginning. Sorry about that!