|
2010-06-21
, 00:32
|
|
Posts: 722 |
Thanked: 1,223 times |
Joined on Apr 2010
@ USA
|
#2
|
The Following User Says Thank You to fcrochik For This Useful Post: | ||
|
2010-06-21
, 03:36
|
Posts: 307 |
Thanked: 157 times |
Joined on Jul 2009
@ Illinois, USA
|
#3
|
One day I had an idea to set my phone's SMS alert to a random Starcraft unit selection sound. After much tweaking and trial and error I am now very pleased with my hack.
What I did was download the SC1 sound pack from teamliquid onto my device.
After much trial and error I found the location of the cached SMS alert wave files. I then created a placeholder wav file called randomsc.wav somewhere in the MyDocs directory using an existing wav file.
I then created a named pipe at /home/user/.local/share/sounds/randomsc.wav.wav (The phone encodes whatever file you select and appends a .wav to it when selecting an alert)
All I had to do now was pipe random wav files into the named pipe. I created an index of the files to be randomized with
With the index created I now just have to pipe random entries into the named pipe with:
There are many problems with this set-up and it is not ideal. It could be improved several ways.
1. If the device were to be plugged into a computer in mass storage mode and you were to receive an SMS it would cause lots of problems (this could be avoided if you put the sound files into the rootfs)
2. The loop command has to be run in order for any of this to work and this needs to be daemonized.
3. Deleting sound files might cause an SMS alert to be missed
This named pipe feature seems very extensible to me. So i tried piping espeak into the fifo and viola dynamic tts SMS alert.
I think this is very cool method to generating dynamic ringtones and I can't wait to try out per contact ringtones. I'm also not a developer but I'm sure some of you out there can take my concept and make it user friendly and refined.
I am not familiar with upstart so I have no idea how to make the loop run at startup
Last edited by Dotblank; 2010-04-08 at 17:22.