Alexandre Ratchov
33bbca5999
drop privs after daemonizing, reorder clean-up
2016-10-20 07:27:36 +02:00
Alexandre Ratchov
9ea4bb693a
remove sndiod.1 file, left after cvs->git conversion
2016-10-18 08:24:07 +02:00
Alexandre Ratchov
7061de0250
Set device rate to calculated rate.
2016-09-30 11:01:25 +02:00
Alexandre Ratchov
b9c0f17f1b
merge from HEAD
2016-09-27 17:18:39 +02:00
Alexandre Ratchov
2a451f9623
Fix many typos, from Michael W. Bombardieri <mb at ii.net>, thanks
2016-09-27 14:18:43 +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
01a52357c2
better error message about long groups
2016-08-28 12:34:04 +02:00
Alexandre Ratchov
02ff6b20fb
add braces to reduce diff with mixer bits
2016-08-11 08:17:57 +02:00
Alexandre Ratchov
16aeebd969
simpler resampler
2016-06-09 16:51:02 +02:00
Alexandre Ratchov
61005799d9
simpler resampler
2016-06-09 16:50:56 +02:00
Alexandre Ratchov
10f6027f0f
remove unused fields of resamp structure
2016-06-09 16:43:47 +02:00
Alexandre Ratchov
b5ed742559
remove forgotten debug printfs
2016-06-08 06:41:08 +02:00
Alexandre Ratchov
74cb9d0038
merge introduction of resamp_getcnt
2016-06-07 13:22:31 +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
aaf9583451
backout latest
2016-05-31 23:25:38 +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
8ceee9aeff
merge (make files continuous stream)
2016-05-28 11:21:24 +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
105937ab11
Don't log blocked read or write.
2016-05-25 12:18:46 +02:00
Alexandre Ratchov
fd4ff877d4
Don't log blocked read or write.
2016-05-25 12:17:48 +02:00
Alexandre Ratchov
3ede574e2e
store values in ints
2016-05-17 13:25:16 +02:00
Alexandre Ratchov
d08df26185
make init.d.sndiod executable
2016-05-16 08:37:40 +02:00
Alexandre Ratchov
13dcd94f28
make init.d.sndiod executable
2016-05-16 08:36:55 +02:00
Alexandre Ratchov
20a7e3c46e
switch back into using a single "filling" flag to determine
...
whether playback is started
2016-05-16 07:53:05 +02:00
Alexandre Ratchov
7c24b48b99
switch back into using a single "filling" flag to determine
...
whether playback is started
2016-05-16 07:52:45 +02:00
Alexandre Ratchov
50e5b13815
rename namespace -> group (it's c++ keyword)
2016-05-15 14:45:32 +02:00
Alexandre Ratchov
ebefac2a1e
fix max ctl value check
2016-04-08 20:42:29 +02:00
Alexandre Ratchov
ee10431307
fix check of out-of-bounds value
2016-04-08 20:32:43 +02:00
Alexandre Ratchov
664a4fee3d
spaces
2016-04-08 20:28:45 +02:00
Alexandre Ratchov
17ed48fb84
send feedback about changed controls to all sockets, including
...
the one that changed the control
2016-04-08 20:28:22 +02:00
Alexandre Ratchov
62c80b7e7f
Remove unused arguments of dev_adjpar(), getbasepath() and all
...
slotops->onvol() implementations.
From David CARLIER <devnexen at gmail.com>. Thanks.
2016-03-23 07:40:54 +01:00
Alexandre Ratchov
8070eb6272
Remove unused arguments of dev_adjpar(), getbasepath() and all
...
slotops->onvol() implementations.
From David CARLIER <devnexen at gmail.com>. Thanks.
2016-03-23 07:40:46 +01:00
Alexandre Ratchov
a3dbdeb179
s/mute/level/, from armani@
2016-03-16 07:57:46 +01:00
Alexandre Ratchov
e989416be8
switch to new obsd audio api
2016-03-16 07:48:27 +01:00
Alexandre Ratchov
85c75911dc
switch to new obsd audio api
2016-03-16 07:48:13 +01:00
Alexandre Ratchov
474608cc3f
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:58 +01: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
c9eb15367f
spacing
2016-01-29 12:12:51 +01:00
Alexandre Ratchov
61913bc10a
simplify poll logging
2016-01-29 12:12:43 +01:00