Edzard Egberts ha scritto:
> Pasquale Fersini wrote:
>
>
>> I've a problem with an application I'm developing: it's an audio
>> player/recorder based on FmodEx library. For playing and stopping audio
>> stream there isn't problems, but when I start recording, the application
>> GUI freeze (damn!) while recording process goes on.
>>
>
> To keep the GUI responding it is necessary to call Fl::check()
> periodically (the attendend specialists consider this for self-evident
> ;o). For doing this there is no thread needed, it can be done much
> simpler inside a loop or by a timer.
All we FLTK user need a timer, like wxTimer class (wxWidgets) perhaps. I
am joking...
I think i'll follow Ian tip, in which he explains me the situation in which:
When you need to start a thread to do some work in the background
(e.g. your recorder) you put it in a void function like this...
void my_thread_function(void) {...}
And you start that from your main thread like this...
_beginthread(my_thread_function, 0, NULL);
(under unix use pthread_create(...) instead)
> But placing Fl::check() inside your
> record process maybe interrupts recording, so for your problem the
> professional way is using a worker thread.
>
Thanks, i'll TRY to remember this tip too, Ed ;-)
Thanks a lot, guys...thanks so much!
Pas.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk