summaryrefslogtreecommitdiffstats
path: root/lib/libsndio
AgeCommit message (Collapse)AuthorFilesLines
2020-11-29Clarify what sio_start() does exactlyratchov1-13/+13
Suggested by Erico Nogueira <ericonr@disroot.org>, help from and ok jmc@, schwarze@
2020-11-20* Make .Nd more specific.schwarze1-44/+57
* Avoid lots of short non-standard .Sh sections. * Describe server and raw descriptors separately. * Move examples to the EXAMPLES section. * Mention that "default" is used even when *not* specified. tweak and OK ratchov@
2020-11-20* Add SIO_BPS() to NAME and SYNOPSIS where it is missing.schwarze1-6/+15
* Use .Fn rather than .Dv for macros taking arguments. * Actually say what SIO_LE_NATIVE means. * Add closely related APIs to SEE ALSO. * Add missing HISTORY and AUTHORS sections. OK ratchov@
2020-11-19Allow specific devices to be used for play-only and rec-only modes.ratchov2-8/+25
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
2020-07-18Raw device access is not anymore a fall-back for when sndiod isn't runningratchov1-8/+2
Found by Jan Stary <hans at stare.cz>, discussed with jmc@
2020-06-28Use .Dv for SIOCTL_SEL, as we do for all other macrosratchov1-3/+3
2020-06-28Allow switching between alternate devices (-F option) with sndioctl(1)ratchov1-1/+1
2020-06-28Add a new SIOCTL_SEL control type to select one of a predefined set ofratchov1-5/+11
mutually exclusive values. It's the same as SIOCTL_LIST except that exactly one list element may be selected.
2020-06-20basic macro cleanup: .Fo for long .Fn lines, .Fa for struct fields,schwarze1-69/+75
avoid \*(Gt and \*(Lt, .Dv NULL, .Cm for pledge promises
2020-06-20add missing ENVIRONMENT. HISTORY, and AUTHORS sections,schwarze1-12/+29
and a few other wording and markup improvements while here; OK jmc@ ratchov@
2020-06-18uint8_t is a discrete, not a continuous type,schwarze1-9/+8
and some other wording improvements with respect to types; OK ratchov@
2020-06-18Many of these functions have several arguments, and some argumentsschwarze1-19/+48
are very long (function pointers), such that a number of input lines in the SYNOPSIS do not fit into 80 columns. Consequently, consistently use .Fo/.Fa/.Fc rather than .Fn for better readability of the source code. Mechanical diff, no output change.
2020-06-18basic macro cleanup, and reword two phrases about closed intervalsschwarze1-53/+52
of integers for clarity and to read better; one of the issues (abuse of .Sm) was originally reported by jmc@; ok jmc@ ratchov@
2020-06-18Document sioctl_desc structure maxval attributeratchov1-5/+19
2020-05-25Add missing .Xr and .Nm, reword and simplify few sentencesratchov1-13/+20
from schwarze@
2020-05-19remove information already given in same sentence;jmc1-2/+2
ok ratchov
2020-05-19Replace off-topic parts of the desciption by an architecture overviewratchov1-62/+58
Remove useless (re)wording of what are audio(4) and midi(4), add a quick description of sndiod as intermediate layer. Try to focuse on what the sndio library and sndiod do instead of how they do it. As suggested by schwarze, use the word "device descriptor" instead of "device name" to avoid the common confusion with the device files. ok and tweaks from jmc
2020-04-30If no "xxx.mute" control is found, try "xxx_mute"ratchov1-1/+11
Certain drivers (azalia, uaudio) use a control with the "_mute" suffix to expose the "mute" knob.
2020-04-21move mixerctl and audioctl man pages to section 8, as these workderaadt1-3/+3
against root-only device nodes.
2020-04-19spelling fix;jmc1-2/+2
2020-04-19Mention SIO_DEVANY instead of nonexistent SIOCTL_DEVANY constantfeinerer1-3/+3
OK ratchov@
2020-02-26Fix .Dt line and copyright year.ratchov1-3/+3
From jmc@, thanks.
2020-02-26Add API to control audio device parameters exposed by sndiod.ratchov9-5/+1304
The API exposes controls of modern audio hardware and sndiod software volume knobs in a uniform way. Hardware knobs are exposed through sndiod. Multiple programs may use the controls at the same time without the need to continuously scan the controls. For now sndiod exposes only its own controls and the master output and input volumes of the underlying hardware (if any), i.e. those typically exposed by acpi volume keys. ok deraadt
2019-07-12Add affinity between the program and its mixer control.ratchov2-3/+4
Currently, if there are two instances of the same program, sndiod will allocate one volume control to each. If both programs disconnect and reconnect, the information of which control is assigned to which program is lost. This makes difficult to run two instances of a player and crossfade between each other with a MIDI controller. To address this, the program chooses a 32-bit "id" (for now the process pid) and sends it to the server. The server records the id in the client's slot structure. When the server accepts a new connection, it uses the id to identify the slot the client used during the previous connection; if it was not recycled yet, it's assigned to the program.
2019-07-05Add forgotten copyright notice, found by Jason Thorpe <thorpej at me.com>.ratchov1-0/+17
Thanks!
2019-06-29Check if syscalls return -1 instead of any negative value.ratchov4-33/+33
"Looks right" deraadt
2019-06-28When system calls indicate an error they return -1, not some arbitraryderaadt1-18/+18
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-06-28mkstemp() returns -1 on failurederaadt1-2/+2
2019-03-28Wait until server disconnects before closing the socket. Otherwise,ratchov1-4/+17
last bytes sent may be lost by the server.
2019-01-18Sayt that using capabilities to negociate audio parameters (ie usingratchov1-2/+12
sio_getcap() function) is not recomended. From Paul Swanson <psw at protonmail.com>, ok jmc
2018-12-18"a" MIDI, not "an";jmc1-3/+3
2018-10-31remove a guard in mio_read(), mio_write, sio_read() & sio_write() for amiko2-22/+2
zero length request. return value of zero is preserved in this case. OK ratchov@
2018-09-26call _sndio_parsenum() instead of duplicating the code in parsedev(); ok ratchov@miko2-27/+10
2018-09-19fix message to reflect "rmidi" is the expected string; ok ratchov@miko1-2/+2
2018-09-19sys/stat.h not needed here; ok ratchov@miko4-8/+4
2018-07-28Move libsndio session cookie in its own $HOME/.sndio/ directory toratchov3-8/+18
make libsndio easier to use with unveil(2). "make sense" deraadt
2018-07-28Rename the sndiod unix domain socket to /tmp/sndio/sockN to avoidratchov1-4/+4
wondering what are these "aucat" files in /tmp. "make sense" deraadt
2017-12-26Missed in previousjca1-0/+36
Spotted by patrick@, thanks
2017-12-26Use a version script to limit exported symbolsjca2-3/+5
ok ratchov@ kettenis@
2017-12-07* clean up macro usage: use .Ar for command arguments, .Cm for fixedschwarze1-30/+33
strings to be used in commands, and .Li for example strings * clarify what uses the two environment variables, and that only these two are ignored for issetugid(2) programs triggered by a question from Jan Stary <hans at stare dot cz> feedback and OK ratchov@
2017-11-04polish debug printfs, no behaviour change.ratchov1-2/+6
2017-10-17add missing HISTORY; based on CVS logs and release announcementsschwarze1-2/+7
2017-01-03Tweak RETURN VALUES section. Move description of sio_pollfd() andnatano1-18/+28
sio_nfds() return values there and add a paragraph about sio_eof(). ok jmc ratchov
2016-04-07Use the "new" audio(4) api and delete all the useless code to dealratchov1-444/+151
with artificial complications caused by the old api. No behaviour change. ok armani, semarie
2016-03-30for some time now mandoc has not required MLINKS to functionjmc1-26/+1
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
2016-02-11Document how to use sndio in pledged programs.tim1-2/+57
Input and OK jmc@ ratchov@ semarie@
2016-01-09Make code fit in 80 columns, remove trailing spaces & tabs.ratchov7-21/+24
2016-01-07fix SEE ALSO;jmc1-3/+3
2016-01-07Move sndiod man page to section 8.ratchov3-34/+34
suggested by deraadt, fixes from jmc, ok millert
2015-12-23remove NULL-checks before free()mmcc1-5/+3