diff options
-rw-r--r-- | include/xas/bank.h | 2 | ||||
-rw-r--r-- | src/bank.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/xas/bank.h b/include/xas/bank.h index 716ad64..7828587 100644 --- a/include/xas/bank.h +++ b/include/xas/bank.h @@ -46,6 +46,8 @@ xas_bank *xas_bank_new(xas_audio_format format, void xas_bank_destroy(xas_bank *bank); +size_t xas_bank_entry_duration(xas_bank *bank, size_t entry_index); + ssize_t xas_bank_record(xas_bank *bank, xas_audio_stream *input, size_t entry_index, @@ -162,6 +162,12 @@ void xas_bank_player_destroy(xas_bank_player *player) { free(player); } +size_t xas_bank_entry_duration(xas_bank *bank, size_t entry_index) { + xas_bank_entry *entry = entry_by_index(bank, entry_index); + + return entry->duration; +} + int xas_bank_player_set_entry(xas_bank_player *player, size_t entry) { if (entry > player->bank->entry_count) { errno = EINVAL; |