# Double processBlock not called

**URL:** <https://forum.juce.com/t/double-processblock-not-called/51450>\
**Category:** Audio Plugins\
**Created:** [May 16, 2022, 9:43am UTC](https://forum.juce.com/t/double-processblock-not-called/51450 "2022-05-16T09:43:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lcapozzi](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/lcapozzi/32/10960_2.png) [@lcapozzi](https://forum.juce.com/u/lcapozzi)\
**Post date:** [May 16, 2022, 9:43am UTC](https://forum.juce.com/t/double-processblock-not-called/51450/1 "2022-05-16T09:43:13Z")

</div>

Hi guys,

I’m trying to get a project to be able to process a double precision buffer in Cubase. I have both processBlock and methods in my class, but the plugin keeps working with the one. I also tried to build the example “audio plugin demo” project and it does the same. I’m testing them on Cubase 11.0.20, with double precision processing enabled.

Is there something I’m missing?

Thanks,  
Luca

---

<div class="post-metadata">

**Author:** ![ImJimmi](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/imjimmi/32/10843_2.png) [@ImJimmi](https://forum.juce.com/u/ImJimmi)\
**Post date:** [May 16, 2022, 9:47am UTC](https://forum.juce.com/t/double-processblock-not-called/51450/2 "2022-05-16T09:47:40Z")

</div>

Have you overridden `supportsDoublePrecisionProcessing()` to return `true`?

[https://docs.juce.com/master/classAudioProcessor.html#a0287477bbe4e0f38b3693a09d800e911](https://docs.juce.com/master/classAudioProcessor.html#a0287477bbe4e0f38b3693a09d800e911)

---

<div class="post-metadata">

**Author:** ![lcapozzi](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/lcapozzi/32/10960_2.png) [@lcapozzi](https://forum.juce.com/u/lcapozzi)\
**Post date:** [May 16, 2022, 12:58pm UTC](https://forum.juce.com/t/double-processblock-not-called/51450/3 "2022-05-16T12:58:31Z")

</div>

Nope. I was relying on the example provided and there’s no override for this method in there. Thanks!

Luca

---

<div class="post-metadata">

**Author:** ![lcapozzi](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/lcapozzi/32/10960_2.png) [@lcapozzi](https://forum.juce.com/u/lcapozzi)\
**Post date:** [May 16, 2022, 1:45pm UTC](https://forum.juce.com/t/double-processblock-not-called/51450/4 "2022-05-16T13:45:46Z")

</div>

ok now it process with the correct processBlock method, but Cubase fails to list it as one of the plugins able to process double precision audio.

In the meantime, I’m adapting my methods with templates but the one I use with dsp::ProcessContextReplacing (for oversampling) is not building, despite these methods are all based on templates.

I have:

template  
void MyAudioProcessor::process (dsp::ProcessContextReplacing context) noexcept

then, in that method

 ![Schermata 2022-05-16 alle 15.41.12](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/7/779d0b2cfaaf5e0b5c7bf6f1c775e307ab29cb16.jpeg)

I can’t seem to figure out why I get these errors. I don’t think I have to declare both float and double AudioBlocks, am I?

Thanks,  
Luca

---

<div class="post-metadata">

**Author:** ![bayu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/bayu/32/10757_2.png) [@bayu](https://forum.juce.com/u/bayu)\
**Post date:** [May 17, 2022, 2:03am UTC](https://forum.juce.com/t/double-processblock-not-called/51450/5 "2022-05-17T02:03:41Z")

</div>

template helps to keep all the logic in one place.

but you still need to call both processBlock float and double, with each oversampler and AudioBlock corresponding to its each own type.

---

<div class="post-metadata">

**Author:** ![ImJimmi](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/imjimmi/32/10843_2.png) [@ImJimmi](https://forum.juce.com/u/ImJimmi)\
**Post date:** [May 17, 2022, 9:16am UTC](https://forum.juce.com/t/double-processblock-not-called/51450/6 "2022-05-17T09:16:52Z")

</div>

> [@lcapozzi](#):
>
> template  
> void MyAudioProcessor::process (dsp::ProcessContextReplacing context) noexcept

Have you provided the correct sample type to the template argument of `ProcessContextReplacing`?

You should have something like

```auto
template <typename SampleType>
void MyAudioProcessor::process (dsp::ProcessContextReplacing<SampleType> context)

```

---

<div class="post-metadata">

**Author:** ![lcapozzi](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/lcapozzi/32/10960_2.png) [@lcapozzi](https://forum.juce.com/u/lcapozzi)\
**Post date:** [May 17, 2022, 9:35am UTC](https://forum.juce.com/t/double-processblock-not-called/51450/7 "2022-05-17T09:35:09Z")

</div>

Absolutely, but it looks like @bayu said. I have to create two separate process methods, despite everything is templetized.
