Bug#697121: vlc: sudden very loud sound to cause hearing demage

Rémi Denis-Courmont remi at remlab.net
Mon Jun 9 20:07:43 UTC 2014


Le lundi 9 juin 2014, 15:56:44 Felipe Sateler a écrit :
> But isn't an uncorked stream an "inactive stream"? I'm not sure of
> what you mean by that.

I never wrote anything about inactive streams. Inactive sessions is a WASAPI 
notion, that the -in that respect inferior- PulseAudio design lacks.

> >> 2. VLC could create the stream on startup and destroy it on exit. This
> >> is what Clementine seems to do.
> > 
> > That is not possible since VLC may play different formats at successive
> > times. Also...
> 
> OK. So that rules out permanent streams. BTW, out of curiosity, why is
> this the case? I thought VLC did their own decoding (and thus output a
> single stream format).

VLC decodes (and PulseAudio does not) but the sample rates and channels maps 
may vary, not to mention pass-through.

> Also, semi-permanent streams might be the option then: reuse streams
> as long as the format doesn't change. This may well be more work than
> this problem merits, though.
> 
> >> 3. VLC could, at startup, create a stream, get the volume and destroy
> >> the stream.
> > 
> > Because of flat volumes, doing that would potentially cause spurious
> > changes to the master volume and glitches in mixer UIs.
> 
> Is this really correct? If pa_stream_connect_playback is set with a
> NULL cvolume parameter, PA should set a reasonable volume for the
> stream.

Yes, and...?

> > Furthermore, all options 1 and 2 fail if another process creates a stream
> > with the same role (or whatever matching criteria) in the mean time, and
> > change the volume.
> 
> I don't think roles are used for this purpose. Streams have
> independent volumes, AFAICT.

Active streams have independent volumes. But the whole point is what to do 
without an active stream. By *default*, PulseAudio restores volumes by stream 
role.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the pkg-pulseaudio-devel mailing list