denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] SOC - remarks 3 [FIX]


From: Dominic Sacré
Subject: Re: [Denemo-devel] SOC - remarks 3 [FIX]
Date: Thu, 4 Aug 2011 23:52:52 +0200
User-agent: KMail/1.13.5 (Linux/2.6.32-33-generic; KDE/4.4.5; i686; ; )

On Thursday 04 August 2011 21:47:19 Ralf Mattes wrote:
> On Thu, 04 Aug 2011 21:38:39 +0200, Dominic Sacré wrote:
> > On Thursday 04 August 2011 21:06:16 Ralf Mattes wrote:
> >> On Thu, 04 Aug 2011 19:00:51 +0000, Ralf Mattes wrote:
> >> > Another little buglet: during playback, two notes are
> >> > highlighed, the one playing and the one before.
> >> 
> >> Found it: the call to gtk_main() should be protected by
> >> gdk_thread_enter/leave I've fixed that in view.c (will be commited
> >> to soc). BTW, I'd rather prefer that gtk_init happens within that
> >> protection as well, but unfortunately that function is called in
> >> main instead of inner main. This should be cleaned up soon.
> > 
> > Interesting... I had been experimenting with this, but it didn't
> > seem to help
> 
> Well, it doesn't fix the problem.
> 
> > (and the GTK documentation is pretty vague about these things).
> 
> From all I understand gtk_main should/must be protected. It doesn't
> hurt and it might save us some trouble later on iff we want/need
> more than one thread accessing queues/gdk.

Yes. It may not fix this particular problem, but it's the right thing to 
do.

I actually had gdk_thread_enter/leave() calls around gtk_main() in a 
previous version, but it (more or less accidentally) got reverted along 
with some other changes.

You can't just access gdk from any thread btw, even with 
gdk_thread_enter/leave(). It may work on X11, but according to the 
documentation it does not work on Windows. That's why I'm using 
g_idle_add() to update the GUI from the audio code.


Dominic



reply via email to

[Prev in Thread] Current Thread [Next in Thread]