Changing Sample Values in Buffer Isn’t Creating Sound

I’m trying to get the renderNextBlock() function in a juce synthesiser to output sound by changing sample values in the buffer.

void renderNextBlock(AudioBuffer< float > &outputBuffer, int startSample, int numSamples)
	{
		for (int sample = 0; sample < numSamples; ++sample)
		{
			double theWave = oscillator.sinewave(440); // The oscillator is a maxiOsc from the maximilian library.

			for (int channel = 0; channel < outputBuffer.getNumChannels(); ++channel)
			{
				outputBuffer.addSample(channel, startSample, theWave);
			}
			++startSample;
		}
	}

This code isn’t resulting in sound.

There are no exceptions or errors. It simply doesn’t make any sound (I would expect it to result in a sine wave).

DBG messages show that the intended values (those of a sine wave) are being put into the buffer.

I have made projects that used almost identical code in the past, and those worked.

The code above is based on a video tutorial. You can see most of the code and the (functional) result at [8:34], which this link starts at:


I have followed this tutorial many times in the past, and it has always worked for me.
Since it stopped working, I’ve tried 3 times to exactly follow it, never getting sound.

I have tried taking other projects I have which used the maximilian library successfully and changing those so that I would be changing the buffer as in the example above, but that did not work either. That makes it look to me like the maximilian library is not the issue.

All of these projects (I think) have been in V5.4.3, and I don’t believe I updated juice between when it worked and when it stopped working.

Older projects are able to make sound, just not in this specific way.

I’m not sure if I’m making a technical error or if this is some kind of misunderstanding about the basics of buffers. All I know is that it worked before.

No matter what I do, I can’t get sound out of a new project anymore. I’m pretty much at a dead end.
Any help is appreciated.

Also, I’m not sure if this is related, but when I create an audio application project, and run it without making any changes, I get the following:
jassert (audioError.isEmpty());

It’s not clear if that’s related to my problem with getting the buffer to make sound, but I thought it could be.
However, I do not get such an error when I create and then run an audio plugin project without making any changes, so I don’t know.