MaterialFoundry / MaterialDeck

40 stars 20 forks source link

[Soundboard] Play sound effect in a material deck's playlist #106

Open DaniilTurceac opened 1 year ago

DaniilTurceac commented 1 year ago

Context

I'm using MaterialDeck only for sound effects and Moulinette Soundboard. Some effects I run via Moulinette some as individual files via MaterialDeck.

Problem

The issue is when I play a custom file as a source of the effect the audio file doesn't show up in the audio tab. So the problem is if MaterialDeck glitches out or something malfunctions there is no nice way to stop the already looped effect. This forces me to reset the Stream Deck and restart the FoundryVTT App.

Solution

I suggest MaterialDeck should work the same way as Moulinette Soundboard.

Term

MaterialDeck's Playlist - MaterialDeck's private playlist with the collection of audio files used in Soundboard.

Story 1

When a user wants to play an audio file
Then check if MaterialDeck's Playlist exists
If MaterialDeck's Playlist exists go to Story 2
If not create MaterialDeck's Playlist and populate it with audio files defined in the Soundboard.

Story 2

Given audio file is defined in the soundboard
When the user plays audio file
Then check if the file exists in Material Deck's Playlist
If the file exists, play the file
If not, add the file to Material Deck's Playlist and play it