Alexandre Ratchov
84ec0ebd8c
sndiod: Remove useless check of s->ops in slot_setvol().
2018-06-11 19:57:12 +02:00
Alexandre Ratchov
293d7047bd
sndiod: No need to initialize s->mix.weight in slot_stop().
...
It is calculated by dev_mix_adjvol() called by slot_attach().
2018-06-11 19:57:10 +02:00
Alexandre Ratchov
85a1c81bf7
sndiod: Log slot in slot_new() instead of sock_hello().
2018-06-11 19:57:04 +02:00
Alexandre Ratchov
b6f9ea4690
sndiod: Remove unused local variable in sock_hello().
2018-06-11 19:55:16 +02:00
Alexandre Ratchov
35cff61693
sndiod: Instead of the max, use the number of chans in the slot struct.
2018-06-11 19:55:16 +02:00
Alexandre Ratchov
8be24309cb
sndiod: Remove {mix,sub}.slot_cmin, already available un opt struct.
2018-06-11 19:55:16 +02:00
Alexandre Ratchov
5754ba3986
sndiod: Remove dev_{cmin,cmax} from slot struct, use those in opt struct.
2018-06-11 19:54:27 +02:00
Alexandre Ratchov
72c6c0a9b8
sndiod: Use opt->dup and remove slot->dup.
2018-06-11 19:53:09 +02:00
Alexandre Ratchov
9eef11f53b
sndiod: Use opt->maxweight and remove slot->maxweight.
2018-06-11 19:53:07 +02:00
Alexandre Ratchov
e20bc384e3
sndiod: Don't set constant {slot,dev}_cmin parameters.
2018-06-11 19:53:04 +02:00
Alexandre Ratchov
426a9064fa
sndiod: Initialize slot with parameters from the opt struct.
2018-06-11 19:53:02 +02:00
Alexandre Ratchov
c42684a889
sndiod: Move opt pointer from the sock to the slot struct.
2018-06-11 19:52:40 +02:00
Alexandre Ratchov
37ee5aa871
sndiod: replace the gloal opt list with per-device lists.
2018-06-10 22:50:35 +02:00
Alexandre Ratchov
ddf5e0dfa7
sndiod: move slot buffer allocations in their own routines
2018-06-09 09:27:27 +02:00
Alexandre Ratchov
88e75c3d10
sndiod: factor common code of slot_stop()
2018-06-09 09:23:40 +02:00
Alexandre Ratchov
414e011cf6
sndiod: remove handling of unreachable state in slot_stop()
2018-06-09 08:33:24 +02:00
Alexandre Ratchov
210da6b0cb
sndiod: simplify the resampling routine
2018-06-08 08:23:22 +02:00
Alexandre Ratchov
cf03f7423d
sndiod: move all conversions in dev_mix_badd() and dev_sub_bcopy()
...
The conversion chain processes exactly one block, so no need to
calculate & count the number of processed samples. This allows to move
the calls to processing routines in dev_mix_badd() and
dev_sub_bcopy(), which is much simpler. No behaviour change.
2018-06-08 08:22:35 +02:00
Alexandre Ratchov
27da5245d0
sndiod: use CLOCK_UPTIME when available
2018-03-18 14:38:27 +01:00
Tobias Kortkamp
31cfb9b6dc
Support rsnd/default for opening the default device
2018-03-02 07:21:41 +01:00
Alexandre Ratchov
ee3ef94d5a
sndiod: simplify client rate boundary checks
2017-11-30 15:10:02 +01:00
Alexandre Ratchov
8b24905d2c
sndiod: fix slot leak when device mode doesn't match slot mode
2017-11-23 07:13:49 +01:00
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
6ad32cca29
Print par.bps instead of par.bits in debug printf()
...
found by coverity.
2017-07-20 11:08:59 +02:00
Alexandre Ratchov
5ee0fe28ca
add comments in correct code that may look wrong to coverity
2017-07-20 11:06:55 +02:00
Alexandre Ratchov
a48a424901
add portability bits for OS X
2017-03-27 12:34:26 +02:00
Alexandre Ratchov
f9f2d8353e
Fix the code to abort when trying to detach a slot that's not
...
on the list (the check was a no-op). Found by jsg@, thanks.
2017-02-15 11:58:54 +01:00
Alexandre Ratchov
044421aad7
Include sys/socket.h to minimize differences with pledged code
2017-01-03 08:50:48 +01:00
Alexandre Ratchov
209e88bbde
Use a goto to factor all calls to close() when listen_in() returns
...
an error. From Michael W. Bombardieri. Thanks.
2017-01-03 08:10:11 +01:00
Alexandre Ratchov
22a64d1845
Many typos in comments. From Michael W. Bombardieri. Thanks.
2017-01-03 08:08:17 +01:00
Alexandre Ratchov
bcb3014206
Fix many typos in comments, from Michael W. Bombardieri <mb at ii.net>
2016-10-27 06:38:21 +02:00
Alexandre Ratchov
017e60c967
use setgid() and setuid()
2016-10-24 17:05:47 +02:00
Alexandre Ratchov
4dcfed9dce
remove braces around single-statement block
2016-10-20 07:32:27 +02:00
Alexandre Ratchov
33bbca5999
drop privs after daemonizing, reorder clean-up
2016-10-20 07:27:36 +02:00
Alexandre Ratchov
02ff6b20fb
add braces to reduce diff with mixer bits
2016-08-11 08:17:57 +02:00
Alexandre Ratchov
b5ed742559
remove forgotten debug printfs
2016-06-08 06:41:08 +02:00
Alexandre Ratchov
fd4ff877d4
Don't log blocked read or write.
2016-05-25 12:17:48 +02: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
74bbedaf28
better poll logging
2016-01-29 12:12:19 +01:00
Alexandre Ratchov
96e51185e0
warn about blocking at log level 3
2016-01-29 12:12:03 +01:00
Alexandre Ratchov
fcbcfd089a
use "prog" as default prog name
2016-01-29 12:11:23 +01:00
Alexandre Ratchov
bf7d743936
better -d description, from Michael Reed <m.reed at mykolab.com>
2016-01-20 11:58:45 +01:00
Alexandre Ratchov
f1cde9ea14
crank max timeout to 60s
2016-01-20 11:57:59 +01:00
Alexandre Ratchov
f745d41032
revert back to single device by default
2016-01-10 12:05:17 +01:00
Alexandre Ratchov
cf1ebc72d3
make midi->tickets signed (sign is needed for arithmetics). Found
...
by David Coppa. Thanks.
2016-01-09 14:33:10 +01:00
Alexandre Ratchov
12dccf8463
check that socket path is a directory
2016-01-09 11:08:18 +01:00
Alexandre Ratchov
e20bb8997d
remove trailing \n from string passed to err()
2016-01-09 09:56:28 +01:00
Alexandre Ratchov
e2be625ebd
unexpand
2016-01-09 09:49:48 +01:00
Alexandre Ratchov
105db99d30
fit in 80 columns
2016-01-08 17:26:47 +01:00