On Thu, Sep 07, 2006 at 08:59:13AM -0400, Samuel Cormier-Iijima wrote: > This is for music editing software I'm thinking about writing. > Basically, the user should be able to "record" the volume during > playback by sliding the GtkHScale around. When he plays it back the > next time, the volume should change according to the way he recorded > it (i.e. it'll wiggle around by itself during the song playback).
Connect to the "value-changed" signal of the corresponding adjustment. In the callback, note the current time and value and add it for example to a GSList (using prepend, not append to keep it O(1)). Disconnect when done. For replay revert the list, set up a periodically called func with g_timeout_add(). When the function is called it gets the current time, finds the value to set (if you save the current position in the list it can be done with simple forward search quite efficiently) and sets it, possibly with interpolation. Remove the func when you hit the end. This is quite obvious so, although I could probably patent it, what I missed in the requirements? Yeti -- Anonyms eat their boogers. _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list