hacking /dev/audio

P

paul Z

I was going through the programs of winners if ioccc.I found one excellent
program which would give out the current time from the speakers when the
output of the program is given to /dev/audio.It was very impressive.Can
anybody please tell me how can it be done , I mean how does one know that
giving so and so ascii's will produce so and so sound..
Thanks in advance.
 
T

Tapio Kelloniemi

paul Z said:
I was going through the programs of winners if ioccc.I found one excellent
program which would give out the current time from the speakers when the
output of the program is given to /dev/audio.It was very impressive.Can
anybody please tell me how can it be done , I mean how does one know that
giving so and so ascii's will produce so and so sound..

I'm sorry, but this topic does not belong to this newsgroup, because the
implementation has nothing to do with C, neither has /dev/audio. Here
are some lines anyway:

It is not possible, in practise, to just write some values to
/dev/audio and get something sensible out (at least human speech).
If the sampling rate of the audio data is 8000 it means
that 8000 bytes will produce one second of sound. The trick is that
one records all numbers and other elements (pronounced by a human
person)
needed to produce time and then concatenates then in the appropriate order.
 
M

Malcolm

paul Z said:
I mean how does one know that giving so and so ascii's will
produce so and so sound..
I don't know exactly how the sound sytem works on that platform, but it
probably expects binary data in either 16-bit or 8-bit format. Since ASCII
characters are just small integers, by passing the right text you can
generate an appropriate soundwave.
How does he get the sounds? Probably by recording English phomemes with a
digital microphone, then just reading the text as ASCII.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top