Play ambience mp3 in a loop on dungeon #79
Labels
No labels
UserStory
bug
duplicate
enhancement
help wanted
hw task
invalid
question
refactoring
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mattzz/halloween#79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Dungeon should continuously play the mp3 ambience. It could do so automatically after starting up or it could be enabled/disabled from the Master Screen.
Ideally, we could start, stop and restart the playback at any time in the Master Screen by using a slider like the one for the auto_mode.
Alternative solution would be a button to start it and a button to stop it. We need to define two scary actions for dungeon: One to start a looped playback of the mp3 (
mpg321 --loop 0 ambience.mp3 &) and one to kill the playback using an appropriate os-command. That should be easier to do an would be nice, even though there are two buttons and not a slider.Additional scary actions playing more sounds and generating fog can be played while the ambience mp3 is playing in the background without a problem.
@mishi - Please make sure you run
sudo apt-get install python3-psutilfirst.Right now I'm not using threads but shell subprocesses. Stopping the process is done via kill() so I don't know what happens if there is another sound playing back at the same time...
Just tested it :)
If two sounds are playing back at the same time and ambience sound is toggled off, then all sounds are stopped/killed.
But multiple sound playback is possible.
Awesome! I like this. It's simple. Like me.