saugns.h 1.21 KB
Newer Older
1
/* saugns: Main functions and project definitions.
2
 * Copyright (c) 2011-2013, 2017-2020 Joel K. Pettersson
3
 * <joelkpettersson@gmail.com>.
4
5
6
 *
 * This file and the software of which it is part is distributed under the
 * terms of the GNU Lesser General Public License, either version 3 or (at
7
 * your option) any later version, WITHOUT ANY WARRANTY, not even of
8
9
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * View the file COPYING for details, or if missing, see
11
 * <https://www.gnu.org/licenses/>.
12
13
 */

14
#pragma once
Joel K. Pettersson's avatar
Joel K. Pettersson committed
15
#include "ptrarr.h"
16
#include "program.h"
17

18
19
20
21
/*
 * Configuration options.
 */

22
#define SAU_CLINAME_STR "saugns"
Joel K. Pettersson's avatar
Joel K. Pettersson committed
23
#define SAU_VERSION_STR "v0.3.7b"
24

25
#define SAU_DEFAULT_SRATE 96000
26

27
28
29
/* Print symtab test statistics? */
#define SAU_SYMTAB_STATS 0

30
31
32
33
/**
 * Command line options flags.
 */
enum {
34
35
36
37
38
39
	SAU_ARG_MODE_FULL     = 1<<0,
	SAU_ARG_AUDIO_ENABLE  = 1<<1,
	SAU_ARG_AUDIO_DISABLE = 1<<2,
	SAU_ARG_MODE_CHECK    = 1<<3,
	SAU_ARG_PRINT_INFO    = 1<<4,
	SAU_ARG_EVAL_STRING   = 1<<5,
40
41
};

42
43
size_t SAU_build(const SAU_PtrArr *restrict script_args, uint32_t options,
		SAU_PtrArr *restrict prg_objs);
44

45
bool SAU_play(const SAU_PtrArr *restrict prg_objs, uint32_t srate,
46
		uint32_t options, const char *restrict wav_path);