libPlaySound... plays sounds!
Usage:
*For D series (arm), replace every instance of /mnt below by /mtd_rwcommon/widgets/user/SamyGO/SamyGO
- First install latest samyGOso as usual, if needed.
- Extract attached archives and copy libPlaySound.so and libTada.so to /mnt/opt/privateer/usr/libso (create folder if needed).
- You noticed two libs are there, you first have to inject libTada resident (only once a boot of course), it installs necessary payloads other (non-resident) lib will use afterwards.
At this point you should hear nothing yet.
Code: Select all
samyGOso -T -B -r -l /mnt/opt/privateer/usr/libso/libTada.so
- Then you can play with sounds at will using other lib:
Code: Select all
samyGOso -T -B -l /mnt/opt/privateer/usr/libso/libPlaySound.so [arg1...argN]
- Used without args, it will play a well-known "tada.wav". Usable args are:
- WAVFILE:/full/path/to/yoursound.wav - Wave file to play. Default (unspecified) is built-in tada.wav
- VOLUME:1-100 - Relative (to current) volume of wave to play. Default is VOLUME:100
- STOP - Stops current playback in case you launched a (too) long wave file and you're bored. To be used as single arg.
- Copy 99_94_Tada.init to /mnt/etc/init.d
- Set permissions
Code: Select all
chmod +x /mnt/etc/init.d/99_94_Tada.init
- Script injects only libTada, then it's up to you to use libPlaySound anywhere you want (e.g. Oscam started -> Tada! :p)
You should be able to play waves *almost* as long as you want, but there's some theoretical limit due to sizeof(int) I didn't calculate. About more than half an hour I think...
Anyway, the point is primarily to play short "alerts" (ding dong pwêt). Please do not ask for MP3 nor playlist support and don't expect libJukebox
*Changelog:
Code: Select all
* libPlaySound.so
25/5/2016
v0.0.4 - First public release
Code: Select all
* libTada.so
25/5/2016
v0.0.9 - First public release