in reply to Re: mysterious hardware/OSS/Gtk interaction?
in thread mysterious hardware/OSS/Gtk interaction?

Thanks for the reply, zentara. I posted a list of hardware above. What hardware and OS are you running? Since the problem only occurs when I'm using sound, I guess the best option I can think of is something like this. Have the program fork itself. Fork A is responsible for reading sound input and storing the results in a circular buffer on disk. Fork B runs the GUI and only reads from the buffer file when needed. Does this seem like a reasonable plan?
  • Comment on Re^2: mysterious hardware/OSS/Gtk interaction?

Replies are listed 'Best First'.
Re^3: mysterious hardware/OSS/Gtk interaction?
by zentara (Cardinal) on Mar 11, 2011 at 16:26 UTC
    Does this seem like a reasonable plan?

    Yeah, forking is good, probably better than threads. The only time you really need threads is for "realtime" sharing of cross-thread data. Also depending on your buffer design, you may need some sort of file locking.

    But in that regards of timing, especially with sound, you may want to go with the fastest IPC possible, thru shared memory segments. Search for examples of IPC::SysV


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh