Is there an option for AudioProcessor::processBlock() to produce DOUBLE's?

In my internal timing tests, I’ve gotten the same performance using double’s as float’s. (Visual C++ 2017, Windows 7, 32-bit, i7-2600, an old but fast processor) Accordingly, I’d like to use doubles throughout my VST.

In coding void Tutorial2AudioProcessor::processBlock( juce::AudioBuffer& buffer, juce::MidiBuffer& midiMessages ) is there any way to output double’s instead?

Yes. Check out the AudioProcessor class reference:

…and all the DoublePrecision references. I can’t tell you what exactly to do, however, since I’ve only used the float versions. :wink:

1 Like

Like was mentioned in the other reply, AudioProcessor these days does support processing 64 bit floats, but you still have to implement the 32 bit float processing for hosts that don’t support 64 bit floating point processing for the plugins. In any case, you can do your internal processing as 64 bit floats, regardless of what format is used at the plugin inputs and outputs. (There will obviously be format conversion steps involved, but that shouldn’t have any appreciable impact on the CPU use, if your plugin is otherwise doing something non-trivial.)

1 Like