saugns.h 1.11 KB
Newer Older
1
/* saugns: Main functions and project definitions.
2
 * Copyright (c) 2011-2013, 2017-2021 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
15
#include "program.h"
16
#include "ptrarr.h"
17

18
#define SAU_CLINAME_STR "saugns"
Joel K. Pettersson's avatar
Joel K. Pettersson committed
19
#define SAU_VERSION_STR "v0.3.9"
20

21
#define SAU_DEFAULT_SRATE 96000
22

23
24
25
26
/**
 * Command line options flags.
 */
enum {
27
28
29
30
31
32
	SAU_OPT_MODE_FULL     = 1<<0,
	SAU_OPT_AUDIO_ENABLE  = 1<<1,
	SAU_OPT_AUDIO_DISABLE = 1<<2,
	SAU_OPT_MODE_CHECK    = 1<<3,
	SAU_OPT_PRINT_INFO    = 1<<4,
	SAU_OPT_EVAL_STRING   = 1<<5,
33
34
};

35
36
size_t SAU_load(const SAU_PtrArr *restrict script_args, uint32_t options,
		SAU_PtrArr *restrict prg_objs);
37

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