summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/xas/bank.h2
-rw-r--r--src/bank.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/include/xas/bank.h b/include/xas/bank.h
index ab0c511..3ff5994 100644
--- a/include/xas/bank.h
+++ b/include/xas/bank.h
@@ -54,7 +54,7 @@ void xas_bank_entry_duration(xas_bank *bank,
ssize_t xas_bank_record(xas_bank *bank,
xas_audio_stream *source,
size_t entry_index,
- size_t count);
+ size_t entry_size);
ssize_t xas_bank_load_file(xas_bank *bank,
size_t entry_index,
diff --git a/src/bank.c b/src/bank.c
index f9f540d..735f479 100644
--- a/src/bank.c
+++ b/src/bank.c
@@ -51,10 +51,10 @@ static inline xas_bank_entry *entry_by_index(xas_bank *bank,
ssize_t xas_bank_record(xas_bank *bank,
xas_audio_stream *source,
size_t entry_index,
- size_t count) {
+ size_t entry_size) {
xas_bank_entry *entry = entry_by_index(bank, entry_index);
- size_t left = count,
+ size_t left = entry_size,
index_o = 0;
if (!xas_audio_format_eq(bank->format, source->format)) {
@@ -63,13 +63,13 @@ ssize_t xas_bank_record(xas_bank *bank,
goto error_invalid_format;
}
- if (count > bank->entry_size) {
- count = bank->entry_size;
+ if (entry_size > bank->entry_size) {
+ entry_size = bank->entry_size;
}
while (left) {
ssize_t readlen,
- amount = left > count? count: left;
+ amount = left > entry_size? entry_size: left;
void *buf;