mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
scache: pa_context_play_sample_with_proplist: constify proplist param
If the given proplist is NULL, the function creates a new (empty) proplist. That caused a compiler warning after the constification, which is why the new proplist is now created using a separate variable.
This commit is contained in:
parent
f17bcb0ad5
commit
5c2d28f6df
2 changed files with 5 additions and 5 deletions
|
|
@ -205,7 +205,7 @@ pa_operation *pa_context_play_sample(pa_context *c, const char *name, const char
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
pa_operation *pa_context_play_sample_with_proplist(pa_context *c, const char *name, const char *dev, pa_volume_t volume, pa_proplist *p, pa_context_play_sample_cb_t cb, void *userdata) {
|
pa_operation *pa_context_play_sample_with_proplist(pa_context *c, const char *name, const char *dev, pa_volume_t volume, const pa_proplist *p, pa_context_play_sample_cb_t cb, void *userdata) {
|
||||||
pa_operation *o;
|
pa_operation *o;
|
||||||
pa_tagstruct *t;
|
pa_tagstruct *t;
|
||||||
uint32_t tag;
|
uint32_t tag;
|
||||||
|
|
@ -237,9 +237,9 @@ pa_operation *pa_context_play_sample_with_proplist(pa_context *c, const char *na
|
||||||
if (p)
|
if (p)
|
||||||
pa_tagstruct_put_proplist(t, p);
|
pa_tagstruct_put_proplist(t, p);
|
||||||
else {
|
else {
|
||||||
p = pa_proplist_new();
|
pa_proplist *empty_proplist = pa_proplist_new();
|
||||||
pa_tagstruct_put_proplist(t, p);
|
pa_tagstruct_put_proplist(t, empty_proplist);
|
||||||
pa_proplist_free(p);
|
pa_proplist_free(empty_proplist);
|
||||||
}
|
}
|
||||||
|
|
||||||
pa_pstream_send_tagstruct(c->pstream, t);
|
pa_pstream_send_tagstruct(c->pstream, t);
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ pa_operation* pa_context_play_sample_with_proplist(
|
||||||
const char *name /**< Name of the sample to play */,
|
const char *name /**< Name of the sample to play */,
|
||||||
const char *dev /**< Sink to play this sample on */,
|
const char *dev /**< Sink to play this sample on */,
|
||||||
pa_volume_t volume /**< Volume to play this sample with. Starting with 0.9.15 you may pass here PA_VOLUME_INVALID which will leave the decision about the volume to the server side, which is a good idea. */ ,
|
pa_volume_t volume /**< Volume to play this sample with. Starting with 0.9.15 you may pass here PA_VOLUME_INVALID which will leave the decision about the volume to the server side, which is a good idea. */ ,
|
||||||
pa_proplist *proplist /**< Property list for this sound. The property list of the cached entry will have this merged into it. */,
|
const pa_proplist *proplist /**< Property list for this sound. The property list of the cached entry will have this merged into it. */,
|
||||||
pa_context_play_sample_cb_t cb /**< Call this function after successfully starting playback, or NULL */,
|
pa_context_play_sample_cb_t cb /**< Call this function after successfully starting playback, or NULL */,
|
||||||
void *userdata /**< Userdata to pass to the callback */);
|
void *userdata /**< Userdata to pass to the callback */);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue