summaryrefslogtreecommitdiff
path: root/test/mock/mock_auplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/mock/mock_auplay.c')
-rw-r--r--test/mock/mock_auplay.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/mock/mock_auplay.c b/test/mock/mock_auplay.c
index 9857d9f..2a4ffcc 100644
--- a/test/mock/mock_auplay.c
+++ b/test/mock/mock_auplay.c
@@ -4,6 +4,7 @@
* Copyright (C) 2010 - 2016 Creytiv.com
*/
#include <re.h>
+#include <rem.h>
#include <baresip.h>
#include "../test.h"
@@ -13,7 +14,7 @@ struct auplay_st {
struct tmr tmr;
struct auplay_prm prm;
- int16_t *sampv;
+ void *sampv;
size_t sampc;
auplay_write_h *wh;
void *arg;
@@ -72,7 +73,7 @@ static int mock_auplay_alloc(struct auplay_st **stp, const struct auplay *ap,
st->sampc = prm->srate * prm->ch * prm->ptime / 1000;
- st->sampv = mem_zalloc(2 * st->sampc, NULL);
+ st->sampv = mem_zalloc(aufmt_sample_size(prm->fmt) * st->sampc, NULL);
if (!st->sampv) {
err = ENOMEM;
goto out;