# Block size bug when using Tracktion Engine to make an AUv3 plugin

**URL:** <https://forum.juce.com/t/block-size-bug-when-using-tracktion-engine-to-make-an-auv3-plugin/55291>\
**Category:** Tracktion Engine\
**Created:** [March 8, 2023, 1:51pm UTC](https://forum.juce.com/t/block-size-bug-when-using-tracktion-engine-to-make-an-auv3-plugin/55291 "2023-03-08T13:51:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bystrano](https://avatars.discourse-cdn.com/v4/letter/b/ccd318/32.png) [@bystrano](https://forum.juce.com/u/bystrano)\
**Post date:** [March 8, 2023, 1:51pm UTC](https://forum.juce.com/t/block-size-bug-when-using-tracktion-engine-to-make-an-auv3-plugin/55291/1 "2023-03-08T13:51:44Z")

</div>

I am a building an AUv3 plugin using Tracktion Engine, and have noticed a bug with the block size used in Tracktion plugins.

I have been able to reproduce the problem with the EngineInPluginDemo provided with Tracktion engine.

In this demo, when building it as an AUv3 plugin, the FourOSC tracktion plugin that generates a click sound uses a blocksize of 2048 samples, no matter what the host specified.  
Using breakpoints in Xcode’s debugger, I can see that when I change the block size in the host that holds the EngineInPluginDemo instance (AUM on iOS), the `EngineInPluginDemo::prepareToPlay` function is called with the host’s block size, but the `FourOSCPlugin::prepareToPlay` function is never called.

I have made the same experiment with a VST3 build of EngineInPluginDemo in Reaper. In this case, I see that both `prepareToPlay` functions (EngineInPluginDemo’s and FourOSCPlugin’s ones) are called when the Reaper’s block size changes. And that the FourOSCPlugin uses the proper block size.

---

<div class="post-metadata">

**Author:** ![dave96](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dave96/32/8487_2.png) [@dave96](https://forum.juce.com/u/dave96)\
**Post date:** [May 10, 2023, 12:08pm UTC](https://forum.juce.com/t/block-size-bug-when-using-tracktion-engine-to-make-an-auv3-plugin/55291/2 "2023-05-10T12:08:24Z")

</div>

Does this also happen when running as stand alone?

And are you using the latest tip of the `develop` branch?  
I have a feeling this might be something that got fixed when I removed the block latency requirement from the Engine-as-a-plugin.
