diff options
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c index 1b1ba23ce8..43c3b0acdd 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -957,6 +957,24 @@ static void voice_stop(void) | |||
957 | pcmbuf_play_stop(); | 957 | pcmbuf_play_stop(); |
958 | #endif | 958 | #endif |
959 | } /* voice_stop */ | 959 | } /* voice_stop */ |
960 | |||
961 | /* Is voice still speaking */ | ||
962 | /* Unfortunately only reliable when music is not also playing. */ | ||
963 | static bool is_voice_speaking(void) | ||
964 | { | ||
965 | return is_voice_queued() | ||
966 | || voice_is_playing | ||
967 | || (!playing && pcm_is_playing()); | ||
968 | } | ||
969 | |||
970 | /* Wait for voice to finish speaking. */ | ||
971 | /* Also only reliable when music is not also playing. */ | ||
972 | void voice_wait(void) | ||
973 | { | ||
974 | while (is_voice_speaking()) | ||
975 | sleep(HZ/10); | ||
976 | } | ||
977 | |||
960 | #endif /* PLAYBACK_VOICE */ | 978 | #endif /* PLAYBACK_VOICE */ |
961 | 979 | ||
962 | static void set_filebuf_watermark(int seconds) | 980 | static void set_filebuf_watermark(int seconds) |