Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: making something happen in real time

by GrandFather (Saint)
on Nov 08, 2005 at 01:10 UTC ( [id://506583]=note: print w/replies, xml ) Need Help??


in reply to making something happen in real time

A completely different way to do it is to set up code to play looped sound. I don't know Linux but I bet there is a play equivelent module that will let you do that. Then you set up a sound buffer with the tick and an appropriate amount of silence for the rate you require initially. Then, every update period, reduce the padding and update the sound buffer.

Now your script can perform a much less frequent update and can be sure that the tick rate will be precise, albeit with a glitch if you can't manage a synchronous update of the sound buffer.


Perl is Huffman encoded by design.
  • Comment on Re: making something happen in real time

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://506583]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found