summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_portaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/out/ao_portaudio.c')
-rw-r--r--audio/out/ao_portaudio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/audio/out/ao_portaudio.c b/audio/out/ao_portaudio.c
index d75fad0aca..9c0d7804f8 100644
--- a/audio/out/ao_portaudio.c
+++ b/audio/out/ao_portaudio.c
@@ -280,13 +280,13 @@ error_exit:
return -1;
}
-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;
pthread_mutex_lock(&priv->ring_mutex);
- int write_len = mp_ring_write(priv->ring, data, len);
+ int write_len = mp_ring_write(priv->ring, data[0], samples * ao->sstride);
if (flags & AOPLAY_FINAL_CHUNK)
priv->play_remaining = true;
@@ -295,7 +295,7 @@ static int play(struct ao *ao, void *data, int len, int flags)
if (Pa_IsStreamStopped(priv->stream) == 1)
check_pa_ret(Pa_StartStream(priv->stream));
- return write_len;
+ return write_len / ao->sstride;
}
static int get_space(struct ao *ao)
@@ -308,7 +308,7 @@ static int get_space(struct ao *ao)
pthread_mutex_unlock(&priv->ring_mutex);
- return free;
+ return free / ao->sstride;
}
static float get_delay(struct ao *ao)