summaryrefslogtreecommitdiffstats
path: root/src/pulse/scache.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-09-14 16:25:35 +0800
committerDaniel Mack <daniel@caiaq.de>2009-09-14 16:25:35 +0800
commitbebaa491650c48697b861ec5e76816e9af1a8803 (patch)
treeb57d38476473f8fc6e282f8c39f730c936fa10d4 /src/pulse/scache.c
parentc6d330ef91ce401660f907536b1bfd0591c14c2a (diff)
parent180ef1eebdfbdf0220af1fb5e4bf43e348207cde (diff)
Merge branch 'master' of git://0pointer.de/pulseaudio
Diffstat (limited to 'src/pulse/scache.c')
-rw-r--r--src/pulse/scache.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/pulse/scache.c b/src/pulse/scache.c
index 77f60d72..27da6887 100644
--- a/src/pulse/scache.c
+++ b/src/pulse/scache.c
@@ -187,7 +187,7 @@ pa_operation *pa_context_play_sample(pa_context *c, const char *name, const char
pa_tagstruct_putu32(t, PA_INVALID_INDEX);
pa_tagstruct_puts(t, dev);
- if (volume == (pa_volume_t) -1 && c->version < 15)
+ if (volume == PA_VOLUME_INVALID && c->version < 15)
volume = PA_VOLUME_NORM;
pa_tagstruct_putu32(t, volume);
@@ -216,7 +216,6 @@ pa_operation *pa_context_play_sample_with_proplist(pa_context *c, const char *na
PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(c, name && *name, PA_ERR_INVALID);
PA_CHECK_VALIDITY_RETURN_NULL(c, !dev || *dev, PA_ERR_INVALID);
- PA_CHECK_VALIDITY_RETURN_NULL(c, p, PA_ERR_INVALID);
PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 13, PA_ERR_NOTSUPPORTED);
o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
@@ -228,12 +227,19 @@ pa_operation *pa_context_play_sample_with_proplist(pa_context *c, const char *na
pa_tagstruct_putu32(t, PA_INVALID_INDEX);
pa_tagstruct_puts(t, dev);
- if (volume == (pa_volume_t) -1 && c->version < 15)
+ if (volume == PA_VOLUME_INVALID && c->version < 15)
volume = PA_VOLUME_NORM;
pa_tagstruct_putu32(t, volume);
pa_tagstruct_puts(t, name);
- pa_tagstruct_put_proplist(t, p);
+
+ if (p)
+ pa_tagstruct_put_proplist(t, p);
+ else {
+ p = pa_proplist_new();
+ pa_tagstruct_put_proplist(t, p);
+ pa_proplist_free(p);
+ }
pa_pstream_send_tagstruct(c->pstream, t);
pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, play_sample_with_proplist_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);