Files
espeak-ng/src/libespeak-ng/soundicon.h
T
Juho Hiltunen 6e197d967e code cleanup: move soundicon logic to a new file
Soundicons are used for external audio with SSML <audio> tag and for
replacing punctuation names with sound files in LoadConfig().

Currently there's a bug wih soundicon slots: if both LoadConfig and
<audio> are used, the punctuation reserves all slots and no sound from
<audio> is played.
2021-03-21 18:53:05 +02:00

51 lines
1.4 KiB
C

/*
* Copyright (C) 2005 to 2014 by Jonathan Duddington
* email: jonsd@users.sourceforge.net
* Copyright (C) 2015-2017 Reece H. Dunn
* Copyright (C) 2021 Juho Hiltunen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see: <http://www.gnu.org/licenses/>.
*/
#ifndef ESPEAK_NG_SOUNDICON_H
#define ESPEAK_NG_SOUNDICON_H
#ifdef __cplusplus
extern "C"
{
#endif
int LookupSoundicon(int c);
int LoadSoundFile2(const char *fname);
typedef struct {
int name;
int length;
char *data;
char *filename;
} SOUND_ICON;
#define N_SOUNDICON_TAB 80 // total entries in soundicon_tab
#define N_SOUNDICON_SLOTS 4 // number of slots reserved for dynamic loading of audio files
extern int n_soundicon_tab;
extern SOUND_ICON soundicon_tab[N_SOUNDICON_TAB];
#ifdef __cplusplus
}
#endif
#endif