From 7c4f8a3b7c1b425f4edbffe91fd01ef9881ecad1 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Thu, 3 Feb 2022 18:03:29 -0500 Subject: Implement xas_bank_active() Implement xas_bank_active() to allow one to determine if a sample bank is currently active --- src/bank.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/bank.c b/src/bank.c index 957d6c0..ca07e6f 100644 --- a/src/bank.c +++ b/src/bank.c @@ -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; } -- cgit v1.2.3