mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-12-03 23:09:52 +00:00
Fix audio output in espeak-ng when USE_ASYNC is not defined.
This commit is contained in:
@@ -212,7 +212,11 @@ ESPEAK_NG_API espeak_ng_STATUS espeak_ng_InitializeOutput(espeak_ng_OUTPUT_MODE
|
|||||||
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();
|
||||||
}
|
}
|
||||||
@@ -382,7 +386,11 @@ static espeak_ng_STATUS Synthesize(unsigned int unique_identifier, const void *t
|
|||||||
|
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user