Path: blob/master/thirdparty/linuxbsd_headers/speechd/spd_audio_plugin.h
10278 views
/*1* spd_audio_plugin.h -- The SPD Audio Plugin Header2*3* Copyright (C) 2004 Brailcom, o.p.s.4*5* This is free software; you can redistribute it and/or modify it under the6* terms of the GNU Lesser General Public License as published by the Free7* Software Foundation; either version 2.1, or (at your option) any later8* version.9*10* This software is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU13* General Public License for more details.14*15* You should have received a copy of the GNU Lesser General Public License16* along with this package; see the file COPYING. If not, write to the Free17* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA18* 02110-1301, USA.19*20*/2122#ifndef __SPD_AUDIO_PLUGIN_H23#define __SPD_AUDIO_PLUGIN_H2425#define SPD_AUDIO_PLUGIN_ENTRY_STR "spd_audio_plugin_get"2627/* *INDENT-OFF* */28#ifdef __cplusplus29extern "C" {30#endif31/* *INDENT-ON* */3233typedef enum { SPD_AUDIO_LE, SPD_AUDIO_BE } AudioFormat;3435typedef struct {36int bits;37int num_channels;38int sample_rate;3940int num_samples;41signed short *samples;42} AudioTrack;4344struct spd_audio_plugin;4546typedef struct {4748int volume;49AudioFormat format;5051struct spd_audio_plugin const *function;52void *private_data;5354int working;55} AudioID;5657typedef struct spd_audio_plugin {58const char *name;59AudioID *(*open) (void **pars);60int (*play) (AudioID * id, AudioTrack track);61int (*stop) (AudioID * id);62int (*close) (AudioID * id);63int (*set_volume) (AudioID * id, int);64void (*set_loglevel) (int level);65char const *(*get_playcmd) (void);66} spd_audio_plugin_t;6768/* *INDENT-OFF* */69#ifdef __cplusplus70}71#endif /* __cplusplus */72/* *INDENT-ON* */7374#endif /* ifndef #__SPD_AUDIO_PLUGIN_H */757677