AudioKit / Cookbook

Canonical Examples for Using the AudioKit Framework
MIT License
606 stars 97 forks source link

STK Demo: Change the updated beat value to be published on the main thread #158

Closed markjeschke closed 1 week ago

markjeschke commented 1 week ago

When I start the STK Demo, Xcode displays a warning, saying:

Publishing changes from background threads is not allowed; make sure to publish values from the main thread (via operators like receive(on:)) on model updates.

Adding DispatchQueue.main.async publishes the new values to the main thread.

stk-demo-screenshot
NickCulbertson commented 1 week ago

Looks good. Thanks, Mark!