museumsvictoria / spatial_audio_server

An audio backend for the multi-layered soundscape of Beyond Perception: Seeing the Unseen, a permanent exhibition at Scienceworks in Melbourne, Australia.
81 stars 14 forks source link

Fix issue where GUI doesn't update if a soundscape generates a new sound when none previously existed #79

Closed mitchmindtree closed 6 years ago

mitchmindtree commented 6 years ago

An easy fix would be to switch to a 60FPS constant loop, however considering audio server will be running for so long it would be nice if we could keep it so that the GUI only ever updated/redrew when absolutely necessary.

Currently the GUI only continues to update if an active sound is playing or if UI input is received. We need to also add a condition where the GUI is updated if the soundscape spawns a new sound when there are no previous existing sounds.

We could possibly do this by passing a nannou::app::Proxy to the soundscape thread that may be used to manually trigger a new event in the GUI.