|SNDIO(7)||Miscellaneous Information Manual||SNDIO(7)|
sndioaudio and MIDI system provides access to audio and MIDI hardware and to services provided by sndiod(8), summarized below.
Hardware audio(4) devices correspond to peripherals. Only one application may use any device at a given time. Generally a limited number of encodings, sample rates and channel numbers are supported by the hardware, which may not meet the requirements of audio programs.
To overcome hardware limitations and to allow multiple applications to share the hardware, sndiod(8) can be used. It exposes one or more software sub-devices backed by the underlying hardware, while doing all necessary conversions on the fly. It can mix multiple streams or split the hardware into multiple sub-devices, to allow programs to use the hardware concurrently.
Hardware MIDI ports correspond to serial connectors provided by the midi(4) driver. They are typically used to access MIDI hardware (synthesizers, keyboards, control surfaces, etc.), but they do not allow applications to exchange information using the MIDI protocol.
Software MIDI thru boxes allow one application to send MIDI data to other applications connected to the thru box (for instance a software sequencer can send events to multiple software synthesizers). There's no hardware involved: thru boxes are created by sndiod(8).
Additionally, sndiod(8) exposes a MIDI port used to control and monitor audio streams in real time using MIDI.
This information is used by audio and MIDI applications to determine how to access the audio device or MIDI port.
-Uoption of sndiod(8). Useful only if multiple sndiod(8) servers are running on the same system.
-fqoption on the command line.
-soption of sndiod(8).
defaultis used as the audio device, the program will use the one specified in the
AUDIODEVICEenvironment variable. If it is not set, the program first tries to connect to
snd/0. If that fails, it then tries to use
rsnd/0. This allows the sndiod(8) audio server to be used by default and the bare hardware as fallback; programs don't have to be reconfigured when sndiod(8) is started or stopped.
default is used as the MIDI port, the
program will use the one specified in the
environment variable. If it is not set, the program first tries to connect
midithru/0. If that fails, it then tries to use
rmidi/0. As long as
sndiod(8) is running, this allows
programs to exchange MIDI data on machines with no MIDI hardware by default,
e.g. a MIDI player could use a software synthesizer with no manual
If a session needs to be shared between multiple users, they can connect to the server using the same cookie.
These environment variables are ignored by
sndio if the program has the set-user-ID or
set-group-ID bits set.
|July 28, 2018||OpenBSD-current|