summaryrefslogtreecommitdiff
path: root/modules/rst
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2014-04-20 13:42:12 +0200
committerAlfred E. Heggestad <aeh@db.org>2014-04-20 13:42:12 +0200
commitb0f2225587c7fb6244557ed09cdf63e5ac022d6c (patch)
treef24c30439f9e9b52990c9c2d787ba8c4c2878de9 /modules/rst
parent2e3fca77376eb24962ae1b6b3dbac92bd1f0317c (diff)
rst: remove psize, use sampc instead
Diffstat (limited to 'modules/rst')
-rw-r--r--modules/rst/audio.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/rst/audio.c b/modules/rst/audio.c
index 8d2a2a8..0a12640 100644
--- a/modules/rst/audio.c
+++ b/modules/rst/audio.c
@@ -26,7 +26,6 @@ struct ausrc_st {
ausrc_error_h *errh;
void *arg;
bool run;
- uint32_t psize;
uint32_t ptime;
size_t sampc;
};
@@ -63,7 +62,7 @@ static void *play_thread(void *arg)
struct ausrc_st *st = arg;
int16_t *sampv;
- sampv = mem_alloc(st->psize, NULL);
+ sampv = mem_alloc(st->sampc * 2, NULL);
if (!sampv)
return NULL;
@@ -192,10 +191,9 @@ static int alloc_handler(struct ausrc_st **stp, struct ausrc *as,
st->sampc = prm->srate * prm->ch * prm->ptime / 1000;
st->ptime = prm->ptime;
- st->psize = st->sampc * 2;
- re_printf("rst: audio ptime=%u psize=%u aubuf=[%u:%u]\n",
- st->ptime, st->psize,
+ re_printf("rst: audio ptime=%u sampc=%zu aubuf=[%u:%u]\n",
+ st->ptime, st->sampc,
prm->srate * prm->ch * 2,
prm->srate * prm->ch * 40);