Open Sound System: Difference between revisions
imported>VulcanSphere m Changing short description from "Audio interface for Unix-like operating systems" to "Sound server for Unix-like operating systems" |
imported>VulcanSphere Rescuing 9 sources and tagging 0 as dead.) #IABot (v2.0.9.5 |
||
| Line 32: | Line 32: | ||
cat /dev/dsp > a.a # reads data from the microphone and copies it to file a.a | cat /dev/dsp > a.a # reads data from the microphone and copies it to file a.a | ||
OSS implements the [[/dev/audio]] interface. Detailed access to individual sound devices is provided via the {{tt|/dev/oss}} directory. OSS also has MIDI support in {{tt|/dev/sequencer}}, {{tt|/dev/music}} (both legacy) and {{tt|/dev/mini}}.<ref>{{cite web |title=OSS v4.x API reference - OSS API basics |url=http://manuals.opensound.com/developer/ossapi.html |website=manuals.opensound.com}}</ref><ref>{{cite web |title=Open Sound System (3.x) Programmer's Guide |url=http://www.opensound.com/pguide/oss.pdf |access-date=22 February 2023 |date=2000}}</ref> | OSS implements the [[/dev/audio]] interface. Detailed access to individual sound devices is provided via the {{tt|/dev/oss}} directory. OSS also has MIDI support in {{tt|/dev/sequencer}}, {{tt|/dev/music}} (both legacy) and {{tt|/dev/mini}}.<ref>{{cite web |title=OSS v4.x API reference - OSS API basics |url=http://manuals.opensound.com/developer/ossapi.html |website=manuals.opensound.com |access-date=2023-02-22 |archive-date=2023-03-24 |archive-url=https://web.archive.org/web/20230324005757/http://manuals.opensound.com/developer/ossapi.html |url-status=live }}</ref><ref>{{cite web |title=Open Sound System (3.x) Programmer's Guide |url=http://www.opensound.com/pguide/oss.pdf |access-date=22 February 2023 |date=2000}}</ref> | ||
On Linux, OSS4 is also able to emulate [[Advanced Linux Sound Architecture|ALSA]], its open-source replacement.<ref>{{cite web |title=Tips And Tricks - Open Sound System |url=http://www.opensound.com/wiki/index.php/Tips_And_Tricks#ALSA_Emulation |website=ossnext.trueinstruments.com}}</ref> | On Linux, OSS4 is also able to emulate [[Advanced Linux Sound Architecture|ALSA]], its open-source replacement.<ref>{{cite web |title=Tips And Tricks - Open Sound System |url=http://www.opensound.com/wiki/index.php/Tips_And_Tricks#ALSA_Emulation |website=ossnext.trueinstruments.com |access-date=2009-12-31 |archive-date=2009-12-29 |archive-url=https://web.archive.org/web/20091229230819/http://www.opensound.com/wiki/index.php/Tips_And_Tricks#ALSA_Emulation |url-status=live }}</ref> | ||
== History == | == History == | ||
OSS was originally "VoxWare", a Linux kernel sound driver by Hannu Savolainen. Savolainen made the code available under [[free software]] licenses, GPL for Linux and BSD for BSD distributions. Between November 1993 (and Linux 1.00)<ref>{{Cite web |title=Linux 0.99 patchlevel 14 - Diff - 75bb5836a8a8c0ee44ffd60a51f357b9568f1381^! - pub/scm/linux/kernel/git/nico/archive - Git at Google |url=https://kernel.googlesource.com/pub/scm/linux/kernel/git/nico/archive/+/75bb5836a8a8c0ee44ffd60a51f357b9568f1381%5E!/ |access-date=2024-03-22 |website=kernel.googlesource.com}}</ref> and 1997, OSS was the sole choice of sound system in FreeBSD and Linux. This was changed when Luigi Rizzo wrote a new "pcm" driver for FreeBSD in 1997, and when Jaroslav Kysela started [[Advanced Linux Sound Architecture]] in 1998.<ref name=fbsd>{{cite web |title=Sound - FreeBSD Wiki |url=https://wiki.freebsd.org/Sound |website=wiki.freebsd.org}}</ref> | OSS was originally "VoxWare", a Linux kernel sound driver by Hannu Savolainen. Savolainen made the code available under [[free software]] licenses, GPL for Linux and BSD for BSD distributions. Between November 1993 (and Linux 1.00)<ref>{{Cite web |title=Linux 0.99 patchlevel 14 - Diff - 75bb5836a8a8c0ee44ffd60a51f357b9568f1381^! - pub/scm/linux/kernel/git/nico/archive - Git at Google |url=https://kernel.googlesource.com/pub/scm/linux/kernel/git/nico/archive/+/75bb5836a8a8c0ee44ffd60a51f357b9568f1381%5E!/ |access-date=2024-03-22 |website=kernel.googlesource.com |archive-date=2024-03-22 |archive-url=https://web.archive.org/web/20240322224917/https://kernel.googlesource.com/pub/scm/linux/kernel/git/nico/archive/%20/75bb5836a8a8c0ee44ffd60a51f357b9568f1381%5E%21/ |url-status=live }}</ref> and 1997, OSS was the sole choice of sound system in FreeBSD and Linux. This was changed when Luigi Rizzo wrote a new "pcm" driver for FreeBSD in 1997, and when Jaroslav Kysela started [[Advanced Linux Sound Architecture]] in 1998.<ref name=fbsd>{{cite web |title=Sound - FreeBSD Wiki |url=https://wiki.freebsd.org/Sound |website=wiki.freebsd.org |access-date=2023-02-22 |archive-date=2023-03-29 |archive-url=https://web.archive.org/web/20230329234157/https://wiki.freebsd.org/Sound |url-status=live }}</ref> | ||
In 2002, Savolainen was contracted by the company [[4Front Technologies]] and made the upcoming OSS 4, which includes support for newer sound devices and improvements, [[proprietary software|proprietary]]. In response, the Linux community abandoned the OSS/free implementation included in the kernel and development effort switched to the replacement [[Advanced Linux Sound Architecture]] (ALSA). FreeBSD by this time had switched to a "newpcm" project started in 1999 and was not affected.<ref name=fbsd/> | In 2002, Savolainen was contracted by the company [[4Front Technologies]] and made the upcoming OSS 4, which includes support for newer sound devices and improvements, [[proprietary software|proprietary]]. In response, the Linux community abandoned the OSS/free implementation included in the kernel and development effort switched to the replacement [[Advanced Linux Sound Architecture]] (ALSA). FreeBSD by this time had switched to a "newpcm" project started in 1999 and was not affected.<ref name=fbsd/> | ||
In July 2007, 4Front Technologies released sources for OSS under [[Common Development and Distribution License|CDDL-1.0]] for [[OpenSolaris]] and [[GNU General Public License|GPL-2.0-only]] for [[Linux]]. Drivers for some soundcards remained closed-source and were not included in the release.<ref name="OSS-liberated-2007" /> In January 2008, 4Front Technologies released OSS for [[FreeBSD]] (and other [[BSD]] systems) under the [[BSD Licenses|BSD-2-Clause]].<ref name="OSS-BSD-2008">{{citation |url=http://www.opensound.com/press/2008/oss-bsd.txt |title=4Front Technologies releases OSS for FreeBSD under the BSD license |publisher=opensound.com |access-date=2012-01-08}}</ref> | In July 2007, 4Front Technologies released sources for OSS under [[Common Development and Distribution License|CDDL-1.0]] for [[OpenSolaris]] and [[GNU General Public License|GPL-2.0-only]] for [[Linux]]. Drivers for some soundcards remained closed-source and were not included in the release.<ref name="OSS-liberated-2007" /> In January 2008, 4Front Technologies released OSS for [[FreeBSD]] (and other [[BSD]] systems) under the [[BSD Licenses|BSD-2-Clause]].<ref name="OSS-BSD-2008">{{citation |url=http://www.opensound.com/press/2008/oss-bsd.txt |title=4Front Technologies releases OSS for FreeBSD under the BSD license |publisher=opensound.com |access-date=2012-01-08 |archive-date=2010-09-25 |archive-url=https://web.archive.org/web/20100925032315/http://opensound.com/press/2008/oss-bsd.txt |url-status=live }}</ref> | ||
== Adoption status == | == Adoption status == | ||
| Line 53: | Line 53: | ||
The OSS API has remained influential despite the obscurity of the original library. NetBSD's documentation describes it as "the preferred API in FreeBSD and Solaris".<ref name="NetBSDman">{{cite web |title=ossaudio(3) - NetBSD Manual Pages |url=https://man.netbsd.org/NetBSD-10.0-STABLE/ossaudio.3 |website=man.netbsd.org}}</ref> | The OSS API has remained influential despite the obscurity of the original library. NetBSD's documentation describes it as "the preferred API in FreeBSD and Solaris".<ref name="NetBSDman">{{cite web |title=ossaudio(3) - NetBSD Manual Pages |url=https://man.netbsd.org/NetBSD-10.0-STABLE/ossaudio.3 |website=man.netbsd.org}}</ref> | ||
[[FreeBSD]] contains an independently developed implementation of the OSS API, which includes, among other things, in-kernel resampling, [[Audio mixing (recorded music)|mixing]] (vchans), equalizer, surround sound, and independent volume control for each application. It also supports bit-perfect mode.<ref>{{citation |url=http://www.freebsd.org/cgi/man.cgi?sound |title=sound |publisher=Freebsd.org |date=2009-07-13 |access-date=2012-01-08}}</ref> It gradually evolved from the "newpcm" replacement written in 1999 and caught up with OSS4 API around 2005.<ref name=fbsd/> | [[FreeBSD]] contains an independently developed implementation of the OSS API, which includes, among other things, in-kernel resampling, [[Audio mixing (recorded music)|mixing]] (vchans), equalizer, surround sound, and independent volume control for each application. It also supports bit-perfect mode.<ref>{{citation |url=http://www.freebsd.org/cgi/man.cgi?sound |title=sound |publisher=Freebsd.org |date=2009-07-13 |access-date=2012-01-08 |archive-date=2016-03-04 |archive-url=https://web.archive.org/web/20160304054601/http://www.freebsd.org/cgi/man.cgi?sound |url-status=live }}</ref> It gradually evolved from the "newpcm" replacement written in 1999 and caught up with OSS4 API around 2005.<ref name=fbsd/> | ||
[[NetBSD]] supports a compatibility mode for the OSS API, by providing the <code>soundcard.h</code> header file and the <code>libossaudio</code> library, which internally operate using the native Sun-like audio interface. The replacement was first seen in NetBSD 1.3 of 1998.<ref name="NetBSDman"/> | [[NetBSD]] supports a compatibility mode for the OSS API, by providing the <code>soundcard.h</code> header file and the <code>libossaudio</code> library, which internally operate using the native Sun-like audio interface. The replacement was first seen in NetBSD 1.3 of 1998.<ref name="NetBSDman"/> | ||
Linux had, as aforementioned, switched to [[Advanced Linux Sound Architecture]] since 2003 (kernel 2.6). ALSA provides an optional, in-kernel, OSS emulation mode that appears to programs as if it were OSS.<ref>{{citation|url=http://www.alsa-project.org/~tiwai/OSS-Emulation.html|title=OSS Emulation|access-date=2012-07-07|archive-url=https://web.archive.org/web/20120605094307/http://www.alsa-project.org/~tiwai/OSS-Emulation.html|archive-date=2012-06-05|url-status=dead}}</ref> ALSA also has a ''aoss'' userspace program that works by intercepting systems calls directed to the OSS device files.<ref>{{cite web |title=aoss(1) — Arch manual pages |url=https://man.archlinux.org/man/extra/alsa-oss/aoss.1.en |website=man.archlinux.org}}</ref> | Linux had, as aforementioned, switched to [[Advanced Linux Sound Architecture]] since 2003 (kernel 2.6). ALSA provides an optional, in-kernel, OSS emulation mode that appears to programs as if it were OSS.<ref>{{citation|url=http://www.alsa-project.org/~tiwai/OSS-Emulation.html|title=OSS Emulation|access-date=2012-07-07|archive-url=https://web.archive.org/web/20120605094307/http://www.alsa-project.org/~tiwai/OSS-Emulation.html|archive-date=2012-06-05|url-status=dead}}</ref> ALSA also has a ''aoss'' userspace program that works by intercepting systems calls directed to the OSS device files.<ref>{{cite web |title=aoss(1) — Arch manual pages |url=https://man.archlinux.org/man/extra/alsa-oss/aoss.1.en |website=man.archlinux.org |access-date=2023-02-22 |archive-date=2022-05-25 |archive-url=https://web.archive.org/web/20220525224727/https://man.archlinux.org/man/extra/alsa-oss/aoss.1.en |url-status=live }}</ref> | ||
== OSS/3D == | == OSS/3D == | ||
| Line 67: | Line 67: | ||
== Criticism == | == Criticism == | ||
OSS both as API and as software has been criticized by some developers, such as [[Paul Davis (programmer)|Paul Davis]] (of [[JACK Audio Connection Kit]]) and [[Lennart Poettering]] (of competing [[PulseAudio]]).<ref>{{Cite web|url=http://equalarea.com/paul/alsa-audio.html|title = A tutorial on using the ALSA Audio API}}</ref>{{Failed verification|date=May 2024}}<ref>{{Cite web|url=https://lwn.net/Articles/450299/|title=Interview with Lennart Poettering (LinuxFR.org) [LWN.net]|website=lwn.net}}</ref> | OSS both as API and as software has been criticized by some developers, such as [[Paul Davis (programmer)|Paul Davis]] (of [[JACK Audio Connection Kit]]) and [[Lennart Poettering]] (of competing [[PulseAudio]]).<ref>{{Cite web|url=http://equalarea.com/paul/alsa-audio.html|title=A tutorial on using the ALSA Audio API|access-date=2013-09-17|archive-date=2013-09-11|archive-url=https://web.archive.org/web/20130911205857/http://equalarea.com/paul/alsa-audio.html|url-status=live}}</ref>{{Failed verification|date=May 2024}}<ref>{{Cite web|url=https://lwn.net/Articles/450299/|title=Interview with Lennart Poettering (LinuxFR.org) [LWN.net]|website=lwn.net|access-date=2016-07-21|archive-date=2016-09-14|archive-url=https://web.archive.org/web/20160914091821/https://lwn.net/Articles/450299/|url-status=live}}</ref> | ||
== See also == | == See also == | ||
| Line 81: | Line 81: | ||
* {{Official website|http://www.opensound.com/}} | * {{Official website|http://www.opensound.com/}} | ||
* [http://www.4front-tech.com/wiki/index.php/Building_OSSv4_from_source Building the Open Sound System From Source] | * [http://www.4front-tech.com/wiki/index.php/Building_OSSv4_from_source Building the Open Sound System From Source] | ||
* [ | * [https://insanecoding.blogspot.com/2009/06/state-of-sound-in-linux-not-so-sorry.html State of sound in Linux not so sorry after all] | ||
{{Linux kernel}} | {{Linux kernel}} | ||
Latest revision as of 05:55, 18 August 2025
Template:Short description Script error: No such module "Infobox".Template:Template other Script error: No such module "Check for unknown parameters".Script error: No such module "Check for conflicting parameters".
The Open Sound System (OSS) is an interface for making and capturing sound in Unix and Unix-like operating systems. It is based on standard Unix devices system calls (i.e. POSIX read, write, ioctl, etc.). The term also sometimes refers to the software in a Unix kernel that provides the OSS interface; it can be thought of as a device driver (or a collection of device drivers) for sound controller hardware. The goal of OSS is to allow the writing of sound-based applications that are agnostic of the underlying sound hardware.
OSS was created by Hannu Savolainen and is distributed under four license options, three of which are free software licences, thus making OSS free software.[1]
API
The API is designed to use the traditional Unix framework of open(), read(), write(), and ioctl(), via device files. For instance, the default device for sound input and output is /dev/dsp. Examples using the shell:
cat /dev/random > /dev/dsp # plays white noise through the speaker cat /dev/dsp > a.a # reads data from the microphone and copies it to file a.a
OSS implements the /dev/audio interface. Detailed access to individual sound devices is provided via the Template:Tt directory. OSS also has MIDI support in Template:Tt, Template:Tt (both legacy) and Template:Tt.[2][3]
On Linux, OSS4 is also able to emulate ALSA, its open-source replacement.[4]
History
OSS was originally "VoxWare", a Linux kernel sound driver by Hannu Savolainen. Savolainen made the code available under free software licenses, GPL for Linux and BSD for BSD distributions. Between November 1993 (and Linux 1.00)[5] and 1997, OSS was the sole choice of sound system in FreeBSD and Linux. This was changed when Luigi Rizzo wrote a new "pcm" driver for FreeBSD in 1997, and when Jaroslav Kysela started Advanced Linux Sound Architecture in 1998.[6]
In 2002, Savolainen was contracted by the company 4Front Technologies and made the upcoming OSS 4, which includes support for newer sound devices and improvements, proprietary. In response, the Linux community abandoned the OSS/free implementation included in the kernel and development effort switched to the replacement Advanced Linux Sound Architecture (ALSA). FreeBSD by this time had switched to a "newpcm" project started in 1999 and was not affected.[6]
In July 2007, 4Front Technologies released sources for OSS under CDDL-1.0 for OpenSolaris and GPL-2.0-only for Linux. Drivers for some soundcards remained closed-source and were not included in the release.[1] In January 2008, 4Front Technologies released OSS for FreeBSD (and other BSD systems) under the BSD-2-Clause.[7]
Adoption status
Code
OSS4 now exists mostly as a standalone piece of software, not integrated into the kernel source code. The exception is Solaris and OpenSolaris, which use a fork of OSS4 called Boomer. It combines the OSS4 framework (audio and mixer) together with Sun's earlier SADA (/dev/audio) API.[8]
Although Linux distributions such as Ubuntu made OSS4 available as a software package after it was made free software, they have chosen to ignore any bugs filed against these packages.[9]
API
The OSS API has remained influential despite the obscurity of the original library. NetBSD's documentation describes it as "the preferred API in FreeBSD and Solaris".[10]
FreeBSD contains an independently developed implementation of the OSS API, which includes, among other things, in-kernel resampling, mixing (vchans), equalizer, surround sound, and independent volume control for each application. It also supports bit-perfect mode.[11] It gradually evolved from the "newpcm" replacement written in 1999 and caught up with OSS4 API around 2005.[6]
NetBSD supports a compatibility mode for the OSS API, by providing the soundcard.h header file and the libossaudio library, which internally operate using the native Sun-like audio interface. The replacement was first seen in NetBSD 1.3 of 1998.[10]
Linux had, as aforementioned, switched to Advanced Linux Sound Architecture since 2003 (kernel 2.6). ALSA provides an optional, in-kernel, OSS emulation mode that appears to programs as if it were OSS.[12] ALSA also has a aoss userspace program that works by intercepting systems calls directed to the OSS device files.[13]
OSS/3D
OSS/3D is a plugin for music players, which acts as an audio postprocessing engine. Supported players include Winamp, Windows Media Player (9 or later), musicmatch, Sonique, Foobar2000, JetAudio, XMMS. It is ported to Windows and Linux platforms. Unlike the OSS, it is shareware.
4Front OSS3D was later renamed to Joesoft Hear.[14]
Criticism
OSS both as API and as software has been criticized by some developers, such as Paul Davis (of JACK Audio Connection Kit) and Lennart Poettering (of competing PulseAudio).[15]Script error: No such module "Unsubst".[16]
See also
Script error: No such module "Portal".
- Advanced Linux Sound Architecture – prevailing sound framework in the Linux kernel
- PulseAudio – a sound server for desktop use, commonly used on Linux systems
- JACK Audio Connection Kit – prevailing sound server for professional audio production on Linux
References
<templatestyles src="Reflist/styles.css" />
- ↑ a b Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ a b c Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ a b Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
Script error: No such module "Check for unknown parameters".
External links
- Script error: No such module "Official website".Script error: No such module "Check for unknown parameters".
- Building the Open Sound System From Source
- State of sound in Linux not so sorry after all