From 601fb2f93a1afa261a073665146587d16848086b Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 23 Sep 2014 22:47:14 +0200 Subject: ao_pulse: use pa_stream_new_extended() Needed for compressed audio pass-through later. --- audio/out/ao_pulse.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'audio') diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c index fa8a6a46be..1591ba6e3f 100644 --- a/audio/out/ao_pulse.c +++ b/audio/out/ao_pulse.c @@ -274,6 +274,7 @@ static int init(struct ao *ao) struct pa_sample_spec ss; struct pa_channel_map map; pa_proplist *proplist = NULL; + pa_format_info *format = NULL; struct priv *priv = ao->priv; char *host = priv->cfg_host && priv->cfg_host[0] ? priv->cfg_host : NULL; char *sink = priv->cfg_sink && priv->cfg_sink[0] ? priv->cfg_sink : NULL; @@ -347,9 +348,11 @@ static int init(struct ao *ao) (void)pa_proplist_sets(proplist, PA_PROP_MEDIA_ICON_NAME, PULSE_CLIENT_NAME); - if (!(priv->stream = pa_stream_new_with_proplist(priv->context, - "audio stream", &ss, - &map, proplist))) + if (!(format = pa_format_info_from_sample_spec(&ss, &map))) + goto unlock_and_fail; + + if (!(priv->stream = pa_stream_new_extended(priv->context, "audio stream", + &format, 1, proplist))) goto unlock_and_fail; pa_proplist_free(proplist); @@ -392,6 +395,8 @@ unlock_and_fail: pa_threaded_mainloop_unlock(priv->mainloop); fail: + if (format) + pa_format_info_free(format); if (priv->context) { if (!(pa_context_errno(priv->context) == PA_ERR_CONNECTIONREFUSED && ao->probing)) -- cgit v1.2.3