Vlc Source Obs

One approach is to use a state machine with a queued message handler. The states would include configuring an audio output task, loading a sound file, playing the sound output, stopping the sound output, and checking for new messages on the queue. Two of these state machines would then run in parallel, and receive messages to start and stop playback as needed.