fixed callback return code

The callback should use the value of stop_requested as its return code.
This commit is contained in:
William Hubbs 2009-06-28 15:52:59 -05:00
commit 58f09983f8

4
alsa.c
View file

@ -70,6 +70,7 @@ static int alsa_callback(short *audio, int numsamples, espeak_EVENT * events)
int to_write;
snd_pcm_state_t state;
int user_data_new;
int rc = 0;
lock_audio_mutex();
user_data_new = *(int *) events->user_data;
@ -123,8 +124,9 @@ static int alsa_callback(short *audio, int numsamples, espeak_EVENT * events)
}
lock_audio_mutex();
}
rc = stop_requested;
unlock_audio_mutex();
return 0;
return rc;
}
void select_audio_mode(void)