Alexandre Ratchov
d7a55c76ee
No need to include sys/stat.h. From miko@.
2018-09-26 13:52:53 +02:00
Alexandre Ratchov
dc31dcd99e
Fix message to reflect "rmidi" is the expected string. From miko@.
2018-09-26 13:52:50 +02:00
Alexandre Ratchov
d4048a3a19
Use _sndio_parsenum() to parse device numbers. From miko@.
2018-09-26 13:45:23 +02:00
Alexandre Ratchov
6d55c0b59f
Merge branch 'master' into mixer
2018-07-27 16:30:57 +02:00
Alexandre Ratchov
6443e1dee1
sndiod: rename /tmp/aucat/aucatN -> /tmp/sndio/sockN
2018-07-27 15:42:51 +02:00
Alexandre Ratchov
8018db24a0
libsndio: move ~/.aucat_cookie to ~/.sndio/cookie
2018-07-27 15:41:04 +02:00
Alexandre Ratchov
d3be2d30ca
Merge branch 'master' into mixer
2018-03-02 07:45:18 +01:00
Alexandre Ratchov
220e7731bc
oss: use integer arithmetic to scale volume.
2018-03-02 07:42:53 +01:00
Alexandre Ratchov
f1cd80bb72
oss: add support for sio_setvol().
...
From Tobias Kortkamp <tobik@FreeBSD.org>, thanks.
2018-03-02 07:32:49 +01:00
Tobias Kortkamp
31cfb9b6dc
Support rsnd/default for opening the default device
2018-03-02 07:21:41 +01:00
Alexandre Ratchov
03799aab3f
Merge branch 'master' into mixer
2018-02-23 18:19:17 +01:00
Tobias Kortkamp
6b35921d2b
sio_oss.c: Add missing audio_buf_info
2018-02-01 11:33:42 +01:00
Alexandre Ratchov
1024ccde8b
Handle par->le, par->msb, par->sig as booleans in sio_oss_setpar().
...
From Tobias Kortkamp <tobik@FreeBSD.org>. Thanks.
2018-01-15 18:32:02 +01:00
Alexandre Ratchov
a81ef2709a
Check if the device supports playing/recording.
...
From Tobias Kortkamp <tobik@FreeBSD.org>. Thanks.
2018-01-15 18:30:21 +01:00
Alexandre Ratchov
6e1de49304
Merge branch 'master' into mixer
2018-01-12 08:32:16 +01:00
Alexandre Ratchov
f76d93d479
Unbreak SONAME on Linux, noticed by and help from Peter
...
Piwowarski <peterjpiwowarski at gmail.com>.
2018-01-11 21:57:37 +01:00
Alexandre Ratchov
1d7f175971
Merge branch 'master' into mixer
2018-01-10 16:52:51 +01:00
Alexandre Ratchov
ed5fe4d755
crank major, to match openbsd version
2018-01-10 16:52:36 +01:00
Alexandre Ratchov
527457fc5d
Many sndio.7 tweaks from Ingo
2018-01-10 16:45:02 +01:00
Alexandre Ratchov
3aa86a18e3
expose siomix_sun_{getfd,fdopen}
2017-11-13 07:24:56 +01:00
Alexandre Ratchov
a4dee36869
Merge branch 'master' into mixer
2017-11-13 07:16:39 +01:00
Alexandre Ratchov
3d6b602fe9
use /dev/urandom by default
2017-11-11 13:04:46 +01:00
Alexandre Ratchov
81d171003b
Merge branch 'master' into mixer
2017-11-04 10:41:04 +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
7178903317
mixer: use (name, unit) couple for groups as well
2017-08-03 01:53:40 +02:00
Alexandre Ratchov
8c7d6cd46c
Merge branch 'master' into mixer
2017-07-20 12:50:56 +02:00
Alexandre Ratchov
0f5f91fae3
tweak RETURN VALUES, from jmc@
2017-07-20 12:50:12 +02:00
Alexandre Ratchov
00a5bfe57a
Merge branch 'master' into mixer
2017-07-20 12:32:22 +02:00
Alexandre Ratchov
0fe173a94b
unbreak installation on Darwin, SO_LINK was missing
2017-06-04 11:59:06 +02:00
Alexandre Ratchov
e204a83de6
mixer: reduce differences with master branch
2017-05-31 15:44:26 +02:00
Alexandre Ratchov
1129bb3390
fix trailing spaces in mixer-specific bits
2017-05-18 15:27:11 +02:00
Alexandre Ratchov
0445c6a464
Merge branch 'master' into mixer
2017-03-28 10:32:48 +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
f49f0ccd14
remove socket_cloexec() and use fcntl with the necessary ifdefery
2017-03-27 12:52:56 +02:00
Alexandre Ratchov
a48a424901
add portability bits for OS X
2017-03-27 12:34:26 +02:00
Alexandre Ratchov
ca24b960e4
reorder deps in Makefile.in
2017-02-14 14:34:28 +01:00
Alexandre Ratchov
0c783bd3b0
Add support for FreeBSD raw usb-midi devices. Bits from Tobias
...
Kortkamp <t@tobik.me> plus configure script tweaks.
2017-02-14 14:22:57 +01:00
Alexandre Ratchov
8744522757
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.
2017-02-14 14:22:10 +01:00
Alexandre Ratchov
b3acce35f8
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.
2017-02-14 14:21:38 +01:00
Alexandre Ratchov
fdca3c2678
sio_oss.c: if the requrested block size is a power of two
...
make the oss block size calculation return the requested value.
2017-02-14 14:21:27 +01:00
Alexandre Ratchov
39d885892e
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.
2017-02-14 14:21:07 +01:00
Alexandre Ratchov
0eaaa8eb20
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.
2017-02-14 14:20:58 +01:00
Alexandre Ratchov
3896b504e3
Remove forgotten debug printf in sio_oss.c
2017-02-14 14:20:50 +01:00
Alexandre Ratchov
486b490756
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.
2017-02-14 14:20:43 +01:00
Alexandre Ratchov
c2be662282
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.
2017-02-14 14:20:31 +01:00
Alexandre Ratchov
a25bc8355a
In OSS/FreeBSD sio_setpar(), validate the encoding, ensuring we
...
never end-up with an unknown one.
2017-02-14 14:20:17 +01:00
Alexandre Ratchov
a88873c661
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.
2017-02-14 14:20:03 +01:00
Alexandre Ratchov
89f3ea0426
Tweak spacing of sio_oss.c to look more like other files.
2017-02-14 14:19:33 +01:00
Alexandre Ratchov
02c2d1521c
Add support for OSS/FreeBSD. From Tobias Kortkamp <t@tobik.me>.
2017-02-14 14:19:25 +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
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
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
91ad4627a7
remove commented code
2016-01-29 08:23:24 +01:00
Alexandre Ratchov
030bfe1dcb
fix controls with no unit nomber (used to appear as 65536)
2016-01-28 19:27:46 +01:00
Alexandre Ratchov
5a63dff869
intruduce namespaces
2016-01-28 19:17:11 +01:00
Alexandre Ratchov
91689ee702
Don't fail if mute control remain unchanged.
2016-01-28 19:06:32 +01:00
Alexandre Ratchov
318845ea8c
fix onctl() feedback addr
2016-01-26 10:30:12 +01:00
Alexandre Ratchov
f08810f595
don't fail if ctl is set to the same value
2016-01-26 10:25:58 +01:00
Alexandre Ratchov
5dc67b663e
merge head
2016-01-26 10:23:38 +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
aa4fc43964
move sndiod manual to sec 8
2016-01-07 17:48:47 +01:00
Alexandre Ratchov
37cdacd0aa
crank major (openbsd specific changes)
2015-12-30 12:54:40 +01:00
Alexandre Ratchov
7530bbf6d2
Pass full device name to audio/midi backends.
2015-12-09 11:13:11 +01:00
Alexandre Ratchov
7b062cf12f
merge from head
2015-10-30 16:17:56 +01:00
Alexandre Ratchov
8bb88f248f
if no -f or -q are used, attach rsnd/[0-3] and rmidi/[0-7]
2015-10-20 15:25:54 +02:00
Alexandre Ratchov
bbfde03621
please gcc
2015-10-20 09:15:09 +02:00
Alexandre Ratchov
353176f99a
merge PATH_MAX changes from HEAD
2015-10-02 14:40:00 +02:00
Alexandre Ratchov
5d431d3616
Replace hard-coded strings with macros, replace PATH_MAX with actual
...
string length, validate audio and midi device numbers
2015-10-02 14:28:17 +02:00
Alexandre Ratchov
2d90528559
merges from -head
2015-10-01 08:56:06 +02:00
Alexandre Ratchov
6ddedf6c9f
remove unused AUCAT_COOKIE environment variable
2015-10-01 08:50:13 +02:00
Alexandre Ratchov
7062d226ac
remove useless quoting and fix typos, from schwarze@
2015-10-01 08:49:47 +02:00
Alexandre Ratchov
ba4929bdb9
Terminate mixer description dump with a MIXSYNC message. Fix
...
server-side "desc" temporary buffer size.
2015-09-05 16:10:03 +02:00
Alexandre Ratchov
84e30dd7a9
use fixed size buffer for mixer description
2015-09-05 14:34:20 +02:00
Alexandre Ratchov
043bb0950a
remove labels, use the stream name instead. Disallow digits in
...
stream names and use the "unit" integer instead.
2015-09-04 17:08:12 +02:00
Alexandre Ratchov
a162cfd9e6
remove mixer api files
2015-08-28 09:03:49 +02:00
Alexandre Ratchov
e8007feb00
move the mixer api to a dedicated "mixer" branch
2015-08-28 08:57:47 +02:00
Alexandre Ratchov
9ff8e621d0
typos in comments and strings
2015-08-26 10:27:22 +02:00