1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
#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
|