Re: Pulseaudio & browsers - anyone got something ELSE working?

2017-08-14 Thread r0ller
Hi,

Midori with oss (default) works fine here -amd64, NetBSD 7.1- meaning youtube, 
even flash and streaming via vlc plugin;)

Best regards,
r0ller

 Eredeti levél 
Feladó: Swift Griggs < swiftgri...@gmail.com (Link -> 
mailto:swiftgri...@gmail.com) >
Dátum: 2017 augusztus 14 00:07:49
Tárgy: Pulseaudio & browsers - anyone got something ELSE working?
Címzett: netbsd-users@netbsd.org (Link -> mailto:netbsd-users@netbsd.org)
 
So, just a few years ago, we had to have flash (a security nightmare)
setup and working to do things like play a youtube video. That sucked
because you never knew when someone was going to bend flash over and 0wn
your system. My best defense was click-to-play plugins so flash only
loaded when I needed it. That worked, at least. It didn't play nice with
the sound device and often wouldn't release it until I closed the browser,
but it was servicable.
Fast forward a few years when sites started to pull their head out of
their flash and embrace HTML5 and the in-browser streaming video standards
that had only been sitting there a decade or so. I'm thinking "YEA!" no
more flash, right? Plus, Gecko browsers are open source, so they ought to
embrace more than one sound output meathod, right? ESD, Jack1, Jack2,
Arts, OSS, Alsa, NAS, etc.. WRONG.
Well, I was half right. Sites like Youtube seem to work in just about all
our Mozilla-based browsers (Seamonkey, Firefox*). However, there seems to
be NO CHOICE about what kind of sound device to output to. It's Pulseaudio
or nothing, I guess. Well, my opinion is that Pulseaudio is a miserable
failure at everything it does, since that's been my experience. I've got
three NetBSD systems it fails to work on altogether, or has severe
drawbacks (like it won't release the sound device - EVER, or it won't work
unless it's run as root, despite 666 perms on the audio devs). Plus,
nobody seems to want to *fix* Pulseaudio. Anyone who complains is an
idiot, according to Pottering or his ilk.
Is there ANY way to get sound via a browser without Pulseaudio ? Today I
resort to downloading with youtube-dl or something similar and playing the
resulting file with mplayer because at least that gives me enough
flexibility to choose my sound output and not break it (which Pulseaudio
does OFTEN by grabbing the sound device, refusing to release it, and being
unkillable even with kill -9 - must reboot after that).
Is there any other option besides taking more abuse from Pulseaudio or
doing the plugin-download-play-from-CLI option ? I'm using amd64 and i386
ports. Is there a version in the panopoly of firefox versions that has
anything-other-than-pulseaudio as an option for sound output that can
still do HTML5 video? Has anyone found a formula that works and doesn't
ruin the sound device until the end of time just because I played one
HTML5 video?
-Swift
I'm even using SeamlessRDP to run browsers from Windows boxes. Ugh. Bleh.
Puh. but at least I know 'rdesktop' will release the sound device!

Re: Pulseaudio & browsers - anyone got something ELSE working?

2017-08-14 Thread coypu
On Mon, Aug 14, 2017 at 10:27:34PM +0100, Sad Clouds wrote:
> Just out of interest, what is the significance of in-kernel audio mixer
> and what is it supposed to do?

Without an audio mixer you can only have one output at once to some
hardware. if you let multiple things write audio then they will trample
each other.
if one thread says "the audio is 55" and the other says "audio is 22"
then (at best) you may get 22, or 55, or 25, or 52. neither of which
sound right.

before it only allowed one input, and if something else was inputting,
new things cannot start inputting.
even if you only wanted one output, sometimes something will refuse to
let go of it, and you wouldn't be able to play audio.

an audio mixer puts the 55 and 22 in different places and combines them
to a single meaningful result, say 77.

what netbsd has now is the same daemon in the kernel, if you do:
  top -t |grep audio
you will see the audiomix kernel thread. If you see what is
kthread_create'ing something called "audiomix", you will see the
functionality is just this function:
https://nxr.netbsd.org/xref/src/sys/dev/audio.c#audio_play_thread

it does a few things around, but then does the 'thing' with mix_func,
which is: https://nxr.netbsd.org/xref/src/sys/dev/audio.c#DEF_MIX_FUNC

it literally multiplies the virtual channel the volume and adds in
ways that sound right.

what pulseaudio does is run a userland daemon, so anything that uses
pulseaudio as a library speaks to the daemon (using dbus to pass data, I
think) and this daemon does the mixing, and then tells the kernel the
combined results. this means the kernel can remain dumb but audio will
still be mixed.


Re: Pulseaudio & browsers - anyone got something ELSE working?

2017-08-14 Thread Sad Clouds
On Mon, 14 Aug 2017 00:43:02 +
co...@sdf.org wrote:

> I use firefox+oss. it's a package option and the default for
> www/firefox If you want a better sound experience use netbsd-8 or
> -current. they have an audio mixer.

Just out of interest, what is the significance of in-kernel audio mixer
and what is it supposed to do?


Re: Pulseaudio & browsers - anyone got something ELSE working?

2017-08-14 Thread Hauke Fath
On Mon, 14 Aug 2017 07:48:25 -0600 (MDT), Swift Griggs wrote:
> On Sun, 13 Aug 2017, Chavdar Ivanov wrote:
>> My firefox-54.0 was build with the default 'oss' option, sound is working
>> well, I have never noticed any problems.
> 
> I'll try that. I didn't realize there was such a thing. That should 
> work well for my purposes.

From my mk.conf:

# Sound Globals
PKG_DEFAULT_OPTIONS =  oss -pulseaudio -alsa -arts -esound -nas

-- appears to nicely take care of things.

HTH,
hauke

-- 
 The ASCII Ribbon CampaignHauke Fath
() No HTML/RTF in emailInstitut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
 Respect for open standards  Ruf +49-6151-16-21344


Re: Pulseaudio & browsers - anyone got something ELSE working?

2017-08-14 Thread Swift Griggs

On Sun, 13 Aug 2017, Chavdar Ivanov wrote:

My firefox-54.0 was build with the default 'oss' option, sound is working
well, I have never noticed any problems.


I'll try that. I didn't realize there was such a thing. That should work 
well for my purposes.


Thanks!

-Swift


Re: Pulseaudio & browsers - anyone got something ELSE working?

2017-08-14 Thread Chavdar Ivanov
My firefox-54.0 was build with the default 'oss' option, sound is working
well, I have never noticed any problems. I do have pulseaudio installed as
mplayer dependency, though (mplayer also works fine). I also use vlc (video
works for about a minute, then stops with no dump), xmms (crashes
immediately) and moc (works fine), there are a few other players built
which I haven't bothered to test yet. This all is on amd64 -current,
running on an old Thinkpad t61p. I actually have many more problems with
sound under Linux on the same laptop (I rarely run it these days, after I
managed to get NetBSD run properly on it). I never really had any problems
with sound on this laptop so far.

Chavdar Ivanov

On Sun, 13 Aug 2017 at 23:07 Swift Griggs  wrote:

>
> So, just a few years ago, we had to have flash (a security nightmare)
> setup and working to do things like play a youtube video. That sucked
> because you never knew when someone was going to bend flash over and 0wn
> your system. My best defense was click-to-play plugins so flash only
> loaded when I needed it. That worked, at least. It didn't play nice with
> the sound device and often wouldn't release it until I closed the browser,
> but it was servicable.
>
> Fast forward a few years when sites started to pull their head out of
> their flash and embrace HTML5 and the in-browser streaming video standards
> that had only been sitting there a decade or so. I'm thinking "YEA!" no
> more flash, right? Plus, Gecko browsers are open source, so they ought to
> embrace more than one sound output meathod, right? ESD, Jack1, Jack2,
> Arts, OSS, Alsa, NAS, etc.. WRONG.
>
> Well, I was half right. Sites like Youtube seem to work in just about all
> our Mozilla-based browsers (Seamonkey, Firefox*). However, there seems to
> be NO CHOICE about what kind of sound device to output to. It's Pulseaudio
> or nothing, I guess. Well, my opinion is that Pulseaudio is a miserable
> failure at everything it does, since that's been my experience. I've got
> three NetBSD systems it fails to work on altogether, or has severe
> drawbacks (like it won't release the sound device - EVER, or it won't work
> unless it's run as root, despite 666 perms on the audio devs). Plus,
> nobody seems to want to *fix* Pulseaudio. Anyone who complains is an
> idiot, according to Pottering or his ilk.
>
> Is there ANY way to get sound via a browser without Pulseaudio ? Today I
> resort to downloading with youtube-dl or something similar and playing the
> resulting file with mplayer because at least that gives me enough
> flexibility to choose my sound output and not break it (which Pulseaudio
> does OFTEN by grabbing the sound device, refusing to release it, and being
> unkillable even with kill -9 - must reboot after that).
>
> Is there any other option besides taking more abuse from Pulseaudio or
> doing the plugin-download-play-from-CLI option ? I'm using amd64 and i386
> ports. Is there a version in the panopoly of firefox versions that has
> anything-other-than-pulseaudio as an option for sound output that can
> still do HTML5 video? Has anyone found a formula that works and doesn't
> ruin the sound device until the end of time just because I played one
> HTML5 video?
>
> -Swift
>
> I'm even using SeamlessRDP to run browsers from Windows boxes. Ugh. Bleh.
> Puh. but at least I know 'rdesktop' will release the sound device!
>