diff options
| author | XANTRONIX Development | 2022-02-02 00:46:14 -0500 | 
|---|---|---|
| committer | XANTRONIX Development | 2022-02-02 00:46:14 -0500 | 
| commit | 23044950ddda47604d30fd81127647707dcce09c (patch) | |
| tree | a58dceeb4ce44d74d800bcbc1e61e1e0bbea96db | |
| parent | ba025f66532913d20604e74ab7b4530d8b3caacf (diff) | |
| download | xas-23044950ddda47604d30fd81127647707dcce09c.tar.gz xas-23044950ddda47604d30fd81127647707dcce09c.tar.bz2 xas-23044950ddda47604d30fd81127647707dcce09c.zip | |
Implement xas_vox_active()
Implement xas_vox_active() to return true if the voice module is
currently active
| -rw-r--r-- | include/xas/vox.h | 2 | ||||
| -rw-r--r-- | src/vox.c | 4 | 
2 files changed, 6 insertions, 0 deletions
| diff --git a/include/xas/vox.h b/include/xas/vox.h index 3a940d5..43a41dd 100644 --- a/include/xas/vox.h +++ b/include/xas/vox.h @@ -46,6 +46,8 @@ int xas_vox_sayf(xas_vox *vox, const char *message, ...);  int xas_vox_say(xas_vox *vox, const char *message); +int xas_vox_active(xas_vox *vox); +  xas_audio_stream *xas_vox_stream_new(xas_vox *vox);  #endif /* _XAS_VOX_H */ @@ -267,6 +267,10 @@ int xas_vox_say(xas_vox *vox, const char *message) {      return xas_vox_sayf(vox, "%s", message);  } +int xas_vox_active(xas_vox *vox) { +    return vox->flags & XAS_VOX_ACTIVE; +} +  xas_audio_stream *xas_vox_stream_new(xas_vox *vox) {      return xas_audio_stream_new_source((xas_audio_fill)vox_fill,                                           (xas_audio_cleanup)vox_cleanup, | 
 
    