summaryrefslogtreecommitdiff
path: root/usr.bin/aucat
AgeCommit message (Collapse)Author
2009-11-21use strtonum(3) and strtol(3) instead of sscanf(3)Alexandre Ratchov
suggested by deraadt@
2009-11-21spellingTheo de Raadt
2009-11-15If two (or more) inputs use channel ranges having no intersection,Alexandre Ratchov
then don't reduce their dynamic range to ``share the volume''.
2009-11-08use the same algorithm to attach play-only, record-only andAlexandre Ratchov
full-duplex streams. Fixes, streams with different modes not starting simultaneously.
2009-11-05in rpipe_done (wpipe_done), all buffers must be detachedAlexandre Ratchov
before deleting the writer (reader) otherwise the later could trigger rpipe_done again.
2009-11-04tweak previous;Jason McIntyre
2009-11-03Allow any program using aucat to act as MMC slave and MTC masterAlexandre Ratchov
transparently. Multiple audio applications can be started synchronously from external software/hardware supporting the standard Start/Stop/Relocate messages. The server clock is exposed through MTC, allowing non-audio software/hardware to be synchronized to audio applications.
2009-10-27slightly cleanup the socket and control bits:Alexandre Ratchov
- reject bogus clients ignoring flow control during the start phase - don't check if dev_midi is NULL, it can't be NULL anymore - use ``struct ctl_ops'' instead of a simple call-backs - don't try to flush play buffer if it's not attached yet
2009-10-27set the THRU_AUTOQUIT flag only for ``thru'' devicesAlexandre Ratchov
2009-10-27add missing word in error messageAlexandre Ratchov
2009-10-22When starting playback, the client tries to write ``bufsz'' framesAlexandre Ratchov
instead of ``appbufsz'', which violates the flow control mechanism. Fix this longstanding bug by enabling negative values in AMSG_MOVE messages, this way the client is notified when its stream is attached to the mixer, and can update its max transfer limit. Since this fix changes the AMSG_MOVE message format, we crank the protocol version, and thus remove code specific to the old protocol.
2009-10-22use .Ux in midicat.1, as we do for aucat.1 nowAlexandre Ratchov
2009-10-22write UNIX-domain in a more consistent way; while here, replace aIgor Sobrado
few remaining ".Tn UNIX" macros with ".Ux" ones. pointed out by ratchov@, thanks! ok jmc@
2009-10-22use the UNIX-related macros (.At and .Ux) where appropriate.Igor Sobrado
ok jmc@
2009-10-21when freeing buffers (i.e. when sio_stop() is called on client side),Alexandre Ratchov
clear the ``tickpending'' flag to avoid sending ticks corresponding to non existent buffers (which in turn confuses clients). found and analysed by jakemsr@
2009-10-17Add version number to aucat protocol. It's not used yet,Alexandre Ratchov
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
2009-10-12sort flags in description.Igor Sobrado
2009-10-10don't use a references to the device file to check the current modeAlexandre Ratchov
2009-10-10make dev_done() common to audio and MIDI, and drop dev_thrudone()Alexandre Ratchov
2009-10-10use dev_done() for loopback devices too and remove dev_loopdone()Alexandre Ratchov
2009-10-10We don't need independent file reader and writer anymore. So,Alexandre Ratchov
destroy reader when writer terminates and destroy writer when reader terminates. This simplifies a lot the way we drain audio devices and will help simplifying other parts.
2009-10-09Make abuf structure smaller:Alexandre Ratchov
- put aproc-specific parameters into unions since they are never used together - remove constant ``data'' pointer always pointing the end of the abuf structure
2009-10-06prevent aproc structures to be deleted twice. Doesn't change anythingAlexandre Ratchov
for now but will be used in future code.
2009-10-05add -d flag. When started in server mode, if the -d flag isAlexandre Ratchov
used aucat and midicat don't daemonize and log on stderr.
2009-09-27remove all debug tracesAlexandre Ratchov
2009-09-19if pipe_read() returns 0 we are at EOF and the structure describingJacob Meuser
the pipe will be free()d, so don't try to access the structure. ok ratchov
2009-09-19if the device is dying, don't try to stop it, otherwise this wouldAlexandre Ratchov
trigger the code to free() it, which will try to stop it, and so on
2009-09-19tag the device as stopped even if sio_stop() failed (ie. deviceAlexandre Ratchov
is disconnected). This way, when it's ``file'' structure is free()'d, we don't try to stop it again.
2009-08-29accept ``common'' messages (including system explusive) on theAlexandre Ratchov
control MIDI port.
2009-08-28add a new AMSG_BYE, sent by the client to requst the server toAlexandre Ratchov
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.
2009-08-28top device before closing it. It's necessary to ensure that if weAlexandre Ratchov
are using another instance of aucat as device, the server closes the connection before we open a new one.
2009-08-27don't discard the initial volume change message; now it mattersAlexandre Ratchov
because the initial volume may not be MIDI_MAXCTL
2009-08-27when an audio program connects to aucat, restore the volume itAlexandre Ratchov
had the last time. For instance, this fixes the problem of programs reopenning the connection to aucat very often and thus resetting the volume setting all the time.
2009-08-26when allocating the midi channel for the volume control of a newAlexandre Ratchov
client, pick the oldest unused channel rather than the first found. This way new clients don't reuse channels of recently used applications, thus improving a lot the client<->channel affinity.
2009-08-26oops, forgot to update usage();Jason McIntyre
2009-08-26don't mess with audio internals from within the midi bits. InsteadAlexandre Ratchov
use a call-back interface. This allows easily sending volume changes feedback to audio applications.
2009-08-25sub-devices exposed by aucat and sockets it's listening on areAlexandre Ratchov
no longer the same. Rephrase ``audio(4) device or aucat(1) socket'' as ``sndio(7) audio device''. suggested by oga@, tweaks from jmc@
2009-08-23Make aucat remember the control channel number a client is using. When theAlexandre Ratchov
client connects again later, assign the same channel to it. This way applications always get the same fader on MIDI control surfaces.
2009-08-21tweak previous;Jason McIntyre
2009-08-21make aucat(1) expose a MIDI device to control server behaviour inAlexandre Ratchov
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.
2009-08-19don't try to process -o arguments using the input file list, fixesAlexandre Ratchov
midicat crashing sometimes when -o is used
2009-08-19organize midi code like audio code, no functional changeAlexandre Ratchov
2009-08-17allow midicat to take multiple -i and -o optionsAlexandre Ratchov
2009-08-17if one or more MIDI devices are specified in server mode, subscribeAlexandre Ratchov
them to the MIDI thru box
2009-07-25sio_open returns a pointer so the < 0 comparison is wrongAlexandre Ratchov
from Thomas Pfaff, thanks
2009-07-25fix comments, remove no longer needed declaration, reorder includesAlexandre Ratchov
from Thomas Pfaff
2009-07-25Currently midi capable programs can control midi hardware, butAlexandre Ratchov
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@
2009-07-19missing va_end in abuf_dprn. ok ratchov@Martynas Venckus
2009-06-04don't trust the compiler to generate warnings we care about,Jonathan Gray
remove -Werror. ok ratchov@
2009-05-16use the ``hello'' message a to set the device mode, and thus makeAlexandre Ratchov
it mandatory. Old legacy clients setting the mode with sio_setpar() are still working thanks to small hack.