summaryrefslogtreecommitdiffstats
path: root/lib/libsndio (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add affinity between the program and its mixer control.ratchov2019-07-122-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.
* Add forgotten copyright notice, found by Jason Thorpe <thorpej at me.com>.ratchov2019-07-051-0/+17
| | | | Thanks!
* Check if syscalls return -1 instead of any negative value.ratchov2019-06-294-33/+33
| | | | "Looks right" deraadt
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-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.
* mkstemp() returns -1 on failurederaadt2019-06-281-2/+2
|
* Wait until server disconnects before closing the socket. Otherwise,ratchov2019-03-281-4/+17
| | | | last bytes sent may be lost by the server.
* Sayt that using capabilities to negociate audio parameters (ie usingratchov2019-01-181-2/+12
| | | | | | sio_getcap() function) is not recomended. From Paul Swanson <psw at protonmail.com>, ok jmc
* "a" MIDI, not "an";jmc2018-12-181-3/+3
|
* remove a guard in mio_read(), mio_write, sio_read() & sio_write() for amiko2018-10-312-22/+2
| | | | | | zero length request. return value of zero is preserved in this case. OK ratchov@
* call _sndio_parsenum() instead of duplicating the code in parsedev(); ok ratchov@miko2018-09-262-27/+10
|
* fix message to reflect "rmidi" is the expected string; ok ratchov@miko2018-09-191-2/+2
|
* sys/stat.h not needed here; ok ratchov@miko2018-09-194-8/+4
|
* Move libsndio session cookie in its own $HOME/.sndio/ directory toratchov2018-07-283-8/+18
| | | | | | make libsndio easier to use with unveil(2). "make sense" deraadt
* Rename the sndiod unix domain socket to /tmp/sndio/sockN to avoidratchov2018-07-281-4/+4
| | | | | | wondering what are these "aucat" files in /tmp. "make sense" deraadt
* Missed in previousjca2017-12-261-0/+36
| | | | Spotted by patrick@, thanks
* Use a version script to limit exported symbolsjca2017-12-262-3/+5
| | | | ok ratchov@ kettenis@
* * clean up macro usage: use .Ar for command arguments, .Cm for fixedschwarze2017-12-071-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@
* polish debug printfs, no behaviour change.ratchov2017-11-041-2/+6
|
* add missing HISTORY; based on CVS logs and release announcementsschwarze2017-10-171-2/+7
|
* Tweak RETURN VALUES section. Move description of sio_pollfd() andnatano2017-01-031-18/+28
| | | | | | sio_nfds() return values there and add a paragraph about sio_eof(). ok jmc ratchov
* Use the "new" audio(4) api and delete all the useless code to dealratchov2016-04-071-447/+154
| | | | | | | with artificial complications caused by the old api. No behaviour change. ok armani, semarie
* for some time now mandoc has not required MLINKS to functionjmc2016-03-301-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
* Document how to use sndio in pledged programs.tim2016-02-111-2/+57
| | | | Input and OK jmc@ ratchov@ semarie@
* Make code fit in 80 columns, remove trailing spaces & tabs.ratchov2016-01-097-21/+24
|
* fix SEE ALSO;jmc2016-01-071-3/+3
|
* Move sndiod man page to section 8.ratchov2016-01-073-34/+34
| | | | suggested by deraadt, fixes from jmc, ok millert
* remove NULL-checks before free()mmcc2015-12-231-5/+3
|
* Expose internal functions necessary to open audio devices and midiratchov2015-12-203-7/+19
| | | | ports using existing file descriptors.
* MIO_IN needs O_RDONLY, not O_WRONLYratchov2015-11-301-2/+2
|
* -M option was removed, midi ports registered with -qratchov2015-11-251-3/+3
|
* Fix confusion between SIO_xxx and MIO_xxx options (copy & paste error).ratchov2015-11-241-3/+3
|
* remove unneeded prototypesratchov2015-11-221-3/+1
|
* Don't remove the type component from the device string before passingratchov2015-11-229-70/+102
| | | | | it to the *_open() functions. It's more flexible this way. No behaviour change.
* Split function to initialize the raw device in two parts, one to openratchov2015-11-181-23/+44
| | | | | | the device node, the other to do the initialization. This will allow with minimal changes, work to be done in two process sharing the fd. No behaviour change.
* don't call AUDIO_SETFD ioctl as it's a no-opratchov2015-11-171-13/+2
|
* Fix missing checks for truncation of long file names. Rather thanratchov2015-10-051-14/+28
| | | | | checking for truncation every time we touch the string, simply allocate a memory chunk large enough to store the full path.
* use macros for cookie path and temp file template insteadratchov2015-10-021-3/+5
| | | | of hardcoded strings. no object change.
* Validate that midi and audio device numbers are integers.ratchov2015-10-024-7/+43
|
* As device path is known, use its size instead of PATH_MAXratchov2015-10-022-4/+12
|
* Use macros for audio and midi device paths rather than hardcodedratchov2015-10-022-4/+6
| | | | strings. No object change.
* As the socket path is known, use its size rather that PATH_MAX.ratchov2015-10-022-4/+11
|
* fix typo in debug messageratchov2015-10-021-2/+2
|
* use macros instead of hard-coded strings for unix sockets pathsratchov2015-10-022-6/+16
|
* fix spacingratchov2015-10-021-2/+2
|
* remove unused DEFAULT_OPT macroratchov2015-10-021-2/+1
|
* Remove support for the AUCAT_COOKIE environment variable.ratchov2015-10-012-17/+9
|
* Remove useless quoting from .Fo and .Fn function names, to preventschwarze2015-09-142-29/+29
| | | | | | development of a cargo cult in case people look at existing files for examples. This achieves a consistent .Fo and .Fn quoting style across the whole tree.
* Use "Ev" macro for AUCAT_COOKIE environment variable. From Michaelratchov2015-08-011-3/+3
| | | | Reed <m.reed at mykolab.com>. Thanks.
* Use new AUDIO_GETPOS ioctl instead of AUDIO_GETxOFFS andratchov2015-07-281-43/+24
| | | | | AUDIO_xERROR. It returns a snapshot of the counters we need and avoids inconsistencies.
* Fix arithmetic mistake causing errors when there are more xruns on theratchov2015-07-241-2/+2
| | | | | record side than on the play side. This almost never happens are record buffer are much larger than play buffers.