mirror of https://github.com/ericonr/sndio.git
Merge branch 'master' into mixer
This commit is contained in:
commit
1d7f175971
|
@ -45,8 +45,8 @@ MAN7 = sndio.7
|
||||||
#
|
#
|
||||||
# libraries to build and install
|
# libraries to build and install
|
||||||
#
|
#
|
||||||
MAJ = 6
|
MAJ = 7
|
||||||
MIN = 1
|
MIN = 0
|
||||||
SO = @so@
|
SO = @so@
|
||||||
SO_LINK = @so_link@
|
SO_LINK = @so_link@
|
||||||
|
|
||||||
|
|
|
@ -74,36 +74,36 @@ type[@hostname][,unit]/devnum[.option]
|
||||||
This information is used by audio and MIDI applications to determine
|
This information is used by audio and MIDI applications to determine
|
||||||
how to access the audio device or MIDI port.
|
how to access the audio device or MIDI port.
|
||||||
.Bl -tag -width "hostname"
|
.Bl -tag -width "hostname"
|
||||||
.It Pa type
|
.It Ar type
|
||||||
The type of the audio device or MIDI port.
|
The type of the audio device or MIDI port.
|
||||||
Possible values are:
|
Possible values are:
|
||||||
.Pp
|
.Pp
|
||||||
.Bl -tag -width "midithru" -offset 3n -compact
|
.Bl -tag -width "midithru" -offset 3n -compact
|
||||||
.It Pa rsnd
|
.It Cm rsnd
|
||||||
Raw
|
Raw
|
||||||
.Xr audio 4
|
.Xr audio 4
|
||||||
device.
|
device.
|
||||||
.It Pa rmidi
|
.It Cm rmidi
|
||||||
Raw
|
Raw
|
||||||
.Xr midi 4
|
.Xr midi 4
|
||||||
port.
|
port.
|
||||||
.It Pa snd
|
.It Cm snd
|
||||||
Audio device exposed by
|
Audio device exposed by
|
||||||
.Xr sndiod 8 .
|
.Xr sndiod 8 .
|
||||||
.It Pa midithru
|
.It Cm midithru
|
||||||
MIDI thru box created with
|
MIDI thru box created with
|
||||||
.Xr sndiod 8 .
|
.Xr sndiod 8 .
|
||||||
.It Pa midi
|
.It Cm midi
|
||||||
MIDI port exposed by
|
MIDI port exposed by
|
||||||
.Xr sndiod 8 .
|
.Xr sndiod 8 .
|
||||||
.It Pa default
|
.It Cm default
|
||||||
Default audio device or MIDI port (see below).
|
Default audio device or MIDI port (see below).
|
||||||
.El
|
.El
|
||||||
.It Pa hostname
|
.It Ar hostname
|
||||||
The hostname or address where the remote
|
The hostname or address where the remote
|
||||||
.Xr sndiod 8
|
.Xr sndiod 8
|
||||||
server to connect to is running.
|
server to connect to is running.
|
||||||
.It Pa unit
|
.It Ar unit
|
||||||
The number of the
|
The number of the
|
||||||
.Xr sndiod 8
|
.Xr sndiod 8
|
||||||
server to connect to, corresponding to the integer specified using the
|
server to connect to, corresponding to the integer specified using the
|
||||||
|
@ -113,7 +113,7 @@ option of
|
||||||
Useful only if multiple
|
Useful only if multiple
|
||||||
.Xr sndiod 8
|
.Xr sndiod 8
|
||||||
servers are running on the same system.
|
servers are running on the same system.
|
||||||
.It Pa devnum
|
.It Ar devnum
|
||||||
Device number.
|
Device number.
|
||||||
For hardware audio or MIDI ports, this corresponds to
|
For hardware audio or MIDI ports, this corresponds to
|
||||||
the character device minor number.
|
the character device minor number.
|
||||||
|
@ -122,7 +122,7 @@ For audio devices or MIDI ports created with
|
||||||
it corresponds to the number of the corresponding
|
it corresponds to the number of the corresponding
|
||||||
.Fl fq
|
.Fl fq
|
||||||
option on the command line.
|
option on the command line.
|
||||||
.It Pa option
|
.It Ar option
|
||||||
Corresponds to the sub-device string registered using the
|
Corresponds to the sub-device string registered using the
|
||||||
.Fl s
|
.Fl s
|
||||||
option of
|
option of
|
||||||
|
@ -132,31 +132,31 @@ option of
|
||||||
For example:
|
For example:
|
||||||
.Pp
|
.Pp
|
||||||
.Bl -tag -width "snd/0.rear" -offset 3n -compact
|
.Bl -tag -width "snd/0.rear" -offset 3n -compact
|
||||||
.It Pa rsnd/0
|
.It Li rsnd/0
|
||||||
First hardware audio device.
|
First hardware audio device.
|
||||||
.It Pa rmidi/5
|
.It Li rmidi/5
|
||||||
Hardware MIDI port number 5.
|
Hardware MIDI port number 5.
|
||||||
.It Pa snd/0
|
.It Li snd/0
|
||||||
First audio device exposed by
|
First audio device exposed by
|
||||||
.Xr sndiod 8 .
|
.Xr sndiod 8 .
|
||||||
.It Pa snd/0.rear
|
.It Li snd/0.rear
|
||||||
Sub-device registered with
|
Sub-device registered with
|
||||||
.Fl s Fa rear .
|
.Fl s Fa rear .
|
||||||
.It Pa midithru/0
|
.It Li midithru/0
|
||||||
First MIDI thru box created with
|
First MIDI thru box created with
|
||||||
.Xr sndiod 8 .
|
.Xr sndiod 8 .
|
||||||
.El
|
.El
|
||||||
.Sh DEFAULTS
|
.Sh DEFAULTS
|
||||||
If
|
If
|
||||||
.Pa default
|
.Cm default
|
||||||
is used as the audio device, the program will use the
|
is used as the audio device, the program will use the
|
||||||
one specified in the
|
one specified in the
|
||||||
.Ev AUDIODEVICE
|
.Ev AUDIODEVICE
|
||||||
environment variable.
|
environment variable.
|
||||||
If it is not set, the program first tries to connect to
|
If it is not set, the program first tries to connect to
|
||||||
.Pa snd/0 .
|
.Li snd/0 .
|
||||||
If that fails, it then tries to use
|
If that fails, it then tries to use
|
||||||
.Pa rsnd/0 .
|
.Li rsnd/0 .
|
||||||
This allows the
|
This allows the
|
||||||
.Xr sndiod 8
|
.Xr sndiod 8
|
||||||
audio server to be used by default and the bare hardware as fallback;
|
audio server to be used by default and the bare hardware as fallback;
|
||||||
|
@ -165,15 +165,15 @@ programs don't have to be reconfigured when
|
||||||
is started or stopped.
|
is started or stopped.
|
||||||
.Pp
|
.Pp
|
||||||
If
|
If
|
||||||
.Pa default
|
.Cm default
|
||||||
is used as the MIDI port, the program will use the
|
is used as the MIDI port, the program will use the
|
||||||
one specified in the
|
one specified in the
|
||||||
.Ev MIDIDEVICE
|
.Ev MIDIDEVICE
|
||||||
environment variable.
|
environment variable.
|
||||||
If it is not set, the program first tries to connect to
|
If it is not set, the program first tries to connect to
|
||||||
.Pa midithru/0 .
|
.Li midithru/0 .
|
||||||
If that fails, it then tries to use
|
If that fails, it then tries to use
|
||||||
.Pa rmidi/0 .
|
.Li rmidi/0 .
|
||||||
As long as
|
As long as
|
||||||
.Xr sndiod 8
|
.Xr sndiod 8
|
||||||
is running, this allows programs to exchange MIDI data on
|
is running, this allows programs to exchange MIDI data on
|
||||||
|
@ -199,15 +199,18 @@ can connect to the server using the same cookie.
|
||||||
.Sh ENVIRONMENT
|
.Sh ENVIRONMENT
|
||||||
.Bl -tag -width "AUDIODEVICEXXX" -compact
|
.Bl -tag -width "AUDIODEVICEXXX" -compact
|
||||||
.It Ev AUDIODEVICE
|
.It Ev AUDIODEVICE
|
||||||
Audio device to use if the application provides
|
Audio device that
|
||||||
no device chooser.
|
.Xr sio_open 3
|
||||||
|
uses if the application provides no device chooser.
|
||||||
.It Ev MIDIDEVICE
|
.It Ev MIDIDEVICE
|
||||||
MIDI port to use if the application provides
|
MIDI port that
|
||||||
no MIDI port chooser.
|
.Xr mio_open 3
|
||||||
|
uses if the application provides no MIDI port chooser.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
Environment variables are ignored by programs
|
These environment variables are ignored by
|
||||||
with the set-user-ID or set-group-ID bits set.
|
.Nm
|
||||||
|
if the program has the set-user-ID or set-group-ID bits set.
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Bl -tag -width "/dev/audioNXXX" -compact
|
.Bl -tag -width "/dev/audioNXXX" -compact
|
||||||
.It Pa /dev/audioN
|
.It Pa /dev/audioN
|
||||||
|
|
|
@ -644,7 +644,7 @@ sock_setpar(struct sock *f)
|
||||||
if (AMSG_ISSET(rchan) && (s->mode & MODE_RECMASK)) {
|
if (AMSG_ISSET(rchan) && (s->mode & MODE_RECMASK)) {
|
||||||
if (rchan < 1)
|
if (rchan < 1)
|
||||||
rchan = 1;
|
rchan = 1;
|
||||||
if (rchan > NCHAN_MAX)
|
else if (rchan > NCHAN_MAX)
|
||||||
rchan = NCHAN_MAX;
|
rchan = NCHAN_MAX;
|
||||||
s->sub.slot_cmin = f->opt->rmin;
|
s->sub.slot_cmin = f->opt->rmin;
|
||||||
s->sub.slot_cmax = f->opt->rmin + rchan - 1;
|
s->sub.slot_cmax = f->opt->rmin + rchan - 1;
|
||||||
|
@ -668,7 +668,7 @@ sock_setpar(struct sock *f)
|
||||||
if (AMSG_ISSET(pchan) && (s->mode & MODE_PLAY)) {
|
if (AMSG_ISSET(pchan) && (s->mode & MODE_PLAY)) {
|
||||||
if (pchan < 1)
|
if (pchan < 1)
|
||||||
pchan = 1;
|
pchan = 1;
|
||||||
if (pchan > NCHAN_MAX)
|
else if (pchan > NCHAN_MAX)
|
||||||
pchan = NCHAN_MAX;
|
pchan = NCHAN_MAX;
|
||||||
s->mix.slot_cmin = f->opt->pmin;
|
s->mix.slot_cmin = f->opt->pmin;
|
||||||
s->mix.slot_cmax = f->opt->pmin + pchan - 1;
|
s->mix.slot_cmax = f->opt->pmin + pchan - 1;
|
||||||
|
@ -692,7 +692,7 @@ sock_setpar(struct sock *f)
|
||||||
if (AMSG_ISSET(rate)) {
|
if (AMSG_ISSET(rate)) {
|
||||||
if (rate < RATE_MIN)
|
if (rate < RATE_MIN)
|
||||||
rate = RATE_MIN;
|
rate = RATE_MIN;
|
||||||
if (rate > RATE_MAX)
|
else if (rate > RATE_MAX)
|
||||||
rate = RATE_MAX;
|
rate = RATE_MAX;
|
||||||
s->round = dev_roundof(d, rate);
|
s->round = dev_roundof(d, rate);
|
||||||
s->rate = rate;
|
s->rate = rate;
|
||||||
|
|
Loading…
Reference in New Issue