michaelphagen / ZMixer

A Mixer for Zoom, built in MaxMSP, and intended to be used with Loopback or Soundflower
Other
0 stars 0 forks source link

Reset Audio Devices on Close #10

Open michaelphagen opened 3 years ago

michaelphagen commented 3 years ago

Fix bug from 6fcaa288400ed1dccd7f109451c909d7c35c20f7, where the audio device is not reset upon closing the process because the mixer is closed before the command can be sent. Likely the only way is to run a script that polls for the Zoom Mixer process and resets it when the zoom mixer closes, but maybe something can be done in the export as application dialog.

michaelphagen commented 3 years ago

lsappinfo may be the built-in to use. Could call this at the start, or include it in the setDefaultDevice script

lsappinfo listen +launch +death -addasn "Zoom Mixer" forever \
| while read -r event; do
    # parse which type of event
    case "$event" in
      *"${notification}Death"*)
        # on death, set audio device to default.
        ./setDefaultDevice
        ;;
    esac
done