History log of /openbsd/lib/libsndio/sio.c (Results 1 – 25 of 27)
Revision Date Author Comments
# ec8a3410 29-Apr-2022 ratchov <ratchov@openbsd.org>

Add sio_flush(3) function to stop playback immediately

The new sio_flush(3) functions works the same way as sio_stop(3),
except that it doesn't wait for play buffer to be drained. Instead,
it discar

Add sio_flush(3) function to stop playback immediately

The new sio_flush(3) functions works the same way as sio_stop(3),
except that it doesn't wait for play buffer to be drained. Instead,
it discards its contents and returns immediately.

show more ...


# 36355b88 01-Nov-2021 ratchov <ratchov@openbsd.org>

Stop binding audio devices exposed by sndiod to physical devices

This a shift towards a new model: clients connect to logical devices
(created with -s option) then the server routes data to/from the

Stop binding audio devices exposed by sndiod to physical devices

This a shift towards a new model: clients connect to logical devices
(created with -s option) then the server routes data to/from the
underlying physical device (registered with -f option). The binding
may be changed at run-time with the server.device control exposed by
sndioctl(1).

As audio devices exposed by sndiod(8) are not bound to fixed physical
devices anymore, the physical audio device number component of
sndio(7) descriptors was removed.

fixes, help from and ok denis, edd

show more ...


# 3801dd11 19-Nov-2020 ratchov <ratchov@openbsd.org>

Allow specific devices to be used for play-only and rec-only modes.

Introduce new AUDIO{PLAY,REC}DEVICE environment variables that
override AUDIODEVICE in cases play-only and rec-only mode is
reques

Allow specific devices to be used for play-only and rec-only modes.

Introduce new AUDIO{PLAY,REC}DEVICE environment variables that
override AUDIODEVICE in cases play-only and rec-only mode is
requested. This allows using different devices for playback and
recording in programs requesting twice the default device (one in
play-only mode and one in rec-only mode).

Based on diffs from Peter J Philipp, semarie, and solene

ok solene, sthen

show more ...


# 95d14907 29-Jun-2019 ratchov <ratchov@openbsd.org>

Check if syscalls return -1 instead of any negative value.

"Looks right" deraadt


# 620c4a6d 31-Oct-2018 miko <miko@openbsd.org>

remove a guard in mio_read(), mio_write, sio_read() & sio_write() for a
zero length request. return value of zero is preserved in this case.

OK ratchov@


# 58aaf78f 19-Sep-2018 miko <miko@openbsd.org>

sys/stat.h not needed here; ok ratchov@


# e8cc0bfd 09-Jan-2016 ratchov <ratchov@openbsd.org>

Make code fit in 80 columns, remove trailing spaces & tabs.


# 163486f8 22-Nov-2015 ratchov <ratchov@openbsd.org>

Don't remove the type component from the device string before passing
it to the *_open() functions. It's more flexible this way. No behaviour
change.


# aea60bee 16-Jan-2015 deraadt <deraadt@openbsd.org>

Move to the <limits.h> universe.
review by millert, binary checking process with doug, concept with guenther


# a7fd6afb 10-Aug-2014 jsg <jsg@openbsd.org>

debug level test for clock_gettime() calls should match
ok ratchov@


# e6877796 05-Mar-2014 ratchov <ratchov@openbsd.org>

- use relative read/write positions to keep track of buffer
usage as seen by the caller
- refresh current position before reading/writing data, to keep the
current position always consistent with

- use relative read/write positions to keep track of buffer
usage as seen by the caller
- refresh current position before reading/writing data, to keep the
current position always consistent with read & write pointers
- fix confusion between processed samples by the hardware (as reported
by GET{I,O}OFFS) and samples played as reported by GETINFO(). Fixes
incorrect delta propagated after xruns in play-only and rec-only
modes
- don't wait for POLLIN or POLLOUT to be set to refresh ring pointers,
as they may not be set in certain cases. Fixes sndiod crash after
few days of continuous playback.
- save current parameters instead of calling getpar() too often

show more ...


# e791f9ef 20-Dec-2013 ratchov <ratchov@openbsd.org>

Be less verbose when SNDIO_DEBUG=1 is set.


# d418f94b 13-Nov-2013 ratchov <ratchov@openbsd.org>

Prefix by '_' symbols that are not part of the API.

ok deraadt, guenther


# ea382012 24-Aug-2013 ratchov <ratchov@openbsd.org>

Move underrun/overrun recovery code from the sun-api back-end to
the the generic code, so it can be used by other back-ends as well.
No behavior change (hopefully).


# 27e638e4 03-Apr-2013 guenther <guenther@openbsd.org>

Handle big time_t.
Use clock_gettime(CLOCK_MONOTONIC) instead of gettimeofday() when measuring
time intervals for debugging output.

ok ratchov@


# 4736f499 01-Feb-2013 ratchov <ratchov@openbsd.org>

If par->bufsz is set (it's documented as readonly since years) then
reset it and set par->appbufsz instead


# 77158b0c 27-Oct-2012 ratchov <ratchov@openbsd.org>

check that polled fd number is smaller than SIO_MAXNFDS


# 9f9aa69f 23-May-2012 ratchov <ratchov@openbsd.org>

Make the "default" string a valid device name that has the same effect
as NULL has. This will (hopefully) simplify ports where the user
passes the device string.


# a97aacfa 11-May-2012 ratchov <ratchov@openbsd.org>

The default device is selected with sndiod(1) or the AUDIODEVICE
environment variable, so stop using the /dev/audio symlink which
can't be used by sndiod(1) anyway


# 7207b069 11-Apr-2012 ratchov <ratchov@openbsd.org>

Use "unsigned int" rather than "unsigned". No object change.
suggested by deraadt@


# b3956098 15-Nov-2011 ratchov <ratchov@openbsd.org>

Add a "device number" component in sndio(7) device names, allowing a
single aucat instance to handle all audio and MIDI services. Since
this partially breaks compatibility, this is a opportunitiy to

Add a "device number" component in sndio(7) device names, allowing a
single aucat instance to handle all audio and MIDI services. Since
this partially breaks compatibility, this is a opportunitiy to fix few
other design mistakes (eg ':' being used by inet6, type name vs api
name confusion, etc..). This leads to the following names:

type[@hostname][,unit]/devnum[.option]

The device number is the minor device number for direct hardware
access (ie the 'N' in /dev/audioN). For aucat, this is the occurence
number of the -f (or -M) option.

There's a compatibility hook to keep old names working if only one
aucat server is running.

show more ...


# 20fb3e8c 09-May-2011 ratchov <ratchov@openbsd.org>

in sio_psleep(), use an array of SIO_MAXNFDS pollfd strucures rather
than a single one. No behaviour change


# 7fc0c100 06-May-2011 ratchov <ratchov@openbsd.org>

use an array of backends and iterate on it, instead of inlining
calls to sio_<backend>_open(). No behaviour change


# 32c0ffd1 06-May-2011 ratchov <ratchov@openbsd.org>

remove almost two years old hack to support legacy audio/midi
device names


# 8a67bd42 03-May-2011 ratchov <ratchov@openbsd.org>

determine the default device in backend code instead of the common
code. This is simpler as long as not all backends use the same
default.


12