[pulseaudio-commits] r1663 - /branches/lennart/src/pulsecore/sink-input.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Wed Aug 15 12:26:39 PDT 2007
Author: lennart
Date: Wed Aug 15 21:26:38 2007
New Revision: 1663
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1663&root=3Dpulseaudio&vi=
ew=3Drev
Log:
fix muting for sink inputs
Modified:
branches/lennart/src/pulsecore/sink-input.c
Modified: branches/lennart/src/pulsecore/sink-input.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
sink-input.c?rev=3D1663&root=3Dpulseaudio&r1=3D1662&r2=3D1663&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/sink-input.c (original)
+++ branches/lennart/src/pulsecore/sink-input.c Wed Aug 15 21:26:38 2007
@@ -398,7 +398,11 @@
/* It might be necessary to adjust the volume here */
if (do_volume_adj_here && !volume_is_norm) {
pa_memchunk_make_writable(&tchunk, 0);
- pa_volume_memchunk(&tchunk, &i->thread_info.sample_spec, &i->t=
hread_info.volume);
+ =
+ if (i->thread_info.muted)
+ pa_silence_memchunk(&tchunk, &i->thread_info.sample_spec);
+ else
+ pa_volume_memchunk(&tchunk, &i->thread_info.sample_spec, &=
i->thread_info.volume);
}
=
pa_resampler_run(i->thread_info.resampler, &tchunk, &i->thread_inf=
o.resampled_chunk);
@@ -430,8 +434,10 @@
if (do_volume_adj_here)
/* We had different channel maps, so we already did the adjust=
ment */
pa_cvolume_reset(volume, i->sink->sample_spec.channels);
+ else if (i->thread_info.muted)
+ /* We've both the same channel map, so let's have the sink do =
the adjustment for us*/
+ pa_cvolume_mute(volume, i->sink->sample_spec.channels);
else
- /* We've both the same channel map, so let's have the sink do =
the adjustment for us*/
*volume =3D i->thread_info.volume;
}
=
More information about the pulseaudio-commits
mailing list