Csound Csound-dev Csound-tekno Search About

[Csnd] Feature Request: platform specific macros

Date2013-10-19 08:31
FromEduardo Moguillansky
Subject[Csnd] Feature Request: platform specific macros
Hi

I am developing an instrument using csound as the audio engine. I need to support both OSX and Linux but certain opcodes need to be changed in subtle ways in order to ensure the same response.
The best solution so far has been to do partial compilation using macros (#ifdef).  My request is: would it be possible to have a predefined macro indicating the platform where csound is running?

something like

#ifdef PLATFORM_DARWIN
platform specific code goes here
#endif

#ifdef PLATFORM_LINUX
...
#endif

Thank you!
Eduardo