Audio Player Options

Hi all, with the play sound node, I'm trying to figure out the best way to loop some audio...lets say the application is for a background music player.

I see the options to pause/resume, but no option to loop. I'm trying to figure out what does " options : Options - If empty, then the one in dialog is used" mean? Is there like a '-L' flag or something I can pass to get the file to loop? Is there a way to see what player it is using behind the screen? (mplayer/VLC) and then would that allow me to pass command line arguments in the msg.options?

Thanks for any pointers,

--Dan

Thanks for the reply miker256, however I am looking to loop a audio file, not create a loop from a drum machine.

This example creates a queue where the next thing starts when the one before finishes
https://flows.nodered.org/flow/cea8afa28b7a93ebdc0f
It should be possible to adapt this to just repeat instead of taking the next item.

have you looked at node-red-contrib-play-sound? I use it for a music box I built. It emits a msg when the sound is finished playing. You could check for that and feed back to the input to cause the loop.

1 Like

I like that solution! Thanks Zenofmud. I saw the bit about the on completion message, just wasn’t thinking about using it to my advantage.