diff options
author | XANTRONIX Development | 2022-03-07 13:10:41 -0500 |
---|---|---|
committer | XANTRONIX Development | 2022-03-07 13:10:41 -0500 |
commit | 563b5ba828d40c0c791e056504a53aa86ea359e1 (patch) | |
tree | b17b294c0c607859c3f0bf014d978e9203715df4 /src | |
parent | 5f2b64b0c667f754131bce652339f401324d72ca (diff) | |
download | xas-563b5ba828d40c0c791e056504a53aa86ea359e1.tar.gz xas-563b5ba828d40c0c791e056504a53aa86ea359e1.tar.bz2 xas-563b5ba828d40c0c791e056504a53aa86ea359e1.zip |
Implement xas_bank_entry_duration()
Implement xas_bank_entry_duration() to return the number of PCM
samples in a sample bank entry
Diffstat (limited to 'src')
-rw-r--r-- | src/bank.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |