Friday, 2014-10-24

*** gianMOD has joined #lv200:18
*** bgribble has joined #lv200:38
*** falktx has quit IRC00:55
*** gianMOD has quit IRC01:13
*** gianMOD has joined #lv201:14
*** falktx has joined #lv201:18
falktxI need some help here01:21
falktxa plugin has this:01:21
falktxlv2:extensionData <http://lv2plug.in/ns/ext/state#Interface>01:21
falktxnote the capital I in Interface01:21
falktxwhich seems wrong according to state.h01:22
falktx#define LV2_STATE__interface        LV2_STATE_PREFIX "interface"01:22
falktxnote the lowercase i01:22
falktxthe plugin code even has the bad Interface01:22
falktxhttps://github.com/nicklan/drmr/blob/lv2unstable/drmr.c#L54401:22
falktxwas this plugin ever actually working??01:23
*** bgribble has quit IRC01:25
falktxhttps://github.com/nicklan/drmr/pull/1201:36
falktxfails to save&load in jalv because the plugin can't handle symlinks01:40
falktxI guess it would be the same in ardour01:40
falktxwill need https://github.com/nicklan/drmr/issues/13 as well01:46
falktxnvm, it was another issue. fixed now too on pull request02:16
*** falktx has quit IRC03:46
drobillaToday on "why those defines are there"04:38
drobilla(and why sord_validate exists.  I need to make an idiot proof LV2 wrapper for that thing)04:39
*** gianMOD has quit IRC05:27
*** gianMOD has joined #lv206:28
*** gianMOD has quit IRC06:44
*** bgola has quit IRC06:47
*** triune has quit IRC06:47
*** Anchakor_ has quit IRC06:47
*** triune has joined #lv207:00
*** Anchakor_ has joined #lv207:00
*** bgola has joined #lv207:09
*** bgola has quit IRC07:28
*** triune has quit IRC07:29
*** Anchakor_ has quit IRC07:29
*** bgola has joined #lv207:32
*** bazz has quit IRC07:37
*** triune has joined #lv207:37
*** Anchakor_ has joined #lv207:37
*** bazz has joined #lv207:37
*** grejppi_ has joined #lv208:18
*** grejppi_ has quit IRC08:22
*** edogawa has joined #lv208:24
*** gianMOD has joined #lv208:27
*** gianMOD has quit IRC08:32
*** wumpus has quit IRC09:14
*** wumpus has joined #lv209:16
*** gianMOD has joined #lv209:47
*** NickSB2 has quit IRC09:53
*** NickSB2 has joined #lv209:53
*** wumpus has quit IRC09:55
*** wumpus has joined #lv209:56
*** gianMOD has quit IRC11:04
*** falktx has joined #lv211:05
*** gianMOD has joined #lv211:08
*** gianMOD has quit IRC11:10
*** gianMOD_ has joined #lv211:13
*** gianMOD_ has quit IRC11:18
*** rncbc has joined #lv211:51
*** ricardocrudo has joined #lv212:08
*** ricardocrudo has quit IRC12:10
*** ricardocrudo has joined #lv212:10
*** rncbc has quit IRC12:16
*** rncbc has joined #lv212:16
*** rncbc_jolla has joined #lv213:05
*** rncbc has quit IRC13:09
*** bgribble has joined #lv213:34
*** gabrbedd has quit IRC13:56
*** falktx has quit IRC14:06
*** falktx has joined #lv214:28
*** gabrbedd has joined #lv214:31
*** falktx has quit IRC15:06
*** falktx has joined #lv215:48
*** bgribble has quit IRC15:52
*** zth has joined #lv216:41
*** NickSB has quit IRC17:30
*** NickSB has joined #lv217:35
*** zth_studiocomp has joined #lv218:11
*** mlpug has joined #lv218:51
*** zth_studiocomp has quit IRC19:10
*** rncbc has joined #lv219:26
*** mlpug has quit IRC20:06
*** gian_ has joined #lv220:21
*** gianMOD has joined #lv220:23
*** gian_ has left #lv220:23
*** gianMOD has quit IRC20:23
*** gianMOD has joined #lv220:24
*** gianMOD_ has joined #lv220:37
*** gianMOD_ has quit IRC20:47
*** zth has quit IRC21:27
*** rncbc has quit IRC21:34
*** gianMOD has quit IRC21:37
*** gianMOD has joined #lv221:41
falktxdrobilla: one question21:41
falktxI just found out NTK blocks while waiting for any dialog or menu operation21:41
falktx(blocks the main thread waiting for the user to click something)21:41
falktxBUT while this happens NTK still sends the registered idle functions21:42
falktxdrobilla: what do you think of a host callback the UI can call when it needs to block like this?21:43
falktxdrobilla: or should we impose UIs to never block?21:43
*** gianMOD has quit IRC21:51
*** gianMOD has joined #lv221:55
*** gianMOD has quit IRC21:56
*** gianMOD has joined #lv222:00
*** ricardocrudo has quit IRC22:06
*** gianMOD has quit IRC22:07
drobillafalktx: A host callback for what?22:14
drobillafalktx: The idle callback must not block for an extended period of time, anyway.  It's effectively the main toolkit loop, which you can never block in any case (though you can pretend to, as Gtk/NTK/etc do in some cases)22:15
falktxok, then NTK devs can't use dialogs or main menus for now22:18
* drobilla gets bug reports about people packaging svn lilv and not its dependencies (svn sord)22:18
drobillaSigh.  I wish there was some technological way to just make doing that impossible.  If it was ready/suitable for packaging IT'D BE A RELEASE.  That's what a "release" is.22:19
drobillafalktx: Hm.  Seems the same would apply to Gtk dialogs (at least if you use run() and friends).  Never come up22:20
drobillaThough at least Ingen and presumably some other plugins use them22:20
drobillaWhich is probably magically fine if the host uses the same toolkit, but not otherwise.22:20
drobillaNot obvious if there's a good solution or what it is22:20
falktxdrobilla: my "solution" was to have a host-side function the UI calls at regular intervals during the blocking time22:21
falktxthe host-side function gives the host a chance to handle events, while still having a plugin UI waiting22:21
falktxin a qt4 host running NTK or Gtk2 UIs, the host-side function would call qApp->processEvents()22:23
drobillabit of a PITA22:23
falktxVST is already doing this I think, this is a big issue in win32 afaik22:23
drobillaIf the UI code blocks on the dialog call, how does it periodically call a host function?22:24
falktxit registers an idle funtion22:24
falktxgtk2, qt4 and ntk has API for that22:24
falktxit needs to be done carefully of course22:25
falktxthe setup would be something like this:22:25
falktx1. UI realizes it's going to open a file-dialog, so it registers an idle function in gtk222:25
falktx2. UI opens file-dialog. the idle function keeps calling host-side idle while waiting22:26
falktx3. file-dialog returns, UI unregisters the previous idle function22:26
falktxdrobilla: does it make sense to you?22:26
drobillaIs this really easier than doing non-blocking dialog stuff in the UI?22:26
falktxdo gtk dialogs not block?22:27
drobillaYeah, it's basically the same recursive idle loop thing most toolkits do22:27
drobillaYou can do either22:28
falktxafaik win32 file dialogs block22:28
drobillarun() is basically just a wrapper that does what you just explained.22:28
drobillaWell, I certainly dislike it, but it's reasonable and seems like just an LV2 applying of a relatively widespread concept22:30
drobillaSend a patch against LV2 and I'll include it22:30
falktxok22:31
falktxI want to have a test case first, so it won't be now22:31
wrlfalktx: the vst idle callback is deprecated22:33
wrlmost vst plugs register timers22:34
wrlat this point22:34
falktxwrl: how do timers solve UI blocking issues?22:35
wrlfalktx: the win modal loop continues to call them22:36
wrllikewise on OSX (though not by default, you have to specify a different runloop mode for the NSTimer)22:37
falktxyou can't do that on linux afaik22:37
wrlwell, there's no OS-level timer22:37
wrlso e.g. juce has to spin up a thread for things like that22:38
falktxyep22:38
falktxthis seems like something the host would have to do too22:38
falktxwhat can a host do when a plugin blocks the main thread?22:38
wrlnothing, really?22:40
falktxthat's why I'm proposing the host-side callback22:41
drobillawrl: Do you know why it was deprecated?22:41
drobillafalktx: It would be easy enough to do with basically any toolkit that can do the idle thing22:42
falktxthe docs can include examples for that22:43
drobillaThough I don't really get it.  The UI would have to deal with dialogs in a non-blocking way anyway, in which case registering a new idle handler doesn't help much22:43
*** NickSB2 has quit IRC22:43
wrldrobilla: nope. presumably because it's so easy to just register timers on win/osx22:43
drobillawrl: Yes, but I don't see how that really helps with handling dialogs22:43
*** NickSB2 has joined #lv222:44
wrlwhich tbh is only necessary because the native windowing system/constructs don't work well with threads22:44
drobillaIn Gtk, for example, you'd just show the dialog and set a handler for the closed (or whatever it is) signal which does the thing that needs doing when the dialog is finished.  Adding a second idle/timer callback doesn't help22:45
falktxdrobilla: this is an issue right now in NTK22:46
falktxsince it's not a native LV2 UI type, it has to use X11UI and ui-idle for handling events22:47
falktxsome NTK operations block, which happens on ui-idle22:47
falktxthis will block the host main thread22:47
wrlwhat's the problem with just spinning up a thread?22:47
wrland running the UI in that22:47
falktxyou have to create and destory the UI on that thread as well no?22:48
wrlgenerally, yeah22:48
drobillawrl: Short answer: multi-thread + toolkit = hell in the best case22:48
falktxthis sounds a bit complex22:48
drobillaThat's one of those "theoretically possible, sometimes, but you really, really do not want to do that" things22:49
wrlyeah that's fair22:49
wrli can imagine with a general-purpose toolkit that would be tricky22:49
wrldoes gtk use global state?22:49
wrlntk?22:49
falktxI don't think is going to be an issue with gtk or qt22:50
drobillaNot really, but it doesn't have to for there to be a problem.  Your widget is a child of another widget22:50
drobillafalktx: I think it will be an issue for anything not using the same idle thread (e.g. glib)22:51
drobillaThe idle callback is just called in that anyway22:51
drobillaPresumably you get away with it with Gtk, and maybe Qt, since the recursive idle loop stuff will do the right thing22:51
falktxbuilding an example in NTK is easy. but I want to try it with qt as well22:52
falktxjalv.gtk + qt plugin works for file dialogs22:53
falktxthere is some magic in there...22:53
drobillaI wonder if plugins doing this will be a problem if they *do* use the same toolkit or idle loop22:53
drobillarecursive-recursive...22:53
drobilladialog.run() is recursively calling idle(), meanwhile, so is the plugin code...22:54
drobillawhich I guess is fine since it's all in the same thread, but the rate might be fucked22:54
falktxthe UI only calls host idle if it knows is going to block22:54
falktxhah, closing jalv.gtk while a qt dialog is still open results in a crash22:55
falktx*** Error in `jalv.gtk': free(): invalid pointer: 0x00007fffd29515e0 ***22:55
drobillaYes, but e.g. a Gtk dialog will do the exact same thing.  Naturally it doesn't *really* block everything22:56
drobillaMeh, you were closing it anyway, just took a shortcut :P22:56
falktxbut imagine ardour closing a single UI22:56
drobillaYes, it would be a problem if it actually happens in that case22:58
drobillaThough the UI should be cleaning itself up when requested anyway22:58
drobillaSo it should not be possible for a dialog to be present when the host exits, assuming the host destroyed the UI first22:58
drobillaAnyway, I need to do some work23:00
wrli'm in favor of "in-process plugin UIs that have global state" becoming an anti-pattern23:01
drobillaGlobal state is not the issues.  They're part of the same UI.  They inherently share state.23:01
drobillaYou can always do a separate thread or process thing with show() hide(), you just lose embedding, among other things23:04
falktxyou can still do embedding with a separate thread23:05
falktxproof here: https://github.com/distrho/Zynaddsubfx23:05
falktxI use NTK on a separate thread for that, but I don't like it23:06
drobillaWell, yes, XEmbed is cross-process23:06
falktxyeah, I have XEmbed working with a different process for carla-vst :)23:07
drobillaI don't see the win, though23:07
falktxcrazy stuff23:07
*** edogawa has quit IRC23:20
*** gianMOD has joined #lv223:23

Generated by irclog2html.py 2.13.0 by Marius Gedminas - find it at mg.pov.lt!