The most important requirement is to guarantee that the GUI will not influence the realtime acquisition and processing of the audio signals
I agree with that sentiment.
I do not know much about Qt. In your code, I noticed:
- argc and argv are function-local variables. They may be used by your thread after the function has exited, i.e. when the variables do not exist anymore.
- Values argc == 0 and argv == NULL may not be supported by QApplication.
- Just speculation: Maybe you can manage the lifetime of the Qt application some more, e.g. make QApplication and the thread members of your plugin class, signal the QApp to terminate in release and join the thread.
For visualizations, we have mostly used a different approach from yours: Plugins like ac2osc and ac2lsl can export data computed in the MHA over the network. A visualization can then execute in a separate process on the same host as the openMHA or on a different computer in the same network. That said, I think one MHA user was once displaying a Gtk
GUI directly from a self-written plugin similar to what you are trying to do, it should therefore be possible. Please keep us updated with your progress, even if we cannot help much directly.