summaryrefslogtreecommitdiff
path: root/usr.bin/aucat/aucat.c
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-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-27add missing word in error messageAlexandre Ratchov
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-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-08-26oops, forgot to update usage();Jason McIntyre
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-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-04-27make -v option apply also to implicit default socketAlexandre Ratchov
2009-03-17- rename the arg to -b "nframes" and sync usage()Jason McIntyre
- grammar fix for the server section from Thomas Pfaff ok ratchov
2009-02-06move error messages reported to user into main()Alexandre Ratchov
2009-02-04if there are too many connections, stop acceping new ones ratherAlexandre Ratchov
than exit()ing with ``too many open files'' fatal error
2009-02-04daemonize when in server mode, suggested by manyAlexandre Ratchov
ok jakemsr
2009-02-03in server mode, create /tmp/aucat-userid/ directory withAlexandre Ratchov
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
2009-01-25don't set malloc_options to not interfer with /etc/malloc.confAlexandre Ratchov
requested and explained by fgsch@, henning@, otto@
2009-01-23catch SIGHUP and SIGTERM too, to ensure that recorded files areAlexandre Ratchov
properly closed and sockets are cleaned up.
2009-01-23spacing + typo fix from Matt Jibson <matt.jibson(at)gmail.com>Alexandre Ratchov
2009-01-10add "loopback" mode in which input is connected to the output.Alexandre Ratchov
This is useful to mix, demultiplex, resample or reencode audio files off-line. tweak + ok jakemsr
2008-12-29make the code "more correct": add reference counters to aprocAlexandre Ratchov
structures so we can keep a pointer to the device. Beside some simplifications, this allows to easily handle the situation where the audio device desappears. No change in the behaviour.
2008-12-26*** empty log message ***Alexandre Ratchov
2008-12-07When resampling, don't require the sample frequency to be an integer.Alexandre Ratchov
This removes the arithmetic constraint between the sample frequency and the block size and all the associated code. Now aucat can work in server mode with any block size. ok jakemsr
2008-11-23Use file input parameter as default device output and file output parametersAlexandre Ratchov
as default device input. That's what the man page says
2008-11-20take into account socket parameters into calculation of deviceAlexandre Ratchov
parameters; without this change aucat uses the device default parameters and they are not necessarily usable for multi-stream mode.
2008-11-17- rename -s arg name to "socket"Jason McIntyre
- condense EXAMPLES into a single screenful ok ratchov
2008-11-17tweak previous man page changes, and sync usage();Jason McIntyre
2008-11-17allow aucat to run as server in play-only and record-only mode, soAlexandre Ratchov
it can be used on play-only, record-only and half-duplex devices. ok jakemsr
2008-11-16allow aucat to listen on multiple sockets. Each socket carries itsAlexandre Ratchov
channel and volume settings allowing multiple configuration to coexist. Mostly useful for envy(4)-like devices, but can be used to force different apps to use different settings.
2008-11-16add ``template'' parameters to sockets rather than using deviceAlexandre Ratchov
parameters. No functional change.
2008-11-16Make clients inherit the volume parameter when the -v option is used inAlexandre Ratchov
server mode. It gives the maximum volume a client may have. This wastes dynamic range, but allows volume to stay constant when other clients connect or disconnect.
2008-11-12when destroying the device, mark the mixer and the demultiplexerAlexandre Ratchov
for ``AUTOQUIT'' first, and then call file_eof() and friends. fixes crashes sthen@ noticed on zaurus
2008-11-11if the device disappear the mixer and demultiplexer chains areAlexandre Ratchov
destroyed. If this happen then warn and exit, rather than crashing.
2008-11-11termninate non-server aucat when it's idle rather that usingAlexandre Ratchov
the hackish {MIX,SUB}_AUTOQUIT features. This way we don't have to care about possible references on destroyed objects.
2008-11-11when not in server mode, aucat terminates automatically usingAlexandre Ratchov
the {MIX,SUB}_AUTAQUIT features. In this case we're not allowed to directly touch dev_mix and dev_sub because they can disappar. So disable the ``suspend'' and ``quit'' bits when {MIX,SUB}_AUTAQUIT are used.
2008-11-10add a per-stream ``soft volume'' knob and the corresponding -v option.Alexandre Ratchov
The code will be useful later for the volume knob in the sndio API.
2008-11-09make aucat(1) stop automatically the audio(1) device if it's idle. ThisAlexandre Ratchov
way, when in server mode, it consumes no CPU if there are no clients. Later, this will allow to start aucat(1) at session or system startup.
2008-11-08set the default device to /dev/audio for legacy mode.Alexandre Ratchov
From Thomas Pfaff <tpfaff _at_ agderlink.no> and tweaks from me
2008-11-07expose the block size in the sndio API by making par->round writableAlexandre Ratchov
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@
2008-11-03A small optimization: handle most N-channel <-> M-channel conversionsAlexandre Ratchov
inside the mixer and the demultiplexer. This way, aucat will not trigger the heavy conversion code when only channel conversions are required. Cuts ~50% of the CPU usage on envy(4) devices, can improve surround 4.0, 5.1 and 7.1 capable devices. No functionnal change.
2008-10-26zap `q' from the getopts string too,Alexandre Ratchov
requested by jmc@
2008-10-26sync SYNOPSIS and usage();Jason McIntyre
2008-10-26add minimal server capability to aucat(1). When started in serverAlexandre Ratchov
mode, it listens on an unix socket and mixes/demultiplexes any number of full-duplex streams, doing necessary format conversions and resampling on the fly. programs can use the new libsa(3) library to play and record audio. The library provides a very simple API to connect to the audio server; if aucat(1) isn't running, it uses the audio(4) driver transparently instead.
2008-08-25minor tweak for removal of "[-d devel]" (change done in r1.19 and r1.21).Igor Sobrado
ok ratchov@