First about your problem:
- Did you test in a debugger? Is getNextAudioBlock() called? and is it called with values you expected?
- Did you check your settings? Is the device set to play on an output, where you would hear something? Nice catch e.g. sending to HDMI output and no speakers on the display…
- If you are in doubt about 2) add an AudioDeviceSelectorComponent, that lets you set the output and also play a test tone.
And now what looked suspicious, but maybe not linked to your problem:
- C74 allows also float operation, if you set the define GENLIB_USE_FLOAT32, see here, you avoid the conversion back and forth
- Even if you insist using double, you have a templated version AudioBuffer. You will still have to convert the samples, but you avoid the ugly new float calls, that are leaking in your case btw. It makes sense, because AudioBuffer will also ensure aligned memory iirc.
- You must not call new in your audio thread, which you do calling assureBufferSize. This has to be done in prepareToPlay. new will eventually not return in time and your audio is stalled. You can rely on the samplesPerBufferExpected. If you are paranoid, Fabian had a good suggestion to wrap your processing in a loop, so you can process fractions without overflowing your buffers.
Your processing could be simplified to:
Good luck debugging