badaix / snapcast

Synchronous multiroom audio player
GNU General Public License v3.0
6.21k stars 456 forks source link

Script volume control script is called on each update without waiting for the previous to end #1174

Closed arpena closed 7 months ago

arpena commented 1 year ago

Describe the bug When using the --mixer script option, the script is called so many times when there is an update that it behaves as a fork bomb and my Raspberry PI 2B can't keep up and it even disconnects from the network

Steps to Reproduce

  1. Start an snapclient with --mixer script option. It doesn't matter what the script does, I even tried with an empty script
  2. Slide the volume for the client on Snapweb several times up and down without pause
  3. The Raspberry could not keep up with the newly created processes, stops reproducing music and if it is even pushed to disconnect from the wifi network

Environment details

badaix commented 7 months ago

This is fixed now in the develop branch: while the script is still executing, the most recent volume change is cached and applied, once the script execution is finished. You can find debian packages here: https://github.com/badaix/snapcast/actions/runs/8506305673

badaix commented 7 months ago

Fixed in version 0.28.0