#ifndef UDO_HOSTTOOLS #define UDO_HOSTTOOLS ## /* Host system tools for interoperability between windows/linux setups This file is part of the SONICS UDO collection by Richard Knight 2021 License: GPL-2.0-or-later http://1bpm.net */ #include "__config__.udo" #include "host_platform.udo" /* Get the path to the shared general audio repository with a trailing slash Spath _dir_audio Spath the relevant resulting path */ opcode _dir_audio, S, 0 xout (gihost_type == 1) ? gSpath_baseLin : gSpath_baseWin endop /* Get a full path of subdirectories in the soundfont directory SfullPath dir_soundfont Spath SfullPath the full path as specified Sfile the last part of the path, after Soundfont/ , ie no initial slash */ opcode dir_soundfont, S, S Spath xin xout strcat(strcat(_dir_audio(), gSpath_soundfont), Spath) endop /* Get a full path of subdirectories in the samples directory SfullPath dir_samples Spath SfullPath the full path as specified Spath the last part of the path, after Samples/ , ie no initial slash */ opcode dir_samples, S, S Spath xin xout strcat(strcat(_dir_audio(), gSpath_samples), Spath) endop /* Get a full path of subdirectories in the random directory SfullPath dir_random Spath SfullPath the full path as specified Spath the last part of the path, after Random/ , ie no initial slash */ opcode dir_random, S, S Spath xin xout strcat(strcat(_dir_audio(), gSpath_random), Spath) endop #end