summaryrefslogtreecommitdiffstats
path: root/lib/libsndio (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Currently midi capable programs can control midi hardware, butratchov2009-07-2511-37/+963
| | | | | | | | | | | | | | | | | | | | | | | | | | | cannot cooperate with other programs. The aim of this change is to allow any program to send midi data to other programs as they were midi hardware. For instance, this change should solve the longstanding problem of using a midi sequencer with software synthesizers. More precisely: - new midicat(1) utility (actually hardlink to aucat(1)). it creates software midi thru boxes, allowing programs to send midi messages to other programs as they were midi(4) hardware. - new midi api in libsndio (see mio_open(3)), to access midi(4) devices and midicat(1) sockets in a uniform way. - new device naming scheme <service>:<unit>[.<option>], common to audio and midi. - new sndio(7) manual describing concepts and naming The current audio device naming still works, but people having scripts or configuration files containing device names could read the sndio(7) man page and slowly start updating device names. discussed with jakemsr@ and deraadt@, help form jmc@
* don't set mode in sio_setpar(), already done at initializationratchov2009-05-161-2/+1
|
* add a new ``hello'' message to aucat protocol useful to work onratchov2009-05-161-5/+25
| | | | future aucat extentions. No functional changes.
* fix style to make future diffs contain functional changes onlyratchov2009-05-161-58/+58
|
* in aucat_getpar() and aucat_getcap(), initialize the message to sendratchov2009-05-161-3/+3
| | | | with AMSG_INIT(), rather than the reply we expect.
* cleanup forgotten calls to exit(3)ratchov2009-05-151-10/+17
|
* replace s/sa/sio/, left from when libsa was renamed to libsndioratchov2009-05-152-94/+94
|
* in headers, macro definitions come first, prototypes come nextratchov2009-05-151-15/+17
|
* if DEBUG is defined, use a global debug level ratherratchov2009-05-154-130/+116
| | | | than a per-stream debug level. No behaviour change.
* describe sio_getcap(), sio_pollfd() and sio_setvol() retrurn valuesratchov2009-05-151-3/+7
| | | | spotted by Philipp Schafft
* no need to install includes from here anymorederaadt2009-04-211-6/+1
|
* move src/lib/libsndio/sndio.h into src/include where other includeratchov2009-04-211-152/+0
| | | | | | files leave. requested by deraadt@, ok miod@
* protypes in sndio.h make reference to struct pollfd; applicationsratchov2009-04-131-1/+3
| | | | | | | that don't use sys/poll.h, wont compile with gcc2. Fix this by declaring the pollfd structure spotted by and ok deraadt
* don't use ``hdl->filling'' flag uninitializedratchov2009-02-261-1/+2
| | | | ok deraadt
* after the STOP message is sent, move the receiver to the RMSG stateratchov2009-02-251-3/+5
| | | | | | | only if it's in the IDLE state, otherwise in some rare cases a data chunk may be interpreted as a message, causing the connection to be dropped. ok deraadt
* in aucat_stop(), after the STOP message was send, put the receiverratchov2009-02-181-1/+3
| | | | | | in ``waiting state'', otherwise the ACK message will be skipped, and the other functions not expecting ACKs might be confused by the ACK.
* ignore evironment variables if the program is setuid or setgidratchov2009-02-091-3/+3
| | | | explained by deraadt, ok miod, ok millert
* update the default socket paths, to reflect recent aucat changesratchov2009-02-041-7/+7
|
* explain that it's ok if we get a slightly different rate thanratchov2009-02-041-3/+5
| | | | | the one we asked for, from Thomas Pfaff <tpfaff(at)tp76.info> with tweaks from jmc@
* Programs have no direct access do the device file descriptor. So, ifratchov2009-02-042-2/+10
| | | | | | | | the programs calls execvp(2), the new image can't use the device, which stays open, so other programs get EBUSY. Set the close-on-exec flag to avoid this. ok jakemsr
* in server mode, create /tmp/aucat-userid/ directory withratchov2009-02-032-6/+12
| | | | | | | | | | | | permissions 0700, and create sockets in it. This prevents one local user to eavesdrop or disturb audio programs of other users. if you're using the ``-s socket'' option with an absolute path as argument, please update it to use a socket name. requested by many, bits from jakemsr and otto ok jakemsr
* fix bugs section: clarify that sio_start() and sio_stop() shouldratchov2009-01-211-2/+2
| | | | not be used if blocking is not desirable.
* explain what ``frame'' does meanratchov2009-01-211-3/+7
| | | | | from Thomas Pfaff <tpfaff(at)tp76.info>, thanks! ok jmc
* make declarations "C" to allow c++ code to compileratchov2009-01-211-1/+9
| | | | discussed with espie@, ok jakemsr@ and millert@
* cleanup: remove prototypes of inexistent functions, move few privateratchov2009-01-172-7/+4
| | | | | functions into private header file. suggested by espie@
* replace s/routine/function/, as other manuals doratchov2009-01-121-24/+24
| | | | | from Thomas Pfaff <tpfaff(at)tp76.info>, thanks! ok jmc@
* make all private functions staticratchov2009-01-103-62/+62
|
* oops, i messed up tim's patch; correction from Tim van der Molenjmc2009-01-081-3/+3
|
* a little macro cleanup; from Tim van der Molenjmc2009-01-081-4/+8
|
* when polling aucat(1) socket, don't set the POLLIN bit if weratchov2008-12-271-2/+2
| | | | | don't expect messages. Avoids busy loops in programs calling poll(2) on a stopped device.
* when using the aucat(1) backend, don't mask the POLLHUP bitratchov2008-12-272-5/+5
| | | | | even if the device is not started yet. This way, if the server is killed programs can notice it.
* remove mixer bits from the audio(4) backend of libsndio, it's notratchov2008-12-211-106/+2
| | | | | possible to get them right in the current state of the mixer. discussed with jakemsr
* fix more spelling errors and typos,ratchov2008-12-214-22/+24
| | | | from Thomas Pfaff <tpfaff(at)@tp76.info>, thanks
* stop using stderr in the library, wrap all diagnostic fprintfsratchov2008-12-175-98/+121
| | | | | | so they are visible only when the DEBUG macro is #defined and SIO_DEBUG env. variable is set. requested by many, discussed with jakemsr
* tweak previous;jmc2008-12-171-4/+4
|
* fix spell errors, from Thomas Pfaff <tpfaff(at)tp76.info>, thanks!ratchov2008-12-172-11/+11
|
* add a writable ``appbufsz'' field to the sa_par structure, containingratchov2008-12-176-47/+66
| | | | | | | | the program-part of the buffer size, ie the part that is subject to underruns. Useful for apps like cdio(1) that don't have their own rings, or to apps that have a minimum ring size constraint. Setting the ``bufsz'' parameter becomes deprecated. ok jakemsr
* make both aucat(1) and audio(4) backends use the AUDIODEVICE envratchov2008-11-202-7/+6
| | | | | | variable to determine the socket or the device to use. Allow choosing the when aucat(1) is used too. Noticed and tested by naddy@
* while setting the block size, try smaller blocks half of the retries andratchov2008-11-201-5/+27
| | | | | | larger blocks the other half. That's because shrinking the block size may not be the right direction to go to find a common block size for play and record.
* occures -> occurs;jmc2008-11-171-3/+3
|
* allow aucat to run as server in play-only and record-only mode, soratchov2008-11-171-11/+18
| | | | | it can be used on play-only, record-only and half-duplex devices. ok jakemsr
* document that sio_revents() can return POLLHUPratchov2008-11-161-2/+5
|
* when the aucat backend is used, sio_revents(3) should return POLLHUPratchov2008-11-161-1/+3
| | | | if the connection to the server is lost.
* tweak previous;jmc2008-11-111-16/+16
|
* expose a volume knob in the sndio API: add sio_setvol(3) andratchov2008-11-118-59/+314
| | | | | | | sio_onvol(3) functions. The audio(4) backend tries to use the inputs.dac, outputs.dac, outputs.output and outputs.master controls (in this order). Add a sample file in regress/lib/libsndio/vol/vol.c
* typos; ok ratchov@ jmc@naddy2008-11-091-8/+8
|
* if the device is not started, make sio_pollfd() pass 0 events bitmapratchov2008-11-091-1/+3
| | | | | to the backend to avoid reporing the device as writable when it's stopped. Solves 100% CPU usage of apps poll()ing a stopped device.
* sio_revents() should return 0 poll events if the device isn't startedratchov2008-11-091-1/+3
|
* expose the block size in the sndio API by making par->round writableratchov2008-11-074-305/+91
| | | | | | | and thus remove the ugly rate <-> block-size table from sio_setpar(3). Handle the block size negociation in aucat(1), since it has few constrains the code is overally simpler. ok jakemsr@, major crank suggested by deraadt@
* only few (frequency, blocksize) pairs are compatible with both resamplingratchov2008-10-301-66/+240
| | | | | | | | | and block based audio i/o (arithmetic constraints). For now round the frequency to a supported one, (ie 8kHz, 11.025kHz, 12kHz multiple), and get the the block size from a table. fixes problem reported by Robert <robert _at_ openbsd.pap.st> ok jakemsr