Browse Source

Fix audio output in espeak-ng when USE_ASYNC is not defined.

master
Reece H. Dunn 9 years ago
parent
commit
f07dc419a6
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      src/libespeak-ng/speech.c

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

option_waveout = 1; // inhibit portaudio callback from wavegen.cpp option_waveout = 1; // inhibit portaudio callback from wavegen.cpp
out_samplerate = 0; out_samplerate = 0;


#ifdef USE_ASYNC
if (output_mode == (ENOUTPUT_MODE_SYNCHRONOUS | ENOUTPUT_MODE_SPEAK_AUDIO)) { if (output_mode == (ENOUTPUT_MODE_SYNCHRONOUS | ENOUTPUT_MODE_SPEAK_AUDIO)) {
#else
if ((output_mode & ENOUTPUT_MODE_SPEAK_AUDIO) == ENOUTPUT_MODE_SPEAK_AUDIO) {
#endif
option_waveout = 0; option_waveout = 0;
WavegenInitSound(); WavegenInitSound();
} }


SpeakNextClause(NULL, text, 0); SpeakNextClause(NULL, text, 0);


#ifdef USE_ASYNC
if (my_mode == (ENOUTPUT_MODE_SYNCHRONOUS | ENOUTPUT_MODE_SPEAK_AUDIO)) { if (my_mode == (ENOUTPUT_MODE_SYNCHRONOUS | ENOUTPUT_MODE_SPEAK_AUDIO)) {
#else
if ((my_mode & ENOUTPUT_MODE_SPEAK_AUDIO) == ENOUTPUT_MODE_SPEAK_AUDIO) {
#endif
bool continue_speaking = true; bool continue_speaking = true;
while (continue_speaking) { while (continue_speaking) {
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS

Loading…
Cancel
Save