NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/54229: audio in firefox stops playing

> 1. I play audio in cmus and open youtube tab
> 2. pause cmus while youtube is loading
> 3. firefox will refuse to play any audio until it is killed.

Firefox reopens sound device on the page (video) transition on
youtube.  And firefox (media/libcubeb/src/cubeb_oss.c) uses
"/dev/sound" that some parameters (including pause) are sticky.
Therefore, if someone pauses audio, firefox is affected.  And it
also happens on previous audio driver.

 1. boot any of
    * NetBSD 8 or
    * -current before merging isaki-audio2 (<8.99.39) or
    * -current after merging isaki-audio2 (>=8.99.39).
    (I think NetBSD7 is the same but I haven't confirmed)
 2. audioctl -d /dev/sound -w play.pause=1
 3. execute firefox and play something on youtube.
    -> firefox cannot play video.

Unless firefox expects that it stops by external operation, I think
that using /dev/sound in firefox is a bug, although I'm not sure
about pkgsrc/www/firefox history.

--- www/firefox/patches/patch-aa.ORIG	2018-11-12 21:50:52.000000000 +0900
+++ www/firefox/patches/patch-aa	2019-05-27 15:19:05.000000000 +0900
@@ -60,7 +60,7 @@
 +    dnl Assume NetBSD implementation over SunAudio
 +    AC_CHECK_LIB(ossaudio, _oss_ioctl,
 +         MOZ_OSS_LIBS="$MOZ_OSS_LIBS -lossaudio"])

There is another theme to consider.
On NetBSD7 and earlier, /dev/sound maintained the last /dev/audio or
/dev/sound's parameters.
On NetBSD8, /dev/sound maintained the last /dev/sound's parameters.
On >=8.99.39(isaki-audio2), /dev/sound maintains the last /dev/audio
or /dev/sound's parameters (it's the same as NetBSD7).

firefox uses /dev/sound and cmus uses /dev/audio.  So this problem
was found easier after merge.
I don't know why NetBSD7 and 8 behave differently.

I personally think /dev/sound's such sticky behavior is the good old
days and is not suitable for modern system...
Tetsuya Isaki < />

Home | Main Index | Thread Index | Old Index