mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-19 22:34:18 +02:00
fixed callback return code
The callback should use the value of stop_requested as its return code.
This commit is contained in:
parent
0238baa5c2
commit
58f09983f8
1 changed files with 3 additions and 1 deletions
4
alsa.c
4
alsa.c
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue