summaryrefslogtreecommitdiff
path: root/usr.bin/aucat/aucat.c
AgeCommit message (Collapse)Author
2013-11-18remove unused variablesAlexandre Ratchov
2013-11-18add missing prototypesAlexandre Ratchov
2013-11-12remove bogus legacy server-specific bits that cause confusionAlexandre Ratchov
2012-12-03Remove server capability description from the documentation and fromAlexandre Ratchov
the usage string, and just say that for historic reasons aucat behaves like sndiod. with help from jmc@
2012-11-23Since there's no sndiod -> aucat link anymore, allow aucat to be runAlexandre Ratchov
in server mode even when not invoked as sndiod. This allows aucat and the new sndiod daemon to live together in /usr/bin, which makes easy to quickly compare sndiod and aucat (and spot possible regressions) without having to modify /usr/bin.
2012-10-27don't stat & test sndio home directory since we never use it.Alexandre Ratchov
2012-10-27don't (re-)define SNDIO_USER and SNDIO_PRIO if they are already defined,Alexandre Ratchov
this way they can be defined at compilation time
2012-06-27Uniformize error messages printing, use err() instead of fprintf()Alexandre Ratchov
when appropriate. From Michael W. Bombardieri <mb at ii.net>
2012-06-19Remove hidden options that are not needed any more,Alexandre Ratchov
from Remco <remco at d-compu.dyndns.org>. Thanks
2012-05-23Make the "default" string a valid device name that has the same effectAlexandre Ratchov
as NULL has. This will (hopefully) simplify ports where the user passes the device string.
2012-04-11Use "unsigned int" rather than "unsigned". No object change.Alexandre Ratchov
suggested by deraadt@
2012-02-09Crank the default buffer size to 160ms (ie 7680 frames at 48kHz).Alexandre Ratchov
Workarounds stuttering caused by something hogging the cpu in kernel mode and preventing sndiod from running at time. ok deraadt
2012-01-26Make the default rate 48kHz and the default block size 10ms. TheseAlexandre Ratchov
settings ensure video players and programs using MTC are smooth by default. Thanks to all who tested.
2012-01-10When a sub-device is created (-s), check if a hardwareAlexandre Ratchov
device was already created (-f) before trying to use the default one, otherwise all sub-devices end up attached to the default device. Noticed by peters at schwertfisch.de, thanks!
2011-12-09fix usage string: remove -M from aucat and -l from aucat and sndiodAlexandre Ratchov
from jmc
2011-12-09add a new sndiod audio/midi daemon and hide aucat server-specificAlexandre Ratchov
options.
2011-12-02don't use a "server" flag, just check if we expose sub-devicesAlexandre Ratchov
2011-12-02reuse midi-control code to implement midi thru boxes and removeAlexandre Ratchov
the old midithru implementation; less code, less bugs. As a side effect, midi output doesn't implement running status "compression" any more.
2011-11-20Move mmc/mtc and volume control bits from struct aproc to structAlexandre Ratchov
dev. Allows volume settings to be saved while the device is kept closed. Besides that, no behabiour changes.
2011-11-15Add a "device number" component in sndio(7) device names, allowing aAlexandre Ratchov
single aucat instance to handle all audio and MIDI services. Since this partially breaks compatibility, this is a opportunitiy to fix few other design mistakes (eg ':' being used by inet6, type name vs api name confusion, etc..). This leads to the following names: type[@hostname][,unit]/devnum[.option] The device number is the minor device number for direct hardware access (ie the 'N' in /dev/audioN). For aucat, this is the occurence number of the -f (or -M) option. There's a compatibility hook to keep old names working if only one aucat server is running.
2011-10-18keep the device closed by default (when not used)Alexandre Ratchov
2011-10-18remove duplicate options in getopt() stringAlexandre Ratchov
2011-10-17Remove midicat since aucat can now be used instead of midicatAlexandre Ratchov
with almost the same syntax (roughly an extra -M option). Thru boxes are created with aucat, and corresponding MIDI port names have the "aucat" prefix instead of "midithru". The old device name will still work some time for backward compatibility. ok deraadt
2011-10-12- avoid line wrapping an exampleJason McIntyre
- sort usage() for midicat - tweak a bit of unclear wording ok ratchov
2011-10-12Simplify and improve the way options are parsed and remove ~300 linesAlexandre Ratchov
of code that becomes unused. Few command line arguments changes are required though: - stream definitions (-ios) now must follow devices definitions they are attached to (-fMn) - the -n option is now a special "loopback" device and is thus used like -f, eg it must precede streams - in midicat, midi thru boxes are not created automatically anymore, the new "-M" option must be used for that - channel numbers (-Cc options) correspond always to channel numbers of the hardware. - the -u option isn't needed anymore - increase the log verbosity so user errors are logged without using -d tested by many, help from jmc
2011-06-29make -u flag per-device similarly to -a and -wAlexandre Ratchov
2011-06-20Make -aoff option apply to MIDI ports (-q) as well, ensuring the deviceAlexandre Ratchov
stays closed also if -q is used. As we're at it, add -a to midicat so it behaves like aucat.
2011-06-03Allow device encoding to be set if -u is also used. Useful to degradeAlexandre Ratchov
quality to save bandwith when a remote audio device is used.
2011-06-03Reorganize the way command line options are parsed and stored.Alexandre Ratchov
No behaviour change.
2011-05-26add a new -w flag to control whether master volume is automaticallyAlexandre Ratchov
adjusted when new streams are connected and disconnected. Disabling automatic volume adjustment makes sense if all streams are recorded with properly lowered volumes.
2011-05-10fix option handling and enable TCP in midicatAlexandre Ratchov
from peters at schwertfisch.de, thanks!
2011-04-28Implement a new authentication method allowing aucat and midicat toAlexandre Ratchov
work over TCP, for instance, to expose the sound card of one machine with other machines of the network. The first client generates a 128-bit random number (aka the session cookie), saves it in $HOME/.aucat_cookie and sends it to the server. Successive clients load the cookie from $HOME/.aucat_cookie and send it to the server but the server accepts only clients whose cookie matches the session cookie. When all clients are gone, the session is over, and another cookie could start a new session, and so on. TCP is enabled on the server with the new -L option, and on the client side hostnames are specified with a new optional component in the device name. hints from damien, dlg and deraadt, tweaks from jmc
2011-04-27move amsg.h containing protocol defs from aucat side to libsndio side.Alexandre Ratchov
requested by deraadt
2011-04-27use more volatile sig_atomic_t in signal handlersTheo de Raadt
ok ratchov
2011-04-19don't hold a pointer to "listen" structure. Instead, when it mustAlexandre Ratchov
be free()ed, iterate over the file_list, and find the structure to free. This is safer and simpler. No behaviour change
2011-04-16for unix domain socket addresses use AUCAT_PATH and MIDICAT_PATHAlexandre Ratchov
macros instead of hardcoded strings. No object change
2011-03-17use a DEFAULT_RATE macro instead of hardcoding 44100, no object changeAlexandre Ratchov
2010-11-05unbreak compilation without DEBUG definedAlexandre Ratchov
2010-10-21use MODE_xxx and XRUN_xxx macros everywhere, and zap correspondingAlexandre Ratchov
AMSG_xxx macros, which in turns simplifies the code
2010-09-08aucat: getpwnam: No such file or directoryTheo de Raadt
is not a proper error message.
2010-08-20polish the code: remove few unused #includes, add missing ones,Alexandre Ratchov
fix NULL vs 0, etc. No behaviour change.
2010-08-19fix NULL pointer deref in midicat option parsing when ``-'' isAlexandre Ratchov
used as filename
2010-07-31remove 2 years old compatibility modeAlexandre Ratchov
2010-07-10In midi server mode, don't terminate the midi thru box if there areAlexandre Ratchov
no connections anymore.
2010-07-10fix parameter handling: don't try to open a ``default'' midi portAlexandre Ratchov
if no files are given on the command line
2010-07-06various tweaks to previous; ok ratchovJason McIntyre
2010-07-06Handle all streams the same way because there's no actualAlexandre Ratchov
difference between audio files and client connections. Clean up the way command line options are handled and clarify this in the manual page: stream parameters (-Ccehjmrtvx) must precede stream definitions (-ios) and per-device parameters (-abz) and stream definitions (-ios) must precede device definitions (-f). Since there's no ``server'' and ``non-server'' modes anymore, make the -l option just detach the process. ok and help from jakemsr and jmc
2010-06-29If the device isn't opened yet (as can be the case with '-a off'),Jacob Meuser
don't check if the midi control interface is idle from ratchov
2010-06-25don't attempt to drain devices after they are destroyed, whichAlexandre Ratchov
results in a use after free(). Catched by jakemsr@ with MALLOC_OPTIONS=J
2010-06-20fix midicat(1) device mode when only -i or only -o is used (ieAlexandre Ratchov
open the device input-only if -o is used, and output-only if -i is used).