rorywalsh / cabbage

Framework for developing audio plugins with the Csound programming language.
http://cabbageaudio.com
GNU General Public License v3.0
509 stars 35 forks source link

stop setting CWD... #136

Closed rorywalsh closed 8 months ago

rorywalsh commented 1 year ago

This causes issues with certain hosts and is should be avoided where possible..

TartanLlama commented 1 year ago

Looking into getting ComboBoxes working without setting CWD atm. One issue is that CSound instructions like compileorc seem to rely on this (not sure if this is default behaviour or something which Cabbage does), so sending relative paths to them breaks. Users could handle this in their CSound code, but maybe you know of a better way?

rorywalsh commented 1 year ago

Csound typically uses the .csd location as the root dir unless otherwise specified. The issue I've seen in the past is that certain hosts will change CWD, which is why I resorted to changing it back. I guess the most robust way would be to handle this in Csound code. There is a reserved channel call CSD_PATH that will return the location of the current csd file. This could be used to create the correct paths to other assets. It might mean a bit of a rewriting in Lore though..

TartanLlama commented 1 year ago

Yeah, that's what I ended up doing, was just a couple lines!

rorywalsh commented 8 months ago

This has been addressed. Cabbage no longer sets CWD