Commit Graph

236 Commits

Author SHA1 Message Date
Alexandre Ratchov 1049e3fa71 remove unused mmc start/stop/relocate call-backs as they don't
make sense for sockets
2014-03-07 11:16:26 +01:00
Alexandre Ratchov 55309494c6 unused include 2014-03-06 19:21:30 +01:00
Alexandre Ratchov aa1877d6ef remove unused "autostart" feature 2014-03-05 21:22:05 +01:00
Alexandre Ratchov d536b0972d please gcc 2014-03-05 21:14:57 +01:00
Alexandre Ratchov 2c1feaa186 add missing proto 2014-03-05 21:12:35 +01:00
Alexandre Ratchov 946186b6e5 remove slot_onmove 2014-03-05 21:11:57 +01:00
Alexandre Ratchov e140c92610 remove comment 2014-03-05 21:09:31 +01:00
Alexandre Ratchov f59de2770d check if writable preparing a DATA packet 2014-03-05 20:09:34 +01:00
Alexandre Ratchov 25e29a8cf2 remove unused attr 2014-03-05 19:52:21 +01:00
Alexandre Ratchov 8914029a2f remove autostart attribute 2014-03-05 09:16:57 +01:00
Alexandre Ratchov 0d773f998a set attach-time delta 2014-02-22 17:22:42 +01:00
Alexandre Ratchov 9c47745d49 remove sqrtone bits 2014-02-19 17:31:16 +01:00
Alexandre Ratchov 556d5f075b dont use rec buffers when in the SLOT_STOP state 2014-02-17 10:54:16 +01:00
Alexandre Ratchov de206b94f5 hide debug printfs 2014-02-17 10:32:38 +01:00
Alexandre Ratchov 54f97478bd dont drain rec direction 2014-02-17 10:29:34 +01:00
Alexandre Ratchov 32d0426047 run play and rec cycles together: simpler and more robust 2014-02-17 10:21:35 +01:00
Alexandre Ratchov 236d573f93 copy the right number of channels during join/expand 2014-02-08 16:00:54 +01:00
Alexandre Ratchov 6f415698f8 remove debug bits: dont pas unused channels 2014-02-08 09:47:44 +01:00
Alexandre Ratchov fa0cd74200 use the propoper integer size with AMSG_ISSET 2014-02-08 09:46:13 +01:00
Alexandre Ratchov 14c0ab970a drop blocks and insert silence in the socket tx/rx code path 2013-12-31 13:14:01 +01:00
Alexandre Ratchov 65c99cf7c3 round buffer size to nearest possible value 2013-12-31 13:13:04 +01:00
Alexandre Ratchov 1c496e9eab remove forgotten debug bits 2013-12-10 20:02:10 +01:00
Alexandre Ratchov 5c5a7280c2 use 0x7F as dev numer in sysex 2013-12-10 20:00:36 +01:00
Alexandre Ratchov b1c417ab04 add prototypes 2013-11-18 17:50:04 +01:00
Alexandre Ratchov 075b3da909 fix condition to check if a midi port is referenced 2013-09-28 20:44:50 +02:00
Alexandre Ratchov 5f8c1c9420 remove unused bits 2013-09-14 11:36:38 +02:00
Alexandre Ratchov edb79c93bc use -q options order as midi/N order 2013-05-12 06:52:10 +02:00
Alexandre Ratchov 1129bb8a7b Fix a typo in the condition to check if a midi port is referenced,
causing the port to be closed prematurely
2013-05-09 17:12:13 +02:00
Alexandre Ratchov 0f2025bd71 Initialize client rate and channel ranges. Fixes crashes when the
client doesn't set the rate and/or channel ranges. Problem reported
and analyzed by Dimitri Sokolyuk <sokolyuk at gmail.com>. Thanks!
2013-05-09 16:40:16 +02:00
Alexandre Ratchov 343af5e469 use stddef.h rather than sys/types 2013-05-09 15:28:50 +02:00
Alexandre Ratchov 48fbb54c6a initialize slot rate 2013-05-05 18:19:51 +02:00
Alexandre Ratchov 280f58c39a don't warn on ECONNABORTED 2013-03-13 09:35:21 +01:00
Alexandre Ratchov 141833dae9 enc/dec buffer size is one stream block, not one device block 2013-02-26 12:18:41 +01:00
Alexandre Ratchov ffe27f434f add watchdog timeout for bogus devices 2013-01-05 23:21:36 +01:00
Alexandre Ratchov 55c6148e0b don't call revents on zombified files 2013-01-05 16:21:48 +01:00
Alexandre Ratchov 1301c52ca1 readjust midi flow control after consuming input data 2012-12-20 17:15:00 +01:00
Alexandre Ratchov 68ae9199f6 simple phrasing, from jmc 2012-12-07 09:02:49 +01:00
Alexandre Ratchov eae4dde1d8 don't include defs.h where not needed 2012-12-07 09:00:45 +01:00
Alexandre Ratchov a17e696708 move log_level to utils.c 2012-12-06 15:35:17 +01:00
Alexandre Ratchov 9e83398293 set port = NULL for new connctions, fixes crashes
reported by brad
2012-12-06 09:12:00 +01:00
Alexandre Ratchov eff8e25982 remove misleading XXXs and TODOs 2012-12-01 13:13:57 +01:00
Alexandre Ratchov b3f82753f8 parse mode strings strictly 2012-12-01 13:07:01 +01:00
Alexandre Ratchov 7a76f322eb drain midi port output buffer before closing it ensuring the last
few bytes are not lost
2012-11-30 23:27:36 +01:00
Alexandre Ratchov 0057424c2b use the hold flag for midi ports as well 2012-11-30 22:02:48 +01:00
Alexandre Ratchov 49190bbba1 For MIDI ports, use the same open/close logic as for audio devices:
drop clients using it when the port is closed (eg. umidi disconnected)
and try to reopen it whenever a new client connects.
2012-11-30 21:51:46 +01:00
Alexandre Ratchov ccdecf59c4 When the audio device is closed, mark it as closed before
dropping connections otherwise clients may try to drain their
buffer and would attempt to reopen the device
2012-11-30 21:49:52 +01:00
Alexandre Ratchov 2834345924 make DEV_xxx contiguous 2012-11-30 21:49:29 +01:00
Alexandre Ratchov 6cb370c626 fix midithru subscriptions 2012-11-29 18:56:59 +01:00
Alexandre Ratchov 2fd21c86fb space required between macro args and punctuation; from jmc@ 2012-11-23 10:00:38 +01:00
Alexandre Ratchov 1081d7208a add a dummy -M for compatibility with aucat 2012-11-23 08:25:58 +01:00
Alexandre Ratchov 32bd2a8953 use IPV6_V6ONLY 2012-11-19 00:13:19 +01:00
Alexandre Ratchov 7027fdf46c dont call revents twice 2012-11-12 18:05:55 +01:00
Alexandre Ratchov d899b0d484 remove few Xr's 2012-11-11 18:58:38 +01:00
Alexandre Ratchov 57322d54cf add/fix yet more comments 2012-11-11 17:51:27 +01:00
Alexandre Ratchov f6df08e0c3 add/fix more comments 2012-11-11 17:47:48 +01:00
Alexandre Ratchov 832a0a5a1f add/fix comments 2012-11-11 17:46:21 +01:00
Alexandre Ratchov e43d03b3df tweak comment 2012-11-11 10:49:03 +01:00
Alexandre Ratchov c875716078 ignored clock delta -> log_level 2 2012-11-11 10:42:47 +01:00
Alexandre Ratchov f33c7044ea don't build messages at the end of sock_in(), since the socket
may be destroyed at this stage
2012-11-11 03:18:23 +01:00
Alexandre Ratchov dc522e703f cleanup debug traces 2012-11-11 01:46:38 +01:00
Alexandre Ratchov 0203d4d00b remove dsp debug traces 2012-11-11 01:01:50 +01:00
Alexandre Ratchov 40cf11d689 simplify xmalloc & friends 2012-11-11 00:47:00 +01:00
Alexandre Ratchov ca6e1699f3 set default volume to -3dB 2012-11-11 00:26:33 +01:00
Alexandre Ratchov 40174ce175 dev_mix_setmaster -> dev_mix_adjvol 2012-11-11 00:21:34 +01:00
Alexandre Ratchov 12a200c18a readjust volumes when a stream is detached 2012-11-11 00:20:39 +01:00
Alexandre Ratchov b04a783fd8 free in slot_detach() memory allocated in slot_attach() 2012-11-11 00:01:52 +01:00
Alexandre Ratchov b55ceed719 better debug traces 2012-11-10 22:58:47 +01:00
Alexandre Ratchov 1ff4add221 get a reference to the device in pure mtc mode, ok armani@ 2012-11-10 22:58:29 +01:00
Alexandre Ratchov 6fa4f57d50 dont write past buffer end, ok armani@ 2012-11-10 22:57:49 +01:00
Alexandre Ratchov c69d0ebe10 -mmon uses -C args as channels to snoop 2012-11-10 16:28:24 +01:00
Alexandre Ratchov 3e17fc5717 fix wrong assert in slot_detach(), ok armani@ 2012-11-10 16:04:12 +01:00
Alexandre Ratchov 6b88502d9a fix copyright years 2012-11-10 14:58:53 +01:00
Alexandre Ratchov b4f76f12ef disable asserts hidden in aucat 2012-11-08 08:11:50 +01:00
Alexandre Ratchov a225f02ed3 ensure ralign is in the [1:round] range 2012-11-07 14:59:00 +01:00
Alexandre Ratchov a00c38b091 make midi_in handle input in a single shot 2012-11-07 11:38:49 +01:00
Alexandre Ratchov b45b76b8e0 dont call sock_read() on the write path; the reader state
is SOCK_RMSG and sock_read() will be called from the poll loop
2012-11-07 09:54:02 +01:00
Alexandre Ratchov a3a868da74 prime buffers with silence; make flow control start with zero
maxwrite
2012-11-07 08:48:35 +01:00
Alexandre Ratchov be643dd0ef set (unused) midi fill method 2012-11-06 12:37:50 +01:00
Alexandre Ratchov fffd1b2ad5 use flow control instead of throtteling 2012-11-04 23:07:45 +01:00
Alexandre Ratchov 2b55c6e659 tweak comments 2012-11-04 11:36:13 +01:00
Alexandre Ratchov cd8a3a6075 mem_alloc -> xmalloc 2012-11-03 18:09:50 +01:00
Alexandre Ratchov 5142109f22 make file i/o able to cross fifo bundary 2012-11-03 17:30:30 +01:00
Alexandre Ratchov 5fddbed369 make abuf structure use bytes 2012-11-02 19:05:29 +01:00
Alexandre Ratchov f2c1c70165 restart xfers when we get more tickets 2012-11-02 17:26:10 +01:00
Alexandre Ratchov fc38a92505 miofile -> port_mio 2012-11-02 15:58:34 +01:00
Alexandre Ratchov 8bdc288d6b fix leak: free s->mix.{decbuf,resampbuf} 2012-11-02 14:33:28 +01:00
Alexandre Ratchov fe60df1e1f remove unused #includes 2012-11-02 14:21:43 +01:00
Alexandre Ratchov 285549a2fb check that we run dev_cycle at block boundary 2012-11-02 14:15:24 +01:00
Alexandre Ratchov 22b132cf3a inline dev_sio_{read,write} since they are called only once 2012-11-02 13:39:06 +01:00
Alexandre Ratchov 532e76198c in siofile, use struct dev directly 2012-11-02 13:19:35 +01:00
Alexandre Ratchov d0d0d0ee32 s/state/cstate 2012-11-02 12:48:50 +01:00
Alexandre Ratchov a9dad9889f rename STATE_xxx to SIOFILE_xxx 2012-11-02 12:48:10 +01:00
Alexandre Ratchov e22f44cdfa move siofile structure into struct dev 2012-11-02 12:43:43 +01:00
Alexandre Ratchov 26bf90b89d use gnu autoconf style HAVE_XXX macros 2012-10-29 18:08:36 +01:00
Alexandre Ratchov 03e8e6c99c dont panic on rec hw xruns 2012-10-29 15:33:55 +01:00
Alexandre Ratchov 0b0ca8995d tighter boundary checks 2012-10-29 15:32:51 +01:00
Alexandre Ratchov 766895ba25 use @user@ to set SNDIO_USER 2012-10-29 14:20:45 +01:00
Alexandre Ratchov d2102db943 free() slot conversion & resampling buffers 2012-10-29 14:18:48 +01:00
Alexandre Ratchov b97efa105d arpa/net.h is not needed 2012-10-26 16:51:09 +02:00
Alexandre Ratchov 52d941c80b include arpa/inet.h 2012-10-26 16:41:36 +02:00
Alexandre Ratchov ab4a96fb39 fix signedness warnings 2012-10-24 14:53:37 +02:00
Alexandre Ratchov ea0d66a62d add explicit flow control in the protocol and use it for both midi and audio 2012-10-24 12:45:13 +02:00
Alexandre Ratchov 708d668654 add frames vs bytes arithmetic in assert 2012-10-20 09:52:44 +02:00
Alexandre Ratchov 10bd2bb48a panic() if read buffer overruns 2012-10-16 09:47:48 +02:00
Alexandre Ratchov c3b7829b02 better debug traces 2012-10-16 09:45:53 +02:00
Alexandre Ratchov e7b81ffcd0 free buffers in dev_close(), delete midi port in dev_del() 2012-10-15 18:53:38 +02:00
Alexandre Ratchov 3edbce0c18 fix memory leaks 2012-10-15 18:43:34 +02:00
Alexandre Ratchov 61c00bcef2 close the device only if it's opened 2012-10-15 18:19:07 +02:00
Alexandre Ratchov cf80edff3e check for missed tick after record cycle completion 2012-10-08 23:36:29 +02:00
Alexandre Ratchov e1a4e8daba remove sndiod links before installing 2012-10-08 23:19:03 +02:00
Alexandre Ratchov 792b22dc90 log slot details only if its allocated 2012-10-08 18:26:44 +02:00
Alexandre Ratchov a525ed859b unbreak volume calculation 2012-10-08 17:46:48 +02:00
Alexandre Ratchov 857707b227 allow sndio anonymouse uid to be changed; dont check its home directory 2012-10-07 15:55:52 +02:00
Alexandre Ratchov bca3235a53 dont try to decode device input in monitoring cycles 2012-10-07 13:46:51 +02:00
Alexandre Ratchov f29564da69 better xmalloc from midish 2012-10-06 14:18:49 +02:00
Alexandre Ratchov 258123a17c use a local variable to store volume 2012-10-06 12:27:03 +02:00
Alexandre Ratchov ce83ee0567 add missing compat includes 2012-10-06 12:24:03 +02:00
Alexandre Ratchov 2b5ee784cb backout last 2012-10-05 17:59:32 +02:00
Alexandre Ratchov 283aab28b0 fix msb usage in aparams_native() 2012-10-05 17:58:11 +02:00
Alexandre Ratchov 03907f98dc more libsndio consistency checks 2012-10-05 16:04:45 +02:00
Alexandre Ratchov 753faf3d11 check consistency of libsndio 2012-10-05 14:30:56 +02:00
Alexandre Ratchov 9f7e689a0a Remove deadcode. Calculate volume weights for play stream only.
Current position for rec-only devices is zero.
2012-10-05 14:30:29 +02:00
Alexandre Ratchov 7709b5d017 style 2012-10-05 14:24:38 +02:00
Alexandre Ratchov 5136ef4aad trim spaces at end of lines 2012-10-03 15:41:56 +02:00
Alexandre Ratchov 832cb8bbe7 Fix midi output "ownership". Check if clockticks are out of bounds to
detect bogus libsndio backends. Use a midithru for device control.
2012-09-26 00:07:28 +02:00
Alexandre Ratchov 3e3d663d33 use (s - d->slot) a midi channel 2012-09-05 01:17:41 +02:00
Alexandre Ratchov 84d21ff8c2 properly count file descriptors 2012-09-05 00:50:42 +02:00
Alexandre Ratchov 526f2d2b92 upon connection copy the maxweight parameter from the opt structure 2012-09-04 16:54:45 +02:00
Alexandre Ratchov 41b3188fd4 move data outside dsp states, generate silence with enc_sil_do 2012-09-04 12:48:45 +02:00
Alexandre Ratchov b4b6aa1844 remove XXX in constant names 2012-09-04 12:48:01 +02:00
Alexandre Ratchov ff73404bb6 re-enable timer 2012-09-04 10:03:22 +02:00
Alexandre Ratchov b77718fd0b simplify manual, remove -x option 2012-09-03 19:59:35 +02:00
Alexandre Ratchov 0a0b1c0b20 move aparams.c contents in dsp.c 2012-09-03 13:20:41 +02:00
Alexandre Ratchov f1c34efede style 2012-09-03 10:21:12 +02:00
Alexandre Ratchov 06920b56d9 remove aparams_{eq,copy}, nicer log messages 2012-09-03 10:14:23 +02:00
Alexandre Ratchov 6ce349176e add new sndiod 2012-09-03 00:13:30 +02:00