diff options
-rw-r--r-- | include/xas/bank.h | 2 | ||||
-rw-r--r-- | src/bank.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/xas/bank.h b/include/xas/bank.h index 6d7aeb1..a091d00 100644 --- a/include/xas/bank.h +++ b/include/xas/bank.h @@ -36,6 +36,8 @@ int xas_bank_play(xas_bank *bank, size_t entry, float force); void xas_bank_stop(xas_bank *bank); +int xas_bank_active(xas_bank *bank); + ssize_t xas_bank_record(xas_bank *bank, xas_audio_stream *input, size_t entry, @@ -52,6 +52,10 @@ void xas_bank_stop(xas_bank *bank) { bank->index = 0; } +int xas_bank_active(xas_bank *bank) { + return bank->flags & XAS_BANK_ACTIVE; +} + static inline void *ptr(xas_audio_stream *stream, void *buf, size_t index) { return ((uint8_t *)buf) + stream->channels * stream->sample_size * index; } |