openbsd-ports/audio/jack/pkg
2022-03-11 18:20:04 +00:00
..
DESCR
PLIST drop RCS Ids 2022-03-11 18:20:04 +00:00
README drop RCS Ids 2022-03-11 18:20:04 +00:00

+-----------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-----------------------------------------------------------------------

In this package of jackd, the 'dummy' and 'sndio' drivers are supported.
The 'dummy' driver is mostly useful for testing jackd itself.  The
'sndio' driver uses sndio(7).  To start jackd with default driver
parameters, use the command 'jackd -d <driver>'.

By default, jackd runs in full-duplex mode with a relatively low
latency.  This may not be exactly what you want, and it may not be
possible with all hardware.  Therefore, some configuration options may
be necessary to effectively use jackd.  The 'sndio' driver options can
be viewed with the command 'jackd -d sndio -h'.  Below are some tips and
caveats to consider when using jackd on OpenBSD.

Some audio devices do not support full-duplex operation.  If jackd
errors out on startup with a message about opening a full-duplex device,
this is likely the problem.  If the device only supports playback, then
the driver needs to be configured to use 0 input channels.  For example
'jackd -d sndio -i 0' starts jackd in half-duplex play-only mode.

By default jackd uses 2 periods (blocks) of 1024 frames each.  This
means there will be at most 2048 frames in the playback buffer.  Some
slower or loaded machines may not be able to keep the playback buffer
from underrunning with these conditions.  Jackd is designed to use 2
periods, so if underruns are observed, it is best to first increase the
period size with the driver's -p option.  The period size should be a
power of two.  The number of periods can be increased with the -n
option.  For example, 'jackd -d sndio -p 2048 -n 4'.

The sndio driver uses 44100 Hz sampling rates by default.  Some devices
may not support the default sample rate.  Or it may be that most of the
audio that will pass through jackd is based on a different sample rate.
Avoiding sample rate conversion will use fewer CPU cycles and preserve
audio quality.  The -r option can be used to change the sampling rate as
in 'jackd -d sndio -r 48000'.

The realtime option -R is commonly used on other operating systems.
However, this option is inconsequential on OpenBSD.

It is possible to run jackd on top of sndiod(1) with the 'sndio' driver.
Note that jackd will use sndiod's block size as its period size. For
instance:

  - stop sndiod(8) using rc.d(8)
  - add the following to /etc/rc.conf.local(8):

    sndiod_flags=-b 1024 -z 512

  - start sndiod(8)
  - start jackd:

    $ jackd -d sndio -p 1024 -n 2

There is currently no MIDI driver in jack that works on OpenBSD.