mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-02 22:07:12 +00:00
[1.38.03]
Fix crash with SSML <say-as>. Sada audio output now OK on big-endian processors. Don't reduce the pause before doubles stop consonants (eg.Finnish "kk") as much at high speeds. Language changes: pl (reduce length of stressed syllables, [i] closer, [f] stronger befiore [s]). git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@188 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -188,6 +188,25 @@ size_t wave_write(void* theHandler,
|
||||
SHOW_TIME("wave_write > my_callback_is_output_enabled: no!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
|
||||
{
|
||||
// BIG-ENDIAN, swap the order of bytes in each sound sample
|
||||
int c;
|
||||
char *out_ptr;
|
||||
char *out_end;
|
||||
out_ptr = (char *)theMono16BitsWaveBuffer;
|
||||
out_end = out_ptr + theSize;
|
||||
while(out_ptr < out_end)
|
||||
{
|
||||
c = out_ptr[0];
|
||||
out_ptr[0] = out_ptr[1];
|
||||
out_ptr[1] = c;
|
||||
out_ptr += 2;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
num = write((int) theHandler, theMono16BitsWaveBuffer, theSize);
|
||||
|
||||
// Keep track of the total number of samples sent -- we use this in
|
||||
|
||||
Reference in New Issue
Block a user