I have a script that needs to play audio file (mp3) whenever an event occurs. I'm currently using omxplayer to do that. The audio file is about 300ms long and sometimes there could be very small interval between the events, as low as 10ms, but it takes a second or two for the omxplayer to start up and play it so it adds up to ~3 seconds of processing time where something like 600ms max would be acceptable..
Is there a way to play the file instantly? Maybe it's possible to pass a 'trigger' to already running omxplayer instance? Thanks!