Spin buttons stepping by random value
- From: Olivier Guilyardi <ml xung org>
- To: gtk-app-devel-list gnome org
- Subject: Spin buttons stepping by random value
- Date: Tue, 15 Mar 2005 19:10:05 +0100
Hi,
I'm the developer of Jackbeat, an Audio Sequencer at http://xung.org/jackbeat
I'm having a problem with spin buttons which I use for resizing the sequence
structure Jackbeat relies on.
When for example, I want to increase the tracks number by clicking my spin
buttons (there's a screenshot at Jackbeat's homepage), it sometimes increase the
tracks number by 1, sometimes by 2.
My current implentation relies on locking when a such action is triggered, in
order to wait for the Realtime thread (producing sound) to get in sync. This
creates latency, so that the GUI main loop has to wait a small moment.
I thought this locking behaviour was driving my spin buttons mad, so I quickly
crafted a new non-locking routine for adding/removing tracks. But it did not
resolved the problem : there is still an important latency for such big changes,
because the sequence data needs to get reallocated, and the GUI redrawed.
AFAICS the problem is not coming from some double-event bug within my code, like
writing a value to the spin-button which would trigger the same event again.
The problem seems to come from a latency due to some heavy job performed by my
underlying and redrawing (but these don't redraw the spin buttons) routines.
This heavy job starts precisely when one of the arrow is clicked on a spin
button, and that makes me think that the resulting latency causes my spin
buttons to go nut.
If that is important to you, I do have a g_timeout callback function, but this
is removed when the heavy job starts. And I do not access my spin buttons in any
way from this g_timeout callback.
If you want to read the source, you should go with the src/gui.c file, from
Jackbeat 0.4.0.
Any clue's welcome.
--
og
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]