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
3d6b602fe9
use /dev/urandom by default
2017-11-11 13:04:46 +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
c0767fd171
call _sndio_debug_init() in mio_rmidi_getfd()
2017-11-04 10:40:00 +01:00
Alexandre Ratchov
053efb5710
no need to check if pointer passed to free() is NULL
2017-11-04 10:38:01 +01:00
Alexandre Ratchov
93b9e03596
expose *_getfd() and *_fdopen() prototypes
2017-11-04 09:35:05 +01:00
Alexandre Ratchov
0663b9b2b7
make mio_rmidi_getfd() non-static, missed in last commit
2017-11-04 09:34:30 +01:00
Alexandre Ratchov
7e19ef6644
Make *_getfd() and *_fdopen() public.
...
This allows pledged sndiod to build with the portable library.
2017-11-04 09:14:29 +01:00
Alexandre Ratchov
56f1183e78
add missing HISTORY; based on CVS logs and release announcements.
...
From schwarze@.
2017-11-04 09:09:56 +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
944568234a
remove sndiod.service on distclean
2017-09-18 19:44:06 +02:00
Alexandre Ratchov
5e88de62ea
add sndiod.service file for systemd-based systems
2017-09-18 19:42:31 +02:00
Alexandre Ratchov
0f5f91fae3
tweak RETURN VALUES, from jmc@
2017-07-20 12:50:12 +02:00
Alexandre Ratchov
98b2feaca0
Fix typos. From Michael W. Bombardieri <mb at ii.net>. Thanks!
2017-07-20 12:49:31 +02: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
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
0fe173a94b
unbreak installation on Darwin, SO_LINK was missing
2017-06-04 11:59:06 +02:00
Alexandre Ratchov
f8436a7075
examples/fd: spacing
2017-05-12 06:51:52 +02:00
Alexandre Ratchov
396b7496dc
examples/cap: typos and spacing
...
From Andre Smagin <as at smagin.com>, thanks
2017-05-12 06:50:42 +02:00
Alexandre Ratchov
798435b1dc
Tweak RETURN VALUES section. Move description of sio_pollfd() and
...
sio_nfds() return values there and add a paragraph about sio_eof().
From natano@.
2017-03-27 14:05:51 +02:00
Alexandre Ratchov
f6579c4341
Use the right header sizes for reading .aiff and .au files.
...
From nicm@.
2017-03-27 13:58:46 +02:00
Alexandre Ratchov
f49f0ccd14
remove socket_cloexec() and use fcntl with the necessary ifdefery
2017-03-27 12:52:56 +02:00
Alexandre Ratchov
7d804be937
tweak spacing
2017-03-27 12:46:22 +02:00
Alexandre Ratchov
d6e9a73e41
add missing -DHAVE_CLOCK_GETTIME
2017-03-27 12:40:19 +02:00
Alexandre Ratchov
2a2e27b4c7
add missing includes
2017-03-27 12:39:56 +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
ca24b960e4
reorder deps in Makefile.in
2017-02-14 14:34:28 +01:00
Alexandre Ratchov
3d710ac721
Use -io options to specify files and -q option to specify one
...
or two ports, allowing port-to-port transfers.
2017-01-18 10:26:27 +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
2f5165d92f
sync utils.c to sndiod one
2017-01-03 08:20:49 +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
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
2606d3f24e
Add support for FreeBSD raw usb-midi devices. Bits from Tobias
...
Kortkamp <t@tobik.me> plus configure script tweaks.
2016-11-06 12:21:59 +01:00
Alexandre Ratchov
9cb5193ca7
sio_oss.c: In full duplex-mode, don't require play and rec
...
buffer sizes to be the same. Only the block sizes need to be the
same.
2016-11-05 07:21:28 +01:00
Alexandre Ratchov
8c95537698
sio_oss.c: Disallow tiny fragment sizes, as they may overload
...
the system. And as sndiod runs with increased priority, it would
consume all the cpu and could in turn hang the system.
2016-11-05 07:14:46 +01:00
Alexandre Ratchov
c25d86c7db
sio_oss.c: if the requrested block size is a power of two
...
make the oss block size calculation return the requested value.
2016-11-05 07:11:08 +01:00
Alexandre Ratchov
4f56ff6181
In sio_oss_revents() use the fifo_samples counter returned
...
by SNDCTL_DSP_CURRENT_{I,O}PTR to determine the device current
position. Besides being simpler than using the absolute position,
this fixes hangs in record-only mode.
2016-11-05 07:02:39 +01:00
Alexandre Ratchov
c5daeee294
On OSS/FreeBSD, set poll(2) threshold to 1 byte, so that it returs
...
POLLIN/POLLOUT whenever read/write can be called without blocking. By
default OSS use 1 block of threshold.
2016-11-04 19:12:07 +01:00
Alexandre Ratchov
2b58ec0677
Remove forgotten debug printf in sio_oss.c
2016-11-04 14:14:52 +01:00
Alexandre Ratchov
db20298468
Use the SNDCTL_DSP_SETTRIGGER interface to start/stop the device, this
...
allows the "onmove" callback to be called whenever the DMA actually
starts (and not on the first write). This also removes the need for
sio_osee_setpar() call every time the device is stopped.
2016-11-04 14:09:42 +01:00
Alexandre Ratchov
9be2c65600
Allow programs using OSS/FreeBSD backend to select the buffer size.
...
According to kernel sources, SNDCTL_DSP_POLICY ioctl doesn't seem to
always set play and rec buffer sizes to the same value. That's why we
use the SNDCTL_DSP_SETFRAGMENT ioctl instead.
2016-11-04 11:03:41 +01:00
Alexandre Ratchov
a282420a49
In OSS/FreeBSD sio_setpar(), validate the encoding, ensuring we
...
never end-up with an unknown one.
2016-11-04 09:18:04 +01:00
Alexandre Ratchov
4d6d7700a4
Make sio_getpar() on OSS/FreeBSD return the device block size/count
...
instead of saved ones. Fixes busy loops caused by poll(2) returning
POLLOUT after the program has filled its play buffer.
2016-11-04 08:05:47 +01:00
Alexandre Ratchov
e867d773fa
Tweak spacing of sio_oss.c to look more like other files.
2016-11-03 08:09:11 +01:00
Alexandre Ratchov
d396d690d1
Add support for OSS/FreeBSD. From Tobias Kortkamp <t@tobik.me>.
2016-11-03 08:04:47 +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