[CSOUND-DEV:3640] Re: Environment Variables
| Date | 2003-12-04 21:17 |
| From | Richard Dobson |
| Subject | [CSOUND-DEV:3640] Re: Environment Variables |
Does it need to be via the API? You can just call the C library function getenv() with the required names. Richard Dobson steven wrote: > Hi all, > > Is there a way through the host API or GLOBALS/ENVIRON struct to get > SFDIR, SSDIR, SADIR, etc.? > > thanks, > steven > > |
| Date | 2003-12-04 21:22 |
| From | steven |
| Subject | [CSOUND-DEV:3639] Environment Variables |
Hi all, Is there a way through the host API or GLOBALS/ENVIRON struct to get SFDIR, SSDIR, SADIR, etc.? thanks, steven |
| Date | 2003-12-04 21:42 |
| From | steven |
| Subject | [CSOUND-DEV:3641] Re: Environment Variables |
I thought about that, but there's this in the csound.h:
/**
* Sets an evironment path for a getenv() call in Csound.
* you can also use this method as a way to have different
* csound instances have different default directories,
* change the default dirs during performance, etc..
*
* Currently, Csound uses these 'envi' names only:
* "SSDIR", "SFDIR", "SADIR", "SFOUTYP", "INCDIR",
* "CSSTRNGS", "MIDIOUTDEV", and "HOME"
*/
PUBLIC void csoundSetEnv(void *csound, const char
*environmentVariableName, const char *path);
So I figured a corresponding call would make sense in this case.
steven
Richard Dobson wrote:
> Does it need to be via the API? You can just call the C library
> function getenv() with the required names.
>
> Richard Dobson
>
>
>
> steven wrote:
>
>> Hi all,
>>
>> Is there a way through the host API or GLOBALS/ENVIRON struct to get
>> SFDIR, SSDIR, SADIR, etc.?
>>
>> thanks,
>> steven
>>
>>
>
>
> |
| Date | 2003-12-04 22:00 |
| From | Richard Dobson |
| Subject | [CSOUND-DEV:3646] Re: Environment Variables |
Indeed so; I hadn't allowed for the possibility of a ~set~ function without a matching ~get~ in the API. :-) Richard Dobson steven wrote: > I thought about that, but there's this in the csound.h: > > /** > * Sets an evironment path for a getenv() call in Csound. > * you can also use this method as a way to have different > * csound instances have different default directories, > * change the default dirs during performance, etc.. > * > * Currently, Csound uses these 'envi' names only: > * "SSDIR", "SFDIR", "SADIR", "SFOUTYP", "INCDIR", > * "CSSTRNGS", "MIDIOUTDEV", and "HOME" > */ > PUBLIC void csoundSetEnv(void *csound, const char > *environmentVariableName, const char *path); > > So I figured a corresponding call would make sense in this case. > steven > |
| Date | 2003-12-04 23:02 |
| From | steven |
| Subject | [CSOUND-DEV:3649] Re: Environment Variables |
=) I ended up using getenv anyways and have my soundFonts loading now from SSDIR and SFDIR(which is nice as I keep a copy of SSDIR synced up on different computers and only have to worry about moving the work files in between). I figure the opcode lib stuff is going through some reworking anyways so might as well go with the perfectly fine interim solution. steven Richard Dobson wrote: > Indeed so; I hadn't allowed for the possibility of a ~set~ function > without a matching ~get~ in the API. > :-) > > > Richard Dobson > |