# AU latency change

**URL:** <https://forum.juce.com/t/au-latency-change/5365>\
**Category:** Audio Plugins\
**Created:** [June 8, 2010, 8:32am UTC](https://forum.juce.com/t/au-latency-change/5365 "2010-06-08T08:32:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![PieterS](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pieters/32/10588_2.png) [@PieterS](https://forum.juce.com/u/PieterS)\
**Post date:** [June 8, 2010, 8:32am UTC](https://forum.juce.com/t/au-latency-change/5365/1 "2010-06-08T08:32:58Z")

</div>

this was asked before for RTAS. Is there a way to notify the AU host that the latency is changed? The AU doc says that this should be possible :

[i]kAudioUnitProperty\_Latency  
…

If the sample latency for your audio unit varies, use this property to report the maximum latency. Alternatively, you can update the kAudioUnitProperty\_Latency property value when latency changes, and issue a property change notification using the Audio Unit Event API.

…  
[/i]

Is this possible in Juce?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [June 8, 2010, 8:56am UTC](https://forum.juce.com/t/au-latency-change/5365/2 "2010-06-08T08:56:22Z")

</div>

I haven’t added latency change notification to the API, but I’m sure it could be done. Too busy working on other areas to task-switch over to plugin coding at the moment, though…

---

<div class="post-metadata">

**Author:** ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)\
**Post date:** [June 10, 2010, 8:06am UTC](https://forum.juce.com/t/au-latency-change/5365/3 "2010-06-10T08:06:08Z")

</div>

I’ve looked into the subject before, but it does not seem an easy task, look here:

> **[Apple](https://lists.apple.com/archives/Coreaudio-api/2008/Mar/msg00276.html)**
>
> Discover the innovative world of Apple and shop everything iPhone, iPad, Apple Watch, Mac, and Apple TV, plus explore accessories, entertainment, and expert device support.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [June 10, 2010, 8:14am UTC](https://forum.juce.com/t/au-latency-change/5365/4 "2010-06-10T08:14:03Z")

</div>

Yeah, not too surprising to hear that hosts might ignore or have problems with latency changes.

---

<div class="post-metadata">

**Author:** ![yairadix](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yairadix/32/1114_2.png) [@yairadix](https://forum.juce.com/u/yairadix)\
**Post date:** [December 13, 2012, 6:04pm UTC](https://forum.juce.com/t/au-latency-change/5365/5 "2012-12-13T18:04:12Z")

</div>

Seems like all it requires is one line in JuceAU::audioProcessorChanged

```auto
    void audioProcessorChanged (AudioProcessor*)
    {
        PropertyChanged (kAudioUnitProperty_Latency, kAudioUnitScope_Global, 0);
    }
```

Works for me in Logic (the user needs to stop and play before the change takes effect but it does take effect)

Cheers! Yair

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [December 13, 2012, 6:29pm UTC](https://forum.juce.com/t/au-latency-change/5365/6 "2012-12-13T18:29:56Z")

</div>

What’s “PropertyChanged”? Is that a global function, or something in the AU classes?

---

<div class="post-metadata">

**Author:** ![yairadix](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yairadix/32/1114_2.png) [@yairadix](https://forum.juce.com/u/yairadix)\
**Post date:** [December 14, 2012, 12:31am UTC](https://forum.juce.com/t/au-latency-change/5365/7 "2012-12-14T00:31:43Z")

</div>

> [@jules](#):
>
> What’s “PropertyChanged”? Is that a global function, or something in the AU classes?

it’s a method of AUBase

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [December 14, 2012, 10:16am UTC](https://forum.juce.com/t/au-latency-change/5365/8 "2012-12-14T10:16:59Z")

</div>

Ah! Excellent idea, thanks!
