Re: gtk_timeout_change()?



>> There isn't a way to change it, other than add/remove. The add/remove
>> should work fine though, it's only a couple more lines of code to
>> type.
>
>It does "work" just not smoothly.  Basically, I'm working on a simple audio
>app. where I use gtk_timeout_add() to trigger a pulse or beat.  I then map a
>slider to the timeout interval.  Unfortunately, the update seems erratic.
>While moving the slider, updates are not always send in a timely fashion.
>Instead, the update is not sent / received until I stop moving the slider.

dave. dave. you cannot use a ANY timer mechanism that is integrated
into the GUI event loop for this kind of scheduling. processing of
timeouts is always subject to delays caused by handling GUI toolkit
events. 

>I've done this very same thing (for a LJ article that never made it to print)
>using the Unix setitimer() and signal() mechanism.  That works flawlessly.

of course. there's no X/GDK/GTK event processing interfering with the
delivering of the timer.

>It's inefficient here because I want to have a function AND it's data used in
>the process.  The setitimer() and signal() technique only uses a function,
>data has to be global.

sorry, you just have to resort to globals. it doesn't have to be too ugly.

--p



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]