State of Sound Development On Linux Not So Sorry After All 427
An anonymous reader writes "There have been past claims by Adobe and others that development on Linux is a jungle, particularly with regards to audio. However today, the author of the popular 'The Sorry State of Sound in Linux' has posted a follow up showing Adobe's claims to be FUD, as well as being a good update on where OSS and ALSA are holding today, and why PulseAudio isn't a good idea."
Re:By saying that he proves his former point (Score:2, Informative)
Wonderful, we've just broken Windows Audio, Solaris Audio and many other Audios as well. (BTW, you probably wanted to type Linux audio, not Linux Audio).
Re:it's all relative (Score:5, Informative)
Fud? Er, no... (Score:4, Informative)
Both the Adobe article and the "Sorry State Of Sound" article date from May 2007. The new article reinforces that the state *was* sorry then.
Re:He makes one excellent and crucial point (Score:5, Informative)
Is there any document out there which explains why /dev/dsp doesn't get mixing with ALSA? And why nobody tried to patch that yet?
Yeah, TFA explains it.. Here's it in short: /dev/dsp goes to kernelspace, while ALSA does mixing in userspace. I've no idea how difficult it would be to make ALSA do sound mixing in kernelspace.
Re:By saying that he proves his former point (Score:5, Informative)
Pulseaudio rocks IMO.
I have 7 Internet-connected personal machines at the house (7 Linux boxes, 1 Wintendo), and one Linux laptop is connected to a 5.1 surround system in the office.
Every machine on the network (with the exception of the Wintendo) can play audio over the network through the 5.1 surround system via Pulseaudio, with no appreciable loss of sound quality.
I can sit on the couch with a wireless-enabled laptop and play music from the headless file storage machine through the 5.1 surround system remotely.
We've come a long way, baby.
Re:What are we trying to achieve? (Score:3, Informative)
yeah it had nothing to do with BMPx no longer being maintained! as for xmms i suspect that gtk1.x is no longer being maintained. Canonical can't be arsed to maintain a few old winamp style players when there are many other well maintained ones about :O
Re:Pulse Audio: the best gift the Linux world gave (Score:5, Informative)
The developer of PulseAudio explains some of the rationale in this interview [blogspot.com].
Re:it's all relative (Score:4, Informative)
Re:He makes one excellent and crucial point (Score:3, Informative)
they make it in userspace because of floating point, I think. No FP is allowed in the kernel. So alsa does it in userspace.
Just get a card that does not suck (like an audigy 2) and mixing is a non-issue.
Re:Let Me Speak For Slashdot And Open Source World (Score:3, Informative)
No it doesn't - it works for me.
I use an obscure distro called "Ubuntu" that halfway switched to PulseAudio during the latest release, breaking half the audio on my system until I uninstalled it. PA might be a great thing but the current state of it, right now, today, on the most common Linux systems, ain't so hot.
You're an idiot and/or a Microsoft astroturfer.
Cute, kid. Run along.
Re:Pulseaudio sucks (Score:3, Informative)
Re:What are we trying to achieve? (Score:4, Informative)
There was absolutely nothing wrong with Xmms as a Winamp-style media player that was quick, efficient and could handle Internet radio and almost all the popular DRM-free formats, yet it was automatically removed with other "obsolete" software. Yes, I can compile it again from source, but it just seems a bit obnoxious.
You want Audacious [audacious-...player.org].
Re:Main blocker (Score:3, Informative)
My guess is compiz. Install compizconfig-settings-manager, open it, go to "General" and tick "Sync to VBlank" in the "Display Settings" tab. The newer UXA-mode Intel driver may have problems with this, but for other cards this should make everything look better.
Bottomline for the topic under discussion: you never know.
Re:He makes one excellent and crucial point (Score:5, Informative)
There should always be sound mixing, with no ifs, buts, exceptions, or configuration required. It should be there by default for anything that tries to play sound
There is. ALSA's dmix has been enabled by default for a long time, years. Have you even tried Linux? I can't remember the last time I had to 'configure' sound on Linux. Insert sound card, mixer shows up, play sounds. From the ALSA wiki: "NOTE: For ALSA 1.0.9rc2 and higher you don't need to setup dmix. Dmix is enabled as default for soundcards which don't support hw mixing."
The result of this nonsense is that crap like pulseaudio continues to exist
No. Sadly, pulseaudio exists simply to copy Vista. Vista introduced per-application mixers and apparently this is a Cool New Feature that everybody supposedly wants, even if it's a shitty implementation that slows down what was a perfectly working sound system.
Is there any document out there which explains why /dev/dsp doesn't get mixing with ALSA?
If you bothered to try, you'd find that it does.
Re:Graphs (Score:1, Informative)
Of course there is hierarchy, but Adobe wanted you to think otherwise.
Going from bottom to top, we can clearly define three levels:
- hardware drivers: alsa and OSS, where the latter has been deprecated a long, long time ago and is since unmaintained, so you can (and should) ignore its existence;
- userspace sound mixers: jack, esd, arts and pulseaudio, where arts and esd are past efforts now being dropped (again you can ignore them), and jack is only interesting for a niche of specialised users who require things such as very low latency;
- application libraries: libao, sdl, allegro, gstreamer: these are the libraries your program will talk directly to, and as a developer you only have to choose the one that best suits your need.
Re:it's all relative (Score:1, Informative)
Here's the 'Made with Ardour' forum.
http://ardour.org/forum/9
I heard a couple of nice tracks on there.
Re:What are we trying to achieve? (Score:5, Informative)
Xmms is no longer maintained either, the developers have all moved on to Xmms2. So yeah, distro's don't include software that's been abandoned upstream.
Re:What are we trying to achieve? (Score:3, Informative)
Xmms2 is just plain weird. I don't get it at all, and the amount of effort I put into trying to understand it was not rewarded.
I felt lucky to discover Audacious, which I found by accident.
Re:Main blocker (Score:5, Informative)
It's a neat feature. But hardly novel or really that amazing. Other Unices offered this, and I'd be surprised if mainframe systems going back 30 years didn't. Heck, SunOS (the predecessor to Solaris) offered this, and it was end-of-life'd before Linux 0.1 was a gleam in any Finn's eye.
Linux 0.01 was released in September 1991. Linux 0.11 was released in December 1991.
The last release of SunOS (4.1.4) was in November 1994. It was supported by Sun until September 2003. Never underestimate the demand for long term commercial Unix support.
Re:What are we trying to achieve? (Score:5, Informative)
Off by one. Linux deprecated OSS3, and OSS4 is now opensource.
And not only does it work better (in my admittedly little experience with it), it's also more in keeping with the UNIX philosophy of treating devices just like any other file. Sure, with ALSA you do have device files, but you pretty much have to use alsalib to use them AFAIK. With OSS, you get to use the standard UNIX file APIs.
Re:He makes one excellent and crucial point (Score:5, Informative)
Yeah, it's supposed to work, but for some reason for me it doesn't.
And have you looked at that page? It's full of listings of arcane incantations. Really, I just want the darn audio to always get mixed, without having to get a degree in audio engineering to understand what's going on there.
See the dmix page [opensrc.org], which says "Normally (without hardware mixing) you cannot use /dev/dsp multiple times directly."
So it seems that if you have onboard audio, and want to have more than one app use /dev/dsp, you're out of luck.
Re:it's all relative (Score:3, Informative)
Pro Tools [is a] toy, though. No serious musician would use [it] for anything other than quickly sketching out an idea.
Pro-Tools is the industry standard DAW software. You are BadAnalogyGuy and I claim my free pair of Foster Grant sunglasses.
Re:Main blocker (Score:3, Informative)
I use the Nvidia drivers and also have tearing issues with any full screen video. I use Xfce with the Xfwm window manager. The tearing goes away if I both disable compositing (the Gnome equivalent would be to not use Compiz, I believe) and set vsync to the monitor the video is on in nvidia-settings under "X Server XVideo Settings". (I have two monitors with slightly different vsyncs -- I have yet to find a way to play full screen video on both monitors with no tearing on either but I have also yet to figure why I would want to do so other than testing my video card. ;-)
My current usage pattern involves disabling compositing (it's just a checkbox in the window manager settings for Xfwm) whenever I am watching a video with enough action for the tearing to bother me and reenabling it when I am done (as the window manager performance is significantly better with compositing enabled), which is annoying but works. Hopefully at some point to issue will be fixed -- or maybe there is already a way to get video without tearing while compositing is enabled that I am not aware of?
Re:Main blocker (Score:3, Informative)
Re:By saying that he proves his former point (Score:1, Informative)
Pulseaudio had problems earlier in its development cycle, which unfortunately is coloring a number of peoples' views about it.
The latencies mentioned in the article flat out don't exist any more on a sufficiently up-to-date system, even if it's rather old hardware.
KDE4 had serious, severe issues with pulseaudio for me in version 4.1, but I don't know whether that's been handled. I strongly suspect it has.
Working drivers. Re:What are we trying to achieve? (Score:3, Informative)
First off, KDE and Gnome != Linux. Last time I checked they both ran on FreeBSD too. They are the real problem. When I first started playing with sound on Linux (probably 1996 or so), OSS was the established standard for the kernel. I think there were some other devices for compatibility, but Linux developers used OSS.
Then around 2000 or so, ALSA started to show up as a viable project. It supported low latency sound and was more reliable for syncing sound to video. Obviously, you want this for playing video games or watching movies. Quite a few distro maintainers jumped on it and added it to their distro before it was added into the mainline kernel. Eventually it was added, and they kept OSS for backwards compatibility.
Until recently, yes, Linux didn't support multichannel audio, but now ALSA does, and it does "just work." Most of those daemons were created to patch on support for multichannel and networking. I assume those must be the "incompatible APIs" you were talking about.
There is one daemon called jack which seems to be good for audio editing--it is a whole routing system for audio, but I doubt one would need to use it for just playing sound since ALSA seems to have all the features, and ALSA was never superseded by anything else like you implied. Jack, esd, pulseaudio, artsd (unless it uses esd), & etc all use ALSA.
Re:Main blocker (Score:3, Informative)
While Amarok is indeed the best Linux media player available, it's still terrible, sorry.
Re:Are you kidding? (Score:3, Informative)
The article is fairly clear on why the latency is better with OSS vs ALSA. ALSA does audio mixing in user space before passing the mixed audio to the kernel. OSS, on the other hand, does everything in kernel space including audio mixing and even resampling. Since the audio is only processed in the kernel the latency can be much lower. With ALSA audio must be buffered in user space for mixing then buffered again in the kernel for the hardware. OSS eliminates this problem by doing it all inside the kernel.
ALSA only supports kernel-based audio mixing if the sound card supports it which most on-board sound cards do not. OSS also takes advantage of hardware audio mixing when the hardware supports it but also performs software mixing in the kernel when not supported.
Mixing between multiple applications in user space can add quite a bit of latency.
As for better audio quality, I have had issues with stuttering and other problems with ALSA under high load conditions, in part due to the user space processing. Also, as the article states, OSS uses more accurate algorithms for audio mixing than ALSA does (and you can select quality vs CPU in OSS).
Re:Main blocker (Score:3, Informative)
Re:Main blocker (Score:3, Informative)
How the FUCK is this +5 Interesting?!? It's COMPLETELY offtopic, AS HE ADMITS.
And to answer the parent's question, it's probably the video driver, try out mplayer with opengl output.
Re:Main blocker (Score:3, Informative)
So maybe this isn't a good time to mention that you can upgrade video drivers in Vista (and above), or recover from a video display crash, without even closing and reopening your windows, never mind the applications behind them?
That said, I don't know how to force WIndows to load or unload a kernel module (.sys file, typically) via command line. It's probably possible, but Linux certainly does make it easy.
Re:A sure road to success ..... (Score:3, Informative)
Audio on Linux has been bad for 10 years, its not getting any better and ALSA is more the problem than the solution, as are all the hacks like pulse, esd, arts, gstreamer, etc.
GStreamer isn't an audio API. It's the Linux version of DirectShow - i.e. a multi-media framework for building decoding/encoding graphs/pipelines.
e.g.
Say you want to play a DVD. Your GStreamer-based player invokes GStreamer to build a decoding pipeline that reads the DVD, demuxes it into video and audio streams, decodes each stream in parallel, maybe applies some filters, then outputs them the the chosen sink. In the case of the audio stream the sink (for a player app) would be an audio API.
Re:Main blocker (Score:3, Informative)
vlc has options to change the way output is handled, try them, maybe you can find out more about what the problem is.
Re:Main blocker (Score:3, Informative)
Well, of course. 3D acceleration on Linux requires in-kernel drivers, and the kernel interface changes constantly, so the drivers need to be constantly updated to work with new kernels. Open-source drivers would solve the problem, but manufacturers don't want to provide them and Linux isn't anywhere big enough to force them to. The end result is a nightmare; for example, I can't update the kernel because the last drivers that work with my card (Geforce 2 MX) don't work with the new kernel. And while I got an old Radeon for free, it won't work with my motherboard (KT7A).
Re:What are we trying to achieve? (Score:2, Informative)
Re:Main blocker (Score:2, Informative)
If Ubuntu sees it has a video card which the proprietary Nvidia drivers are available for, then it will prompt the user to permit it to download and install the drivers itself. It doesn't have the drivers installed by default.