[linux-audio-dev] timesetevent alternative

Garett Shulman shulmang at colorado.edu
Tue May 3 19:33:07 UTC 2005

Hello, About 5 years ago I hacked together a nice midi looper app. The 
only problem is that it was for Windows. Anyway... I'm working towards 
reimplamenting the app in linux. Basically, I have a circular linked 
list of midi events. Each node has the event and the time to the next 
event. In Windows there was a timeSetEvent function. I pass this 
function the time_to_next_event, 
function_to_call_after_time_to_next_event, and  
data_to_pass_to_function. The function_to_call_after_time_to_next_event 
just outputs the event and then calls timeSetEvent with the next nodes 
data. I'm curious as to how others would implament something similar in 
linux. Perhaps as a thread with sleep call? Is there a high resolution 
sleep function? Any ideas? Thanks. -Garett

More information about the Linux-audio-dev mailing list