mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -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);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ pa_operation* pa_context_play_sample(
|
|||
pa_context *c /**< Context */,
|
||||
const char *name /**< Name of the sample to play */,
|
||||
const char *dev /**< Sink to play this sample on */,
|
||||
pa_volume_t volume /**< Volume to play this sample with */ ,
|
||||
pa_volume_t volume /**< Volume to play this sample with. Starting with 0.9.15 you may pass here (pa_volume_t) -1 which will leave the decision about the volume to the server side which is a good idea. */ ,
|
||||
pa_context_success_cb_t cb /**< Call this function after successfully starting playback, or NULL */,
|
||||
void *userdata /**< Userdata to pass to the callback */);
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ pa_operation* pa_context_play_sample_with_proplist(
|
|||
pa_context *c /**< Context */,
|
||||
const char *name /**< Name of the sample to play */,
|
||||
const char *dev /**< Sink to play this sample on */,
|
||||
pa_volume_t volume /**< Volume to play this sample with */ ,
|
||||
pa_volume_t volume /**< Volume to play this sample with. Starting with 0.9.15 you may pass here (pa_volume_t) -1 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 be merged into this property list */,
|
||||
pa_context_play_sample_cb_t cb /**< Call this function after successfully starting playback, or NULL */,
|
||||
void *userdata /**< Userdata to pass to the callback */);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue