summaryrefslogtreecommitdiffstats
path: root/lib/libsndio (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add version number to aucat protocol. It's not used yet,ratchov2009-10-171-1/+2
| | | | | | | but later, it will permit aucat to reject connections from clients statically linked to a unsupported version of libsndio. idea from kittenis, otto and sthen
* when setting parameters of sun devices, check that selected encodingratchov2009-10-101-4/+23
| | | | is actually linear
* at initialization of sun devices, use sio_setpar(3) instead ofratchov2009-10-101-11/+10
| | | | | AUDIO_SETINFO() to set the initial parameters, since AUDIO_SETINFO() can fail.
* since AUDIO_INITINFO() may set parameters to whatever is supportedratchov2009-10-101-24/+59
| | | | | | | | by the device, we may end up with different recording and playback parameters, which will break almost all full duplex apps on such devices. For instance, this should fix full-duplex apps not working on devices that can record at any sample rate but can play at 48kHz only.
* don't consider calling sio_close() without calling sio_stop() firstratchov2009-08-282-6/+4
| | | | | as a programming error. At any stage the program should be alble to cleanly free resources and close the device.
* when using aucat backend, wait for the server to drop the connectionratchov2009-08-281-2/+7
| | | | on sio_close()
* add a new AMSG_BYE, sent by the client to requst the server toratchov2009-08-282-2/+12
| | | | | | free resources and drop the connection. This allows the client to ensuire that at any time it's using only one connection, thus only one MIDI control channel.
* handle incoming AMSG_SETVOL messages, allows the client to be notifiedratchov2009-08-261-1/+7
| | | | of volume changes
* make aucat(1) expose a MIDI device to control server behaviour inratchov2009-08-214-20/+50
| | | | | | realtime. For now only the playback volume of individual streams can be changed/monitored. To each stream is assigned a MIDI channel; the volume is changed/monitored using the standard controller number 7.
* honor non-blocking flag in mio_open_rmidi(), fixes programsratchov2009-08-011-3/+4
| | | | | eating 100% CPU while trying to use blocking i/o. ok jakemsr
* don't use ``return'' in sio_close() and mio_close()ratchov2009-07-272-4/+4
|
* more style improvemets, from Thomas Pfaffratchov2009-07-262-8/+8
|
* use ``sizeof(string) - 1'' rather than ``strlen(string)'' on staticratchov2009-07-263-8/+8
| | | | strings. suggested by Thomas Pfaff
* remove the (bogus) special case when mio_open() is called withratchov2009-07-261-16/+1
| | | | a midi device name starting with a separator
* rephrase description of (MIO_IN | MIO_OUT) moderatchov2009-07-261-4/+5
| | | | from Thomas Pfaff, ok jmc@
* Make ``static'' few functions that are prototyped as static but are notratchov2009-07-262-4/+4
| | | | | defined as such from Thomas Pfaff
* sort and space headers as per style(9)ratchov2009-07-266-13/+21
| | | | from Thomas Pfaff
* use const qualifier in libsndio, making it slightly more consistentratchov2009-07-2510-38/+38
| | | | | with open(2) and write(2) syscalls. from Thomas Pfaff, jakemsr is fine with it
* add sndio.7, forgotten in last commitratchov2009-07-251-0/+168
| | | | spotted by jasper@
* 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.