try using /usr/SYSqtapp/phone/alertprocess -playvol 10 -playfile /your/sound/file
Hello All,
I have tried to play a raw audio wave file using
cat audio.raw > /dev/dsp
and /dev/dsp16 and /dev/audio
but I couldn't get any decent sound...nothing but strange noises. I have tried 8/16 bits/sample, 8000/16000 and 44000 samples/sec, and signed and unsigned format without luck. (I used sox to format the audio files).
Also, after these tests, all the standard sounds from the phone's apps are messed up, I need to reboot to fix them.
Has someone figured out how to use /dev/dsp*?
Any other way to make a 'beep' from a bash script?
thanks!
matiu
try using /usr/SYSqtapp/phone/alertprocess -playvol 10 -playfile /your/sound/file
Wow! Thanks! How you figure that out? by 'ps auxww'?
Thanks!
matías
Just a quick thought I had from reading this thread...
If I understand things correctly, sound is still a problem in OPIE etc?
If we are unsucessful in getting that fixed, perhaps we can use the knowledge of 'alertprocess' to build a /dev/dsp emulation daemon?
Basically; create a small process that opens a socket in the filesystem, and everything it receives on the socket, it dumps into a temporary file and then sends to alertprocess.
It is no great solution, but could possibly be a workaround. It would be even better if we can find some other app or flag to 'alertprocess' that is able to take a stream.
Another way, I guess, is to actually figure out what magic call in the ezx-libraries it is that plays sound.
With the creation of my ezx-opie, I will be even more interested in making opie able to exploit other phone features. This will be something interesting to do.
Preliminary investigation indicates that it can play from a pipe created by mkfifo. The name of the pipe must have a "." though. (e.g. mkfifo /ezxlocal/snd.wav)
Also, i think i figured out what the parameter -playdev is for. -playdev 0 will always play on the speakers, and it will preempt RealPlayer and FM Radio. -playdev 1 will play on the earpiece if it is plugged in and will be preempted by RealPlayer and FM Radio.
Perhaps qsoundqss_qws.cpp can be modified to play through this.