Alexandre Ratchov
bb63198e8b
prefill with silence the buffer when cmap_copy() stores samples
...
rather than the slot/client buffer. Fixes initialized data being
treated as recorded samples when resampling and/or format
conversions are involved.
2017-11-07 12:26:46 +01:00
Alexandre Ratchov
b06285beda
Prefill with silence rec buffer.
...
This is necessary as certain channels may not receive samples,
for instance when mono->stereo conversion is disabled.
2017-11-03 16:10:48 +01:00
Alexandre Ratchov
258faa30f7
Fix int overflow that causes >12hour files to not properly relocate.
2017-07-20 11:10:13 +02:00
Alexandre Ratchov
6c1c0d3ff6
Remove unnecessary includes. From Michael W. Bombardieri <mb at ii.net>.
2017-01-03 08:05:41 +01:00
Alexandre Ratchov
474ac8d426
log file volume
2017-01-03 07:28:52 +01:00
Alexandre Ratchov
7061de0250
Set device rate to calculated rate.
2016-09-30 11:01:25 +02:00
Alexandre Ratchov
7ddb1a5fe5
Don't rely on the resampling code to calculate the number of samples
...
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-27 09:01:21 +02:00
Alexandre Ratchov
00ffc8f5ab
Add resamp_getcnt() routine to calculate the exact number of samples
...
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-07 08:11:46 +02:00
Alexandre Ratchov
2562fa7eb4
add -g and -p option to control device and file start position
2016-06-02 18:14:10 +02:00
Alexandre Ratchov
a6fdc3b5ed
remove forgotten debug printfs
2016-06-02 07:30:30 +02:00
Alexandre Ratchov
474f0ce009
set exit status to 1 if -n is used without -i and -o
2016-06-02 07:07:58 +02:00
Alexandre Ratchov
c22cfa6294
sync to openbsd: remove again intermediate conversion to mtc time
2016-06-02 06:55:59 +02:00
Alexandre Ratchov
751fe73f18
backout mtc units removal
2016-05-31 23:21:15 +02:00
Alexandre Ratchov
2ce73a1421
Pass hr:min:sec:frame.cent to dev_mmcloc() and remove useless
...
intermediate conversion to 2400-th of second.
2016-05-31 11:24:42 +02:00
Alexandre Ratchov
0798868306
To store MMC position, use samples (at device rate) as time units
...
instead of 2400-ths of second. No behaviour change.
2016-05-31 10:37:17 +02:00
Alexandre Ratchov
e606351421
Fix file block size rounding and ensure it's large enough to store a
...
full audio block.
2016-05-28 09:28:57 +02:00
Alexandre Ratchov
028bb6e60d
When resampling, use the exact resampling factor instead of the ration
...
between input and output block sizes. This was inherited from sndion,
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-27 18:17:05 +02:00
Alexandre Ratchov
b347c52869
Flush rec buffer if there's less than one block space left and fill
...
play buffer if there's less than one block of data left. No behaviour
change, as all input/output are still block-aligned.
2016-05-27 18:00:23 +02:00
Alexandre Ratchov
06c8f4e89f
Simplify slot_fill() and slot_flush(). No behaviour change
2016-05-27 17:46:09 +02:00
Alexandre Ratchov
4772005ac1
Give the resamp_do() the exact number input and output samples and
...
provide routines to calculate them. This way we don't rely on it
anymore to calculate the bytes procuded/consumed. No behaviour change.
2016-05-27 17:36:53 +02:00
Alexandre Ratchov
a6ea35ebb3
Make format conversion routines return the number of frames
...
consumed on both input and output. No behaviour change.
2016-05-26 08:16:17 +02:00
Alexandre Ratchov
d6bc5ae04f
Check that byte order is native only if we're using more than one
...
byte per sample, check the samples are lsb-aligned only if there's
padding.
2016-01-29 17:20:34 +01:00
Alexandre Ratchov
6436780b57
fit in 80 columns, trailing spaces, tabs
2016-01-09 09:49:55 +01:00
Alexandre Ratchov
97bf660690
fit in 80 columns, trailing spaces, tabs
2016-01-09 09:35:54 +01:00
Alexandre Ratchov
9ff8e621d0
typos in comments and strings
2015-08-26 10:27:22 +02:00
Alexandre Ratchov
fc071998df
call slot_stop() after draining
2015-05-16 21:23:07 +02:00
Alexandre Ratchov
8dd18742f2
unbreak usage and macros in manpage, from jmc
2015-01-21 12:31:48 +01:00
Alexandre Ratchov
d0e975e33c
style
2015-01-08 12:50:24 +01:00
Alexandre Ratchov
901675b4f2
fix .au start position
2015-01-07 13:56:38 +01:00
Alexandre Ratchov
d33d443b3a
support for .au files
2015-01-07 12:07:37 +01:00
Alexandre Ratchov
f2c235166b
add support for aiff files
2015-01-06 11:41:24 +01:00
Alexandre Ratchov
1341ff77a4
s/wav/afile/
2015-01-05 18:01:29 +01:00
Alexandre Ratchov
7e4b5c54d9
merge alaw and mulaw code
2014-12-30 19:36:15 +01:00
Alexandre Ratchov
1602b19c78
move conversion code dsp.c
2014-12-30 19:17:32 +01:00
Alexandre Ratchov
f3ef9df7b4
add support for f32le in .wav files
2014-12-30 18:45:05 +01:00
Alexandre Ratchov
60fb4a32ae
initialize dev_prime to zero in rec-only mode
2014-12-29 12:45:24 +01:00
Alexandre Ratchov
fcc7acfe65
unused str() macro
2014-11-17 08:24:43 +01:00
Alexandre Ratchov
c80a3fc1ff
better error message
2014-11-17 08:18:36 +01:00
Alexandre Ratchov
4e01a1289d
remove -z from usage
2014-11-17 07:55:50 +01:00
Alexandre Ratchov
850121fb2c
set file bufsz to device bufsz
2014-11-17 07:46:09 +01:00
Alexandre Ratchov
0639edb852
set default device bufsz to 200ms
2014-11-17 07:43:38 +01:00
Alexandre Ratchov
cc1c9a5c71
dont set block size
2014-11-17 07:38:00 +01:00
Alexandre Ratchov
c075b80574
document -b, remove -z
2014-11-17 07:36:28 +01:00
Alexandre Ratchov
737ca22c4d
bump copyright year
2014-11-15 13:56:12 +01:00
Alexandre Ratchov
7cbcc30319
- release constraints used to be required in server mode
...
- hardcode the processing chain (it used to be setup dynamically)
- merge simpler processing code from sndiod
- remove -M option, aucat is not a midi tool, sorry.
- remove -t flag (redundant with -q flag)
- remove -w flag (makes sense for server mode only)
- remove -C flag (necessary for full-duplex streams only)
- remove -x flag (xruns already handled by sndiod)
- make "-j off" the default (sndiod already does the job)
- don't limit the number of played/recorded files.
2014-11-15 13:51:02 +01:00
Alexandre Ratchov
16f44939b1
remove unused variables
2013-11-18 18:45:19 +01:00
Alexandre Ratchov
b1c417ab04
add prototypes
2013-11-18 17:50:04 +01:00
Alexandre Ratchov
37de53fd9b
remove legacy server bits
2013-11-12 07:51:02 +01:00
Alexandre Ratchov
41372817a0
hide server bits
2012-12-03 17:37:08 +01:00
Alexandre Ratchov
bf045ccb03
readd back removed options by mistake
2012-11-10 16:37:03 +01:00