diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-01-27 03:05:40 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-01-27 03:05:40 +0100 |
commit | 1be39e4fa5b8f6a2d995593a4c1fd66eeafd6328 (patch) | |
tree | 7ad3a99b5f5649a933f7d217fa07888e59635495 /src/pulsecore/protocol-native.c | |
parent | 5449d793ae7800ad236f027f6c6893a1d2db3929 (diff) |
allow samples to be played with 'default' (i.e. unspecified) volume.
Diffstat (limited to 'src/pulsecore/protocol-native.c')
-rw-r--r-- | src/pulsecore/protocol-native.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 7ddc010c..3896dff6 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -2840,6 +2840,7 @@ static void source_output_fill_tagstruct(pa_native_connection *c, pa_tagstruct * static void scache_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_scache_entry *e) { pa_sample_spec fixed_ss; + pa_cvolume v; pa_assert(t); pa_assert(e); @@ -2851,7 +2852,13 @@ static void scache_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_s pa_tagstruct_putu32(t, e->index); pa_tagstruct_puts(t, e->name); - pa_tagstruct_put_cvolume(t, &e->volume); + + if (e->volume_is_set) + v = e->volume; + else + pa_cvolume_init(&v); + + pa_tagstruct_put_cvolume(t, &v); pa_tagstruct_put_usec(t, e->memchunk.memblock ? pa_bytes_to_usec(e->memchunk.length, &e->sample_spec) : 0); pa_tagstruct_put_sample_spec(t, &fixed_ss); pa_tagstruct_put_channel_map(t, &e->channel_map); |