summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_null.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/out/ao_null.c')
-rw-r--r--audio/out/ao_null.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/audio/out/ao_null.c b/audio/out/ao_null.c
index 75e812b238..7470d9a824 100644
--- a/audio/out/ao_null.c
+++ b/audio/out/ao_null.c
@@ -96,18 +96,19 @@ static int get_space(struct ao *ao)
struct priv *priv = ao->priv;
drain(ao);
- return priv->buffersize - priv->buffered_bytes;
+ return (priv->buffersize - priv->buffered_bytes) / ao->sstride;
}
-static int play(struct ao *ao, void *data, int len, int flags)
+static int play(struct ao *ao, void **data, int samples, int flags)
{
struct priv *priv = ao->priv;
+ int len = samples * ao->sstride;
int maxbursts = (priv->buffersize - priv->buffered_bytes) / priv->outburst;
int playbursts = len / priv->outburst;
int bursts = playbursts > maxbursts ? maxbursts : playbursts;
priv->buffered_bytes += bursts * priv->outburst;
- return bursts * priv->outburst;
+ return (bursts * priv->outburst) / ao->sstride;
}
static float get_delay(struct ao *ao)