Re: gtk_timeout_change()?

From: "David J. Topper" <topper virginia edu>
> Havoc Pennington wrote:
> > 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.

This sounds like you're not giving the glib mainloop any
time until after the slider is done moving. Inserting
a call to g_main_context_iteration() after you send the
update may fix this.

Ron Steinke

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