summaryrefslogtreecommitdiff
path: root/usr.bin/aucat
AgeCommit message (Collapse)Author
2024-07-08aucat: check for failled allocationAlexandre Ratchov
From Nihal Jere <nihal@nihaljere.xyz>, thanks!
2024-05-21aucat.1: Fix needless line breaks in the -h and MIDI sections.Alexandre Ratchov
Diff from Jan Stary <hans at stare.cz>, thanks! ok jmc
2024-05-12defaul -> default; ok jmc@ ratchov@Jonathan Gray
2024-05-03aucat.1: Drop the number component of sndio descriptorsAlexandre Ratchov
ok jmc
2024-04-22aucat: Use a 24-bit table for index to volume conversionAlexandre Ratchov
2024-04-22aucat: Fix comments, from similar comments fixes in sndiodAlexandre Ratchov
2024-03-22aucat: Allow any device sample encoding.Alexandre Ratchov
If the device doesn't support the aucat internal encoding, then setup a conversion layer instead of failing. This allows aucat to be used for audio equipment testing/debugging without involving the full sndiod processing chain.
2024-03-22aucat: Add a bytes-per-sample argument to allcobuf()Alexandre Ratchov
No behavior change.
2024-03-20aucat: Add generic channel mapping in place of -j and -c options.Alexandre Ratchov
The argument to the -m option specifies the source and destination channel ranges to be mapped. Compatibility is maintained: if -m is not used, the -c and -j options still work. Help and suggestions from Jan Stary <hans@stare.cz>, thanks.
2024-02-01aucat: Fix MIDI control of the levels of individual filesAlexandre Ratchov
Change the order of slot_list to match the order of the -io options on the command-line and fix the way slot_list searched using the MIDI channel number of the CC-07 message. Reported and analysed by Dirk-Wilhelm Peters <peters at schwertfisch.de> Thanks!
2023-03-27typo: filed -> failed; ok ratchov@Omar Polo
2023-03-27reading aid: explicitly check for memcmp() != 0; no functional changeOmar Polo
ok ratchov@
2023-01-13Use extended header format for .wav files.Alexandre Ratchov
According to Microsoft docs, it is needed if bits > 16 or if there are more than 2 channels, which aucat supports and is the defaut. Fixes errors reported by audio/sox port when trying to play .wav files generated by aucat. Reported by John Rigg <obsd at jrigg.co.uk> and others on misc@
2023-01-10Fix device name in the MIDI control sectionAlexandre Ratchov
For MMC to work, the MIDI sequencer must send MMC to subdevices registered with -tslave. From Dirk-Wilhelm Peters <peters at schwertfisch.de>, thanks.
2022-12-26spelling fixes; from paul tagliamonteJason McIntyre
amendments to his diff are noted on tech
2022-10-14remove the unsightly plural from Nd:Jason McIntyre
audio files manipulation tool -> audio file manipulation tool
2022-03-07Switch internal sample representation to 24-bit fixed-pointAlexandre Ratchov
Note that this also changes the default file encoding to 24-bit.
2021-10-24For open/openat, if the flags parameter does not contain O_CREAT, theTheo de Raadt
3rd (variadic) mode_t parameter is irrelevant. Many developers in the past have passed mode_t (0, 044, 0644, or such), which might lead future people to copy this broken idiom, and perhaps even believe this parameter has some meaning or implication or application. Delete them all. This comes out of a conversation where tb@ noticed that a strange (but intentional) pledge behaviour is to always knock-out high-bits from mode_t on a number of system calls as a safety factor, and his bewilderment that this appeared to be happening against valid modes (at least visually), but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef. ok millert
2021-07-05Fix off-by-one array access when 64 channel stream is resampledAlexandre Ratchov
2021-05-25Drop assembly for 24-bit fixed-point operationsAlexandre Ratchov
Now i386 compiler is smart enough to generate a single imul instruction per fixed-point multiplication. This change also allows 24-bit precision to be used on all archs (if -DADATA_BITS=24 is used). Tested on arm64 by Doug Moss <dougmoss710 at yahoo.com>, thanks Suggested and ok naddy@
2021-01-12const-ify lookup tables; ok ratchov@Christian Weisgerber
2021-01-11Use sndiod's 8-th order FIR low-pass filter for resamplingAlexandre Ratchov
Removes most of the aliasing noise during resampling
2020-12-10Check sample signedness when setting up format conversions.Alexandre Ratchov
Fixes confusion between s16 and u16 found and analysed by James Cook <falsifian at falsifian.org>. Thanks.
2020-04-22sort SEE ALSO;Jason McIntyre
2020-04-21move mixerctl and audioctl man pages to section 8, as these workTheo de Raadt
against root-only device nodes.
2020-02-09Rename WAV_H "include guard" macro of afile.h to AFILE_H.Alexandre Ratchov
Fix from Jan Stary <hans at stare.cz>, thanks.
2019-07-2816 channels is not enough to handle all common uaudio(4) devices, soAlexandre Ratchov
crank the maximum channels number to 64.
2019-07-05Fix spacing and comments, no code change.Alexandre Ratchov
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-05-19Fix integer overflow in block size calculation.Alexandre Ratchov
Fixes truncation of contents of files with rate above 64kHz generate in off-line mode (i.e. -n option).
2019-02-21Use reallocarray in place of malloc(a * b) to handle possibleAlexandre Ratchov
overflow in multiplication of malloc argument.
2018-11-07Fix clipping during float to integer conversions.Alexandre Ratchov
From Jari Vetoniemi <mailroxas at gmail.com>. Thanks!
2018-09-18clear p->ctx array with memset(); ok ratchov@miko
2018-05-13Add missing pledge(). From Jesper Wallin <jesper at ifconfig.se>.Alexandre Ratchov
Thanks!
2017-11-23Remove useless variable assignments in .au header parsing code. FromAlexandre Ratchov
Michael W. Bombardieri. Thanks.
2017-11-07prefill with silence the buffer where cmap_copy() stores samplesAlexandre Ratchov
rather than the file buffer. Fixes initialized data being treated as recorded samples when resampling or format conversions are involved but mono->stereo conversion is disabled.
2017-11-03Prefill rec buffer with silence. This is necessary because certainAlexandre Ratchov
channels don't get samples, for instance when mono->stereo conversion is disabled.
2017-07-20Fix integer overflow that would causes >12 hours filesAlexandre Ratchov
to not properly relocate. Found with coverity.
2017-04-24Fix typos. From Michael W. Bombardieri <mb at ii.net>. Thanks!Alexandre Ratchov
2017-03-24Use the right header sizes for reading .aiff and .au files, ok ratchovNicholas Marriott
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