missionpinball / mpf

Mission Pinball Framework: Open source software to run a real pinball machine.
http://missionpinball.org
MIT License
217 stars 143 forks source link

Bus player for MPF 0.80 (replaces Track player from MPF 0.57) #1806

Closed avanwinkle closed 4 months ago

avanwinkle commented 4 months ago

This PR introduces support for bus_player commands from MPF, akin to the track_player configs of MPF 0.57. The GMC companion PR is at https://github.com/missionpinball/mpf-gmc/pull/8

Three actions are supported: pause, unpause, and stop.


bus_player:
  delay_pause:
    music:
      action: pause
      fade: 2s
  delay_resume:
    music:
      action: unpause
      fade: 2s
  delay_stop:
    music:
      action: stop
      fade: 1s

Note that when a bus pauses, the channel is no longer considered active and may be replaced by a new sound request. To ensure proper isolation of sound files on a bus, use a unique bus for those sounds.

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud