New to python and this board ... feel free to redirect me
I built a little python app for my grandbaby that plays sounds when she hits a button, but am struggling with a PI (jessie) that has other audio activity going on. Specifically I'd like to test to ensure the audio device is available (no shairport-sync activity) before attempting to initialize pygame.mixer and play my sound. Preferably wait for current audio activity to stop, play my sound and release the device again.
Currently if audio is active when I call pygame.mixer.init(), my script dies with "pygame.error: No Available audio device".
pygame_mixer.get_busy() does not seem to catch this.
any help would be appreciated