justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: Dear Justin, thanks a lot for REAPER! It has been my DAW of choice for almost 8 years or so and it has never let me down :-) I have a rather technical question: I thinking about adding bit briding support to my VST host, what is the best way to communicate between the 64-bit host and the 32-bit subprocess? pipes or shared memory or something else?
Asked by Christof (193.170.190.x) on October 16 2019, 7:36am
Reply on October 16 2019, 1:48pm:


Comments:
  • Posted by Christof (193.170.190.x) on October 16 2019, 2:52pm:
    Awesome, thanks! Great to see it's part of WDL, so I don't have to use Boost :-)

  • Posted by Justin on October 16 2019, 3:42pm:
    Sorry it's so poorly documented...

  • Posted by Christof (193.170.190.x) on October 16 2019, 5:05pm:
    No worries! Now that I had a look a the sources, the non-Windows version of the shared memory interface uses sockets instead of actual shared memory (via shm_open), is there a specific reason for this?

  • Posted by Justin on October 16 2019, 5:08pm:
    Ah yeah, because you ended up having to use a socket in order to synchronize (the equivalent of a named event which is used on Windows), so might as well shove the data through there anyway, which works well.

  • Posted by Christof (193.170.190.x) on October 16 2019, 5:44pm:
    I see! I did some quick searching and it looks like you can use a pthreads semaphore across processes, see stackoverflow.com/questions/143642...or man7.org/linux/man-pages/man3/sem_...

  • Posted by Justin on October 16 2019, 7:45pm:
    Heh if you want to convert it and see if shm/semaphore is faster, be my guest ;) What about on macOS?

  • Posted by Christof (193.170.190.x) on October 16 2019, 8:41pm:
    Ha! Looks like OSX doesn't support unnamed semaphores, but apparantly you can achieve the same thing with GCD's dispatch_semaphore_t. Anyway, I'll try to implement it and benchmark against the socket implementation (but not before December). Actually, I thought 32-bit plugins are mainly a Windows thing, but then I got some feature requests from macOS users who still use 32-bit plugins (and they won't upgrade to Catalina :-D)


Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2024 Justin Frankel. | RSS