A Sound Server For X
An anonymous reader writes "X.org, the organization that governs the evolution of the X11R6 specifications, has released a sound server for X, called MAS. According to their site: 'MAS integrates with a compatible X11 server on your desktop. It processes graphic information locally, alleviating the need for network transmission of uncompressed graphical content. Graphic events are easily synchronized with audio events for professional-quality multimedia and accessibility-enabled applications.'" The X.org site describes MAS as an "affiliated technology" rather than "official," but it is released under the same license. "MAS" stands for "Media Application Server," and it's developed by Shiman Associates.
"but I mean something more higher level - like DirectSound"
SDL?
can send audio data over a number of different transports, including CORE X
I could go on, but I can summarize with: MAS is a much, much better solution than those you mentioned for X applications. To top it all off, I'm pretty sure it doesn't require X, and can be used for console apps as well. (mpg321, etc.)
Let's hope that there's intelligent life somewhere out in space 'Cause there's bugger-all down here on Earth.
You should've read a little more about it. It's quite a bit more than a sound server, it's a graph-based media architecture, similar to DirectShow in Windows.
There is already a MAS associated with audio -- MOTU Audio System plugins.l obal/index .html)
(http://www.motu.com/english/software/g
Perhaps they should have done a bit of name research.
"MAS enables low-latency Internet conferencing and telephony. Automatic bandwidth measurements and MAS's dynamically-switchable CODECs insure that the conference quality scales from 56K modems to T1 lines. "
"MAS integrates with a compatible X11 server on your desktop. It processes graphic information locally, alleviating the need for network transmission of uncompressed graphical content. Graphic events are easily synchronized with audio events for professional-quality multimedia and accessibility-enabled applications. "
"MAS handles network-distributed media processing and intricate format configuration tasks. It continually measures system performance and adjusts its actions depending on the available system resources. The longer it runs, the better it knows your system."
Romana: "How did you know?" Doctor Who: "Ah, well, knowing is easy. Everyone does THAT ad nauseum. I just sort of hope"
ESD is just NAS warmed over. NAS is old and terrible, basically.
ArTS is the only 'sound daemon' I've encountered that is actually decent. The rest are junk, including HPUX's proprietary Asound library.
Actually, MAS may integrate with X11, but it doesn't use the X11 protocol, it uses the "RTP" (Real Time Protocl RFC 1889, January 1996) for all communications. Except for multicast mode or in multi-participant mode. RTP is obviously very efficient for this type of data payload...
Key features of the Network Audio System include:
- Device-independent audio over the network
- Lots of audio file and data formats
- Can store sounds in server for rapid replay
- Extensive mixing, separating, and manipulation of audio data
- Simultaneous use of audio devices by multiple applications
- Use by a growing number of ISVs
- Small size
- Free! No obnoxious licensing terms
Applications that support NAS natively:- Festival - The Festival Speech Synthesis System.
- mpg123 - a command line MP3 player
- GAIM - a free AOL IM client
- OpenOffice (StarOffice) - the (now opensourced) StarOffice Suite has built-in NAS support for the Solaris and Linux Platforms.
- The Qt Library - from Trolltech supports NAS natively. You will need to pass the '-system-nas-sound' to './configure' before building.
- libSDL - SDL, the Simple DirectMedia Layer library, now has native NAS support thanks to Erik Inge Bols\x{00F8}
- XAnim - the X Animation viewer
- XBoing - a blockout type X game
- XPilot - a multiplayer client/server space warfare game
- Xemacs - the best cross-plaform, cross-language IDE
- Alsaplayer - A NAS Output plugin written by Erik Inge Bols\x{00F8} is now supplied with the Alsaplayer distribution.
- X MultiMedia System (XMMS). A NAS Output plugin written by Willem Monsuwe is available at ftp://ftp.stack.nl/pub/users/willem/
- Wine. A NAS plugin written by Nicolas Escuder is now available with the WINE distrubution.
Not a trollLess is more !
I have much to bitch about aRts...Quake 3 for Linux crashes at startup with it on, and artsdsp doesn't work very well with Quake 3. Not only do you have to do "artsdsp -m quake3", but when you fire a shot, you see the shot, and about two seconds later you hear it. To alleviate that little problem, you have to turn down the buffer that the aRts server has. However, in doing that, you make the sound stutter like a mofo. OSS works properly with Quake3, but aRts is a stumbling block.
Remember: The first thing you should do when you log into KDE for the first time is go to the KDE sound server window and turn off the aRts server.
XMMS uses /dev/dsp with OSS output. And my games uses OSS with /dev/dsp as well. So no sound server necessary. Sure I don't get network transparency, but I don't need it. I bet you'd find that if you disabled both ESD and Arts that many of your games would still have sound, especially if they're using SDL.
/dev/dsp with OSS, their applications don't support OSS directly (so instead they use the sound server) or they need network transparency.
The only reason I can figure out that some people use sound servers is because their sound card doesn't support multiple opens of
You only need the sound server if you want "gee neato" sound effects from KDE or Gnome. I'm not aware of any game or program personally that specifically requires one of these sound servers to be active. XMMS for example can output directly to /dev/dsp using the OSS driver.
Assumin a 16 bit sample rate, That 88,000 * 16 = 1.4 MB/sec. Worst case scenario, uncompressed. Everything in real life will be cutting some kind of corner, so this is the uber high-ball. (Drop your bir rate in half by going to 8 bit sampling, and again by going to 22Khz.)
That really isn't all that outrageous.
Now, if you are trying to make sound work over a modem, JUST USE THE PHONE INSTEAD.
"Learning is not compulsory... neither is survival."
--Dr.W.Edwards Deming
This major code release is only our first step. We're putting the MAS core out there in order to create a useful open standard. We feel that this code represents a radical departure from prior attempts to manage time-critical data on the desktop and across the network. We see this as a valid and innovative architecture with extensive implications for the management of media of all modes. In particular, one of the important applications of this architecture is to time-critical accessibility tasks which can now be handled in a completely generic fashion.
We encourage close examination of the code and we will do our best in the near term to bring as much of our insight and intention to the open community. We see this as an opportunity for collective and collaborative innovation.
From our website:
MAS will provide a complete mechanism for media support, for all pluri-modal media, for all platforms, for all operating systems, for all window systems.
MAS supports the desktop and, transparently, the network. In particular, MAS will provide complete support for the X Window System, across the network.
MAS is an open system: the complete core will remain under the original MIT ("X") license, equally supporting open and proprietary use and development.
MAS provides mechanisms for structured extension, and will be supported by dedicated testing and certification processes.
We wish explicitly to thank Sun Microsystems and X.org for their generous support.
Leon Shiman for the MAS Development Team
aRts is every bit as bad as esd. That performance/latency slider is impossible to set such that sound has decent latency and doesn't stutter.
This is life with aRts:
Open control panel. Tweak slider down. Launch MAME.
Open control panel. Tweak slider way up. Play mp3s while I work.
Open control panel. Tweak slider down. Launch Quake3.
Open control panel. Tweak slider up. Launch Xine. Live with audio and video being ~300ms out of sync because anything less causes horrible stutter.
The worst part is, if aRts were designed properly, this slider would be totally unnecessary. aRts also uses an insane amount of CPU time.
I'd like to see Gnome and KDE adopt Jack. Jack works. MAS sounds interesting too. I look forward to seeing comparisons.
If you have ever seen WinAmp, then you would understand the "incredibly bizzarde interface of XMMS". XMMS is designed to act like WinAmp, and use the thousands and thousands of WinAmp skins available.
I'm out of my mind right now, but feel free to leave a message.....
me@box2$ ssh box1
Password:
me@box1$ export SPEAKER="box2:0"
me@box1$ ogg123 cool_sounds.ogg
And hear it where I'm sitting, at box 2. Try THAt with esound or artsd.
I want my Cowboyneal
Well, we looked hard at the Network Audio System (NAS), and at DEC AudioFile, and esound and aRTs. And we looked hard at the efforts of Tice and Welch at the X Consortium whose X Common Audio project was to take the best of the NAS and DEC AudioFile to form the standard solution. And, we looked hard at all kinds of other soundserver-related things out there.
Our conclusion: none of them had the kind of system-pervasive time management one needs to handle sound, let alone video or other time-dependent information. The system that came closest to meeting our timing needs was DEC AudioFile, but it was not extensible enough for our needs, and lacked support for sample rate conversion.
We didn't take the conclusion lightly. As you say, there's all these applications that support the Network Audio System natively. There's all those old NCD X tubes that support it in firmware, too. And, I really have no interest in stepping away from code that has most of its bugs worked out. But, we just did not see how NAS would scale in both performance and in functionality to handle the kind of high-performance multi-media we all want to see on Linux and UNIX.
I think MAS is a great platform to handle the timing. It's young, though. We're working hard now on a soundserver-style API to ride on top of the lower level core API that's in the source distribution. Beyond that, there are a host of security issues to work through, and the X.org standards process. (Also on our to-do list is a more detailed developement roadmap for the website!)
I think there's a ton of cool, useful stuff in the core of MAS now. For instance, we compute a running estimate of your soundcard's actual sampling rate. You can use that estimate to drive the sample rate converter (srate) device to resample audio to the actual rate of your sound card. We've been appalled at how far off some soundcards' crystals have been!
Please be patient if you e-mail us... We're getting a lot of e-mails for some reason.
Thanks,
Mike Andrews
Lead Developer, Media Application Server (MAS) Project
No, you can still use GStreamer. We're working with the GStreamer guys to get the integration right.
Comment removed based on user account deletion
Have you ever tried to use aRts' network transparancy? It's a sick joke. Neraly impossible to get functioning correctly, impossible to get working acceptably, and lacking any useful documentation or examples. I tried setting it up so I could have network audio on a (net-booted, diskless, Debian) X-terminal. I had to install aRtsd on the X-terminal (no problem), but ran in to problems because the aRts server must run as the same user that's logged in to the server. Small problem, since I use LDAP, but this destroyed my dreams of zero-administration on the X-Terminal. Oh, and aRtsd needs to be spawned on the X-Terminal at login time, and it doesn't die when you log out, so you need to manually kill off all the artsd processes, or restart the terminal.
When I did (finally) get it to work at all, the sound stuttered when playing any kind of audio. Upped the buffers, to no avail. This is on a 100mbit switched network.
Filed a bunch of bugs with the KDE/aRts folks, posted to the mailing lists and never got a satisfactory reply or fix.
Bring on MAS.