Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/linuxbsd_headers/speechd/spd_audio_plugin.h
10278 views
1
/*
2
* spd_audio_plugin.h -- The SPD Audio Plugin Header
3
*
4
* Copyright (C) 2004 Brailcom, o.p.s.
5
*
6
* This is free software; you can redistribute it and/or modify it under the
7
* terms of the GNU Lesser General Public License as published by the Free
8
* Software Foundation; either version 2.1, or (at your option) any later
9
* version.
10
*
11
* This software is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this package; see the file COPYING. If not, write to the Free
18
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19
* 02110-1301, USA.
20
*
21
*/
22
23
#ifndef __SPD_AUDIO_PLUGIN_H
24
#define __SPD_AUDIO_PLUGIN_H
25
26
#define SPD_AUDIO_PLUGIN_ENTRY_STR "spd_audio_plugin_get"
27
28
/* *INDENT-OFF* */
29
#ifdef __cplusplus
30
extern "C" {
31
#endif
32
/* *INDENT-ON* */
33
34
typedef enum { SPD_AUDIO_LE, SPD_AUDIO_BE } AudioFormat;
35
36
typedef struct {
37
int bits;
38
int num_channels;
39
int sample_rate;
40
41
int num_samples;
42
signed short *samples;
43
} AudioTrack;
44
45
struct spd_audio_plugin;
46
47
typedef struct {
48
49
int volume;
50
AudioFormat format;
51
52
struct spd_audio_plugin const *function;
53
void *private_data;
54
55
int working;
56
} AudioID;
57
58
typedef struct spd_audio_plugin {
59
const char *name;
60
AudioID *(*open) (void **pars);
61
int (*play) (AudioID * id, AudioTrack track);
62
int (*stop) (AudioID * id);
63
int (*close) (AudioID * id);
64
int (*set_volume) (AudioID * id, int);
65
void (*set_loglevel) (int level);
66
char const *(*get_playcmd) (void);
67
} spd_audio_plugin_t;
68
69
/* *INDENT-OFF* */
70
#ifdef __cplusplus
71
}
72
#endif /* __cplusplus */
73
/* *INDENT-ON* */
74
75
#endif /* ifndef #__SPD_AUDIO_PLUGIN_H */
76
77