1
0
mirror of https://github.com/ericonr/sndio.git synced 2024-02-18 04:45:21 -06:00
Commit Graph

682 Commits

Author SHA1 Message Date
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
fd4ff877d4 Don't log blocked read or write. 2016-05-25 12:17:48 +02:00
Alexandre Ratchov
d08df26185 make init.d.sndiod executable 2016-05-16 08:37:40 +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
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
85c75911dc switch to new obsd audio api 2016-03-16 07:48:13 +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
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
6436780b57 fit in 80 columns, trailing spaces, tabs 2016-01-09 09:49:55 +01:00
Alexandre Ratchov
e2be625ebd unexpand 2016-01-09 09:49:48 +01:00
Alexandre Ratchov
97bf660690 fit in 80 columns, trailing spaces, tabs 2016-01-09 09:35:54 +01:00
Alexandre Ratchov
b5a1760af3 unexpand tabs 2016-01-09 09:23:56 +01:00
Alexandre Ratchov
cbaa92d4d8 better debug mesg 2016-01-09 09:20:46 +01:00
Alexandre Ratchov
99cfc04004 fit code in 80 columns, remove traing spaces 2016-01-08 21:51:12 +01:00
Alexandre Ratchov
105db99d30 fit in 80 columns 2016-01-08 17:26:47 +01:00
Alexandre Ratchov
e22e6a1b26 fix trailing spaces 2016-01-08 17:24:48 +01:00
Alexandre Ratchov
400600af2e free tcpaddr structures 2016-01-08 14:39:55 +01:00
Alexandre Ratchov
4fdefa70d7 remove redundant debug message 2016-01-08 11:48:26 +01:00
Alexandre Ratchov
9a493931b5 fix installation path of man page 2016-01-08 11:48:05 +01:00
Alexandre Ratchov
3b3a64a4fc Don't calculate clock deltas is there are no time-outs. Removes (harmless)
warnings about out-of-bounds clock deltas.
2016-01-08 11:45:01 +01:00
Alexandre Ratchov
aa4fc43964 move sndiod manual to sec 8 2016-01-07 17:48:47 +01:00
Alexandre Ratchov
5219e9d39d Warn about huge clock ticks only if there are time-outs 2016-01-05 09:43:13 +01:00
Alexandre Ratchov
aa3d0b1ca1 assert xfree() doesn't get NULL arg 2015-12-30 12:56:11 +01:00
Alexandre Ratchov
67bf8b7786 sys/queue.h isn't used 2015-12-30 12:55:18 +01:00
Alexandre Ratchov
37cdacd0aa crank major (openbsd specific changes) 2015-12-30 12:54:40 +01:00
Alexandre Ratchov
8af6aa7130 panic if CLOCK_MONOTONIC is unsupported 2015-12-22 13:17:00 +01:00
Alexandre Ratchov
02a873aace use err() on init and log_xxx() at runtime 2015-12-17 15:59:03 +01:00
Alexandre Ratchov
18105ebb4c allow listen_new_xxx() to return error, use log_xxx() 2015-12-17 15:50:37 +01:00
Alexandre Ratchov
44eae7129c use log_xxx() in opt.c, use simple list 2015-12-17 12:56:25 +01:00
Alexandre Ratchov
2009e44d9d don't require -U to precede -L 2015-12-15 12:49:31 +01:00
Alexandre Ratchov
cac23d61dc use a copy of the slowaccept flag, as it may change within the
poll() loop
2015-12-15 12:28:23 +01:00
Alexandre Ratchov
c77ea93344 Make sndio buildable on NetBSD, from Kamil Rytarowski <n54 at gmx.com> 2015-12-15 06:28:05 +01:00
Alexandre Ratchov
2327821cf0 reset slowaccept upon socket close 2015-12-09 11:24:15 +01:00
Alexandre Ratchov
fc179fb0c0 inline privdrop() 2015-12-09 11:23:55 +01:00
Alexandre Ratchov
91166d3abf remove -M from getopt() string 2015-12-09 11:16:35 +01:00
Alexandre Ratchov
7530bbf6d2 Pass full device name to audio/midi backends. 2015-12-09 11:13:11 +01:00