MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / xlate_word

Function xlate_word

extlibs/soloud/src/audiosource/speech/tts.cpp:1232–1261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1230}
1231
1232static int xlate_word(const char *word, int n, darray *phone)
1233{
1234 int nph = 0;
1235
1236 if (*word != '[')
1237 {
1238 if (suspect_word(word, n))
1239 return spell_out(word, n, phone);
1240 else
1241 {
1242 nph += NRL(word, n, phone);
1243 }
1244 }
1245
1246 else
1247 {
1248 if ((++word)[(--n) - 1] == ']')
1249 n--;
1250
1251 while (n-- > 0)
1252 {
1253 phone->put(*word++);
1254 nph++;
1255 }
1256 }
1257
1258 phone->put(' ');
1259
1260 return nph + 1;
1261}
1262
1263
1264int xlate_string(const char *string, darray *phone)

Callers 1

xlate_stringFunction · 0.85

Calls 4

suspect_wordFunction · 0.85
spell_outFunction · 0.85
NRLFunction · 0.85
putMethod · 0.80

Tested by

no test coverage detected