SNDIO(7)                   OpenBSD Reference Manual                   SNDIO(7)

NAME
     sndio - interface to audio and MIDI

DESCRIPTION
     The sndio audio and MIDI system provides access to audio and MIDI hard-
     ware and to services provided by aucat(1) and midicat(1), summarized be-
     low.

     Hardware audio(4) devices correspond to peripherals.  Only one applica-
     tion may use any device at a given time.  Generally a limited number of
     encodings, sample rates and channel numbers are supported by the hard-
     ware, which may not meet the requirements of audio programs.

     To overcome hardware limitations and to allow multiple applications to
     share the hardware, aucat(1) can be used.  It exposes one or more soft-
     ware subdevices backed by the underlying hardware, while doing all neces-
     sary conversions on the fly.  It can mix multiple streams or split the
     hardware into multiple subdevices, to allow programs to use the hardware
     concurently.

     Hardware MIDI ports correspond to serial connectors provided by the
     midi(4) driver.  They are typically used to access MIDI hardware (synthe-
     sizers, keyboards, control surfaces, etc.), but they do not allow appli-
     cations 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 midicat(1).

     Additionally, aucat(1) exposes a MIDI device used to control and monitor
     audio streams in real time using MIDI.

DEVICE NAMES
     From the user's perspective every audio interface, MIDI port, aucat(1) or
     midicat(1) service has a name of the form:

                       type:unit[.option]

     This information is used by audio and MIDI applications to determine how
     to access the audio or MIDI device or service.

     type    The type of the audio or MIDI device.  Possible values for audio
             devices are aucat and sun, corresponding to aucat(1) sockets and
             hardware audio(4) devices.  Possible values for MIDI devices are
             midithru, rmidi, and aucat corresponding to midicat(1) software
             MIDI thru boxes, hardware midi(4) ports and aucat(1) control
             through MIDI respectively.

     unit    For hardware audio or MIDI devices, this corresponds to the char-
             acter device minor number.  For audio or MIDI devices created
             with aucat(1) or midicat(1) it corresponds to the server unit
             number, typically 0.

     option  Corresponds to the profile string registered using the -s option
             of aucat(1).  Only meaningful for aucat device types.

     For example:

        sun:0         First hardware audio device.
        aucat:0       Default audio device of the first aucat(1) audio server.
        aucat:0.rear  First aucat(1) server; device registered with -s rear.
        rmidi:5       Hardware MIDI port number 5.
        midithru:0    First software MIDI thru box created with midicat(1).
        aucat:0       MIDI port controlling the first aucat(1) audio server.

ENVIRONMENT
     AUDIODEVICE     Audio device to use if the application provides no device
                     chooser.
     MIDIDEVICE      MIDI port to use if the application provides no MIDI port
                     chooser.

     Environment variables are ignored by programs with the set-user-ID or
     set-group-ID bits set.

FILES
     /dev/audioN                   Audio devices.
     /dev/rmidiN                   MIDI ports.
     /tmp/aucat-xxx/softaudioN     Audio devices provided by aucat(1).
     /tmp/aucat-xxx/midithruN      MIDI thru boxes provided by midicat(1).

SEE ALSO
     aucat(1), midicat(1), mio_open(3), sio_open(3), audio(4), midi(4)

OpenBSD 4.7                     August 21, 2009                              2
