mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-30 11:08:50 -05:00
allow samples to be played with 'default' (i.e. unspecified) volume.
This commit is contained in:
parent
5449d793ae
commit
1be39e4fa5
6 changed files with 43 additions and 15 deletions
|
|
@ -188,6 +188,10 @@ pa_operation *pa_context_play_sample(pa_context *c, const char *name, const char
|
|||
t = pa_tagstruct_command(c, PA_COMMAND_PLAY_SAMPLE, &tag);
|
||||
pa_tagstruct_putu32(t, PA_INVALID_INDEX);
|
||||
pa_tagstruct_puts(t, dev);
|
||||
|
||||
if (volume == (pa_volume_t) -1 && c->version < 15)
|
||||
volume = PA_VOLUME_NORM;
|
||||
|
||||
pa_tagstruct_putu32(t, volume);
|
||||
pa_tagstruct_puts(t, name);
|
||||
|
||||
|
|
@ -225,6 +229,10 @@ pa_operation *pa_context_play_sample_with_proplist(pa_context *c, const char *na
|
|||
t = pa_tagstruct_command(c, PA_COMMAND_PLAY_SAMPLE, &tag);
|
||||
pa_tagstruct_putu32(t, PA_INVALID_INDEX);
|
||||
pa_tagstruct_puts(t, dev);
|
||||
|
||||
if (volume == (pa_volume_t) -1 && c->version < 15)
|
||||
volume = PA_VOLUME_NORM;
|
||||
|
||||
pa_tagstruct_putu32(t, volume);
|
||||
pa_tagstruct_puts(t, name);
|
||||
pa_tagstruct_put_proplist(t, p);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue