View Single Post
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#22
I just found some time to hack together a shell one-liner that should solve it for you (jn case your alert e-mail has a specific unique subject):
Code:
{ dbus-monitor & echo $! >dbusmonpid; } | { grep -q -m 1 'xxxSUBJECTxxx' && gst-launch-1.0 playbin uri=file:///home/nemo/Music/SOMEFILE.ogg.midi.wav.mp3 && kill $(cat dbusmonpid) && rm dbusmonpid; }
Replace the xxxSUBJECTxxx with any unique part of subject of your alert mail. And replace SOMEFILE with any music /sirene/noise sound file.
Tested and worked.



This is definitely not fool proof and could be extended with a loop and more. Oh and let the sound play to end (do not use ctrl-c), else the dbus-monitor process will not get killed.
About loudness I do not know with gst-launch but there should be some help.
So there is room for improvement. But hey it works!

Thanks @haltux for the right pointers!
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following 9 Users Say Thank You to peterleinchen For This Useful Post: