The Open Sound System (OSS) is an interface for making and capturing sound in
Unix and
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
operating systems. It is based on standard Unix
devices system calls (i.e.
POSIX
The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
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
Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
.
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 directory. OSS also has MIDI support in , (both legacy) and .
On Linux, OSS4 is also able to emulate
ALSA, its open-source replacement.
History
OSS was originally "VoxWare", a Linux kernel sound driver by Hannu Savolainen. Savolainen made the code available under
free software
Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
licenses, GPL for Linux and BSD for BSD distributions. Between November 1993 (and Linux 1.00) 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.
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.
[
In July 2007, 4Front Technologies released sources for OSS under CDDL-1.0 for OpenSolaris and GPL-2.0-only for ]Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
. Drivers for some soundcards remained closed-source and were not included in the release. In January 2008, 4Front Technologies released OSS for FreeBSD (and other BSD systems) under the BSD-2-Clause.
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.
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.
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".
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. It gradually evolved from the "newpcm" replacement written in 1999 and caught up with OSS4 API around 2005.[
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.
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. ALSA also has a ''aoss'' userspace program that works by intercepting systems calls directed to the OSS device files.
OSS/3D
OSS/3D is a plugin for music players, which acts as an audio postprocessing engine. Supported players include Winamp, Windows Media Player
Windows Media Player (WMP, officially referred to as Windows Media Player Legacy to retronym, distinguish it from Windows Media Player (2022), the new Windows Media Player introduced with Windows 11) is the first media player (application soft ...
(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.
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).
See also
* 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
External links
*
Building the Open Sound System From Source
{{Linux kernel
Application programming interfaces
Audio libraries
Cross-platform software
Free audio software
Linux kernel features
Formerly proprietary software
Formerly open-source or free software