Browse Source

code cleanup: static uri_callback

master
Yury Popov 2 years ago
parent
commit
fdc2984386
No account linked to committer's email address
3 changed files with 9 additions and 7 deletions
  1. 0
    6
      src/libespeak-ng/speech.c
  2. 9
    0
      src/libespeak-ng/ssml.c
  3. 0
    1
      src/libespeak-ng/translate.h

+ 0
- 6
src/libespeak-ng/speech.c View File

@@ -84,7 +84,6 @@ static int min_buffer_length = 60; // minimum buffer length in ms
static espeak_ng_STATUS err = ENS_OK;

static t_espeak_callback *synth_callback = NULL;
int (*uri_callback)(int, const char *, const char *) = NULL;
int (*phoneme_callback)(const char *) = NULL;

char path_home[N_PATH_HOME]; // this is the espeak-ng-data directory
@@ -654,11 +653,6 @@ ESPEAK_API void espeak_SetSynthCallback(t_espeak_callback *SynthCallback)
#endif
}

ESPEAK_API void espeak_SetUriCallback(int (*UriCallback)(int, const char *, const char *))
{
uri_callback = UriCallback;
}

ESPEAK_API void espeak_SetPhonemeCallback(int (*PhonemeCallback)(const char *))
{
phoneme_callback = PhonemeCallback;

+ 9
- 0
src/libespeak-ng/ssml.c View File

@@ -87,6 +87,8 @@ static const MNEM_TAB ssmltags[] = {
{ NULL, 0 }
};

static int (*uri_callback)(int, const char *, const char *) = NULL;

static int attrcmp(const wchar_t *string1, const char *string2)
{
int ix;
@@ -973,6 +975,13 @@ int ProcessSsmlTag(wchar_t *xml_buf, char *outbuf, int *outix, int n_outbuf, con
return 0;
}

#pragma GCC visibility push(default)
ESPEAK_API void espeak_SetUriCallback(int (*UriCallback)(int, const char *, const char *))
{
uri_callback = UriCallback;
}
#pragma GCC visibility pop

static const MNEM_TAB xml_entity_mnemonics[] = {
{ "gt", '>' },
{ "lt", 0xe000 + '<' }, // private usage area, to avoid confusion with XML tag

+ 0
- 1
src/libespeak-ng/translate.h View File

@@ -649,7 +649,6 @@ extern char dictionary_name[40];
extern espeak_ng_TEXT_DECODER *p_decoder;
extern int dictionary_skipwords;

extern int (*uri_callback)(int, const char *, const char *);
extern int (*phoneme_callback)(const char *);

#define LEADING_2_BITS 0xC0 // 0b11000000

Loading…
Cancel
Save