summaryrefslogtreecommitdiff
path: root/usr.bin/aucat
AgeCommit message (Collapse)Author
2017-01-03Assert we're not freeing buffers we didn't allocate (DEBUG mode).Alexandre Ratchov
2017-01-03Log play volume together with other play parameters.Alexandre Ratchov
2017-01-03Sync utils.c and utils.h to sndiod.Alexandre Ratchov
2016-09-30Set the device rate to the calculated rate. Otherwise, the signalAlexandre Ratchov
may endup resampled twice.
2016-09-30Remove unnecessary includes. From Michael W. Bombardieri <mb at ii.net>.Alexandre Ratchov
2016-09-27Don't rely on the resampling code to calculate the number of samplesAlexandre Ratchov
to process, as it may produce one extra sample (to handle accumulation of fractional samples), which would cause access to one sample past the end of the buffer and crash aucat. Fix this by limiting the number of samples processed to a single block. Found by and help from Michael W. Bombardieri <mb at ii.net>. Thanks.
2016-09-23Fix many typos, from Michael W. Bombardieri <mb at ii.net>, thanksAlexandre Ratchov
2016-06-10Simplify the sample rate converter, no behaviour change.Alexandre Ratchov
2016-06-08removed unused fields of resamp structureAlexandre Ratchov
2016-06-07Add -g and -p options to control device and file start position.Alexandre Ratchov
2016-06-07Add resamp_getcnt() routine to calculate the exact number of samplesAlexandre Ratchov
that would be consumed and produced by the sampler rate converter. Use it to avoid partial samples that are not properly handled. Fixes last samples of certain files causing aucat to abort.
2016-06-02remove forgotten debug printfsAlexandre Ratchov
2016-06-02set exit status to 1 if -n is used without -i and -oAlexandre Ratchov
2016-05-31Pass hr:min:sec:frame.cent to dev_mmcloc() directly and remove theAlexandre Ratchov
useless intermediate conversion from and to 2400-th of seconds.
2016-05-31To store MMC position, use samples (at device rate) as time unitsAlexandre Ratchov
instead of 2400-ths of second. No behaviour change.
2016-05-28Fix file block size rounding and ensure it's large enough to store aAlexandre Ratchov
full audio block.
2016-05-27When resampling, use the exact resampling factor instead of the ratioAlexandre Ratchov
between input and output block sizes. This was inherited from sndiod, but is not required for files because they are continuous streams of samples and do not need to be split in blocks of equal duration. This change makes playback/recording rate match exactly the requested sample rate.
2016-05-27Flush rec buffer if there's less than one block space left and refillAlexandre Ratchov
play buffer if there's less than one block of data left. This is the correct condition in the general case. No behaviour change, as all input/output is multiple of the block size.
2016-05-27Simplify slot_fill() and slot_flush(). No behaviour changeAlexandre Ratchov
2016-05-27Make resamp_do() get the exact number input and output samples andAlexandre Ratchov
provide routines to calculate them. This way we don't rely on it to calculate the bytes procuded/consumed anymore. No behaviour change.
2016-05-26Make format conversion routines return the number of framesAlexandre Ratchov
consumed from both input and output buffers. No behaviour change.
2016-01-29Check that byte order is native only if we're using more than oneAlexandre Ratchov
byte per sample, check that samples are lsb-aligned only if there's padding. Fixes unsupported parameters not being detected if compiled in 24-bit mode and sndiod is not running.
2016-01-10trailing spaces, fit in 80 columnsAlexandre Ratchov
2016-01-07Move sndiod man page to section 8.Alexandre Ratchov
suggested by deraadt, fixes from jmc, ok millert
2015-12-25follwing -> followingAnthony J. Bentley
2015-11-09Remove xfree(). From Michael W. Bombardieri.mmcc
ok ratchov@
2015-10-17remove some unneccessary macros; from michael reedJason McIntyre
2015-09-14typo resultung in a markup errorIngo Schwarze
2015-08-27fix typos in comments and error messagesAlexandre Ratchov
2015-08-27Allow sparse blocks to be used as silence if samples are encodedAlexandre Ratchov
as signed integers.
2015-05-16Call slot_stop() after the play buffer is drained to properly cleanupAlexandre Ratchov
the slot. Fixes periodic glitches occurring after eof is reached, and then playback restarted with a MMC-relocate and MMC-start.
2015-05-04Fix clipping bug in float to fixed point conversion, causingAlexandre Ratchov
audible glitches when samples smaller than the quantification step are converted.
2015-01-21fix macro breakage and update usage();Jason McIntyre
2015-01-21Simplify internals and rewrite file header parsing code:Alexandre Ratchov
- remove -M, -t, -w, -C, -x flags that don't make sense anymore - make "-j off" the default (sndiod already does the job) - don't limit the number of played/recorded files. - add support for floating-point encoded files. - add support for apple .aiff and sun/next .au files
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-08-10typo in debug messageAlexandre Ratchov
2014-08-10initialize mmcpos, found by guentherAlexandre Ratchov
2014-02-08more Va -> Cm fixes from Jan Stary <hans at stare.cz>, thanks!Alexandre Ratchov
2014-01-28fix typo: s/to/theAlexandre Ratchov
2014-01-28Remove section about server capability which was removedAlexandre Ratchov
long time ago. Use .Cm instead of .Va for argument parameters. From Jan Stary <hans at stare.cz>, thanks!
2013-11-21use -Wmissing-prototypesAlexandre Ratchov
2013-11-19move -Wxxx flags from CFALGS to COPTSAlexandre Ratchov
suggested by deraadt
2013-11-18remove unused variablesAlexandre Ratchov
2013-11-18add missing prototypesAlexandre Ratchov
2013-11-12remove bogus legacy server-specific bits that cause confusionAlexandre Ratchov
2013-03-13don't display warnings if accept() returns ECONNABORTED orAlexandre Ratchov
EWOULDBLOCK, as we do in other daemons
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-11-23Remplace aucat server by a new sndiod daemon aimed to be simplerAlexandre Ratchov
smaller and faster than aucat. It's a drop in replacement with the following exceptions that don't affect the default setup: - The sample rate and the encoding are a per-device parameters thus -r and -e options must precede the corresponding -f option - MIDI thru boxes are dynamically created and no -M option is required anymore, so -M was removed. - MIDI ports are exposed with a new ``midi/N'' name, rather than abusing MIDI thru boxes. with help from armani@, ok deraadt@
2012-11-23Make the client wait for the first flow control message rather thanAlexandre Ratchov
assuming it can send a full initial data buffer. This requires protocol version bump (but no library version bump).