ssj71 | http://drobilla.net/software/jalv | 00:00 |
---|---|---|
pablo7 | ssj71: so i should read jalv and lv2apply.c to see how its done? sorry, i'm not very good at english, so i may not understand what you are suggesting.. Are you telling me to use jalv as a reference? | 00:01 |
pablo7 | ssj71: or to use somehow jalv inside my app? | 00:02 |
ssj71 | pablo7: use it as a reference, and use parts of it inside your app | 00:05 |
pablo7 | ssj71: thanks! i'll look trhoug it then! | 00:06 |
*** pablo7 has quit IRC | 00:07 | |
*** ssj71 has quit IRC | 00:12 | |
*** grejppi has quit IRC | 00:15 | |
*** Yruama_Lairba has joined #lv2 | 00:19 | |
*** grejppi has joined #lv2 | 00:31 | |
*** rgareus has quit IRC | 02:48 | |
*** rgareus has joined #lv2 | 03:14 | |
*** trebmuh has quit IRC | 03:22 | |
*** Yruama_Lairba has quit IRC | 03:50 | |
*** edogawa has joined #lv2 | 10:27 | |
*** Yruama_Lairba has joined #lv2 | 12:23 | |
*** trebmuh has joined #lv2 | 12:27 | |
*** edogawa has quit IRC | 15:06 | |
*** rncbc has joined #lv2 | 15:08 | |
*** oofus has joined #lv2 | 15:54 | |
*** jcelerier has joined #lv2 | 16:59 | |
jcelerier | hello :) | 16:59 |
jcelerier | I am trying to grasp the lv2 worker extension (from the host side) | 17:00 |
jcelerier | I've looked at the jalv code, and it just saves the lv2_worker_interface in the global context of jalv since there is a single plug-in loaded | 17:00 |
jcelerier | but I don't understand how, in the worker schedule function, one is supposed to know from which lv2_worker_interface the "work" function should be called | 17:01 |
jcelerier | since (if I understood correctly) the worker schedul is a host-wide feature with a single instance, and the interface is a per-plugin instance | 17:02 |
jcelerier | and please don't tell me that I should just set some "current_worker_iface" field prior calling for some processing from the plug-in | 17:03 |
rgareus | jcelerier: your host provides the LV2_Worker_Schedule feature to the plugin.. that struct has a ->handle which the host can set. | 17:21 |
rgareus | jcelerier: the plugin calls schedule_work (that_handle) and the host can resolve this to the current instance | 17:22 |
rgareus | e.g. the C++ class that represents the plugin in your host | 17:22 |
jcelerier | rgareus: that's what I feared :( ("the current instance") | 17:22 |
rgareus | what's the issue with that? | 17:23 |
rgareus | it does not even need to be the plugin instance | 17:23 |
rgareus | but the worker instance | 17:24 |
jcelerier | that's very bug prone, you have to take more care with threading, etc... | 17:25 |
rgareus | no it isn't the LV2 specs are very precise about threading | 17:25 |
jcelerier | & I would assume that the worker instance would be per-plugin that has the "worker" feature, so generally stored in the same struct or something like this | 17:25 |
rgareus | the worker is self contained | 17:26 |
jcelerier | ...yes, that does not remove the human error factor :p | 17:26 |
rgareus | ? | 17:26 |
rgareus | you create a new worker instance. and pass a pointer to that instance as handle. | 17:26 |
jcelerier | the spec could be as precise as possible, it doesn't prevent humans from not following the spec | 17:27 |
rgareus | the same is true for the plugin itself. if an audio plugin does something stupid in run() same thing | 17:27 |
jcelerier | that's why most people prefer languages where it's hard to shoot yourself in the foot | 17:27 |
rgareus | sadly most of those languages are neither efficient not realtime safe. | 17:28 |
rgareus | rust may count. or lua maybe. but other than that options apart from C, C++ and asm are slim if noexistent | 17:29 |
rgareus | jcelerier: http://pastebin.com/Gr3kx5Vt is some code that I've recently used in a LV2 host | 17:35 |
rgareus | C++ in this case | 17:35 |
rgareus | it doesn't include the ringbuffer. | 17:37 |
rgareus | ardour has similar code as well: https://github.com/Ardour/ardour/blob/master/libs/ardour/worker.cc | 17:38 |
rgareus | "most people prefer languages where it's hard to shoot yourself in the foot" -- I wonder where that leaves the French :) | 17:46 |
jcelerier | rgareus: sorry, had to go out quickly | 18:41 |
jcelerier | french shoots arrows at girl's hearths, of course | 18:42 |
jcelerier | thanks for the code snippets | 18:42 |
jcelerier | are there many french people here ? | 18:43 |
rgareus | je ne sais pas | 18:48 |
*** rncbc has quit IRC | 18:51 | |
jcelerier | oki | 18:52 |
*** unclechu has quit IRC | 19:40 | |
*** frinknet_ has quit IRC | 19:59 | |
*** jcelerier has quit IRC | 20:20 | |
*** jcelerier has joined #lv2 | 20:39 | |
jcelerier | there's something dubious either in the docs or in jalv | 21:01 |
jcelerier | the docs says " The instance should cast this data pointer to const LV2_Options_Option* and scan the array for any options of interest " | 21:02 |
jcelerier | but here, in jalv, it does pass a LV2_Options_Option*: "https://github.com/x42/jalv/blob/c3aa280b83c3ebf70192eb30d3e66efc0539ce37/src/jalv.c#L1422" | 21:02 |
jcelerier | ** | 21:02 |
jcelerier | or in the actual source code at line 1089 : http://git.drobilla.net/cgit.cgi/jalv.git/tree/src/jalv.c | 21:03 |
rgareus | best use upstream http://git.drobilla.net/cgit.cgi/jalv.git/ | 21:03 |
rgareus | hah | 21:03 |
jcelerier | yeah, I hadn't noticed this wasn't upstream | 21:04 |
rgareus | well options_feature.data = &options; | 21:04 |
rgareus | looks fine to me | 21:05 |
jcelerier | shouldn't it be &options[0] ? | 21:05 |
rgareus | that'd be a pointer to the first element. | 21:06 |
jcelerier | which would be of type LV2_Options_Option | 21:06 |
jcelerier | * | 21:06 |
rgareus | well in jalv's case it's on the stack | 21:06 |
jcelerier | here it's of type LV2_Options_Option** | 21:06 |
rgareus | in a multi-plugin host, you may want to malloc it | 21:06 |
rgareus | jcelerier: did you get the worker working? | 21:07 |
jcelerier | I'm working on it :p | 21:10 |
*** oofus has quit IRC | 21:32 | |
trebmuh | jcelerier, y'en a un au moins :) | 22:11 |
ColaEuphoria | フランス語だろう? | 22:12 |
trebmuh | ColaEuphoria, yes I am :) | 22:13 |
*** jcelerier has quit IRC | 22:15 | |
*** rncbc has joined #lv2 | 22:17 | |
*** edogawa has joined #lv2 | 22:28 | |
*** jcelerier has joined #lv2 | 22:31 | |
*** rncbc has quit IRC | 23:06 | |
*** dsheeler has quit IRC | 23:37 | |
*** edogawa has quit IRC | 23:50 |
Generated by irclog2html.py 2.13.0 by Marius Gedminas - find it at mg.pov.lt!