Up to [local] / src / usr.bin / aucat
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.47, Wed Jan 21 08:43:55 2015 UTC (9 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.46: +1 -1 lines
FILE REMOVED
Simplify internals and rewrite file header parsing code: - remove -M, -t, -w, -C, -x flags that don't make sense anymore - make "-j off" the default (sndiod already does the job) - don't limit the number of played/recorded files. - add support for floating-point encoded files. - add support for apple .aiff and sun/next .au files
Revision 1.46 / (download) - annotate - [select for diffs], Mon Nov 18 17:37:45 2013 UTC (10 years, 6 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE,
OPENBSD_5_6,
OPENBSD_5_5_BASE,
OPENBSD_5_5
Changes since 1.45: +17 -1 lines
Diff to previous 1.45 (colored)
add missing prototypes
Revision 1.45 / (download) - annotate - [select for diffs], Sat Oct 27 08:31:59 2012 UTC (11 years, 6 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4,
OPENBSD_5_3_BASE,
OPENBSD_5_3
Changes since 1.44: +5 -5 lines
Diff to previous 1.44 (colored)
use unsigned chars for midi messages (to avoid gcc warning)
Revision 1.44 / (download) - annotate - [select for diffs], Tue Sep 25 20:12:34 2012 UTC (11 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.43: +5 -2 lines
Diff to previous 1.43 (colored)
Upon "master volume change" message, send feedback to other clients only. Fixes the master volume slider stuttering in MIDI programs. Found by armani@
Revision 1.43 / (download) - annotate - [select for diffs], Wed Apr 25 07:21:41 2012 UTC (12 years ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE,
OPENBSD_5_2
Changes since 1.42: +5 -5 lines
Diff to previous 1.42 (colored)
Fix typos, from Michael W. Bombardieri <mb at ii.net>, Thanks!
Revision 1.42 / (download) - annotate - [select for diffs], Wed Apr 11 06:05:43 2012 UTC (12 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.41: +21 -18 lines
Diff to previous 1.41 (colored)
Use "unsigned int" rather than "unsigned". No object change. suggested by deraadt@
Revision 1.41 / (download) - annotate - [select for diffs], Fri Mar 23 11:59:54 2012 UTC (12 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.40: +32 -1 lines
Diff to previous 1.40 (colored)
add a MIDI-controlled master volume knob to adjust the mix of all playback stream, discussed with armani@
Revision 1.40 / (download) - annotate - [select for diffs], Fri Dec 2 10:34:50 2011 UTC (12 years, 5 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE,
OPENBSD_5_1
Changes since 1.39: +236 -419 lines
Diff to previous 1.39 (colored)
reuse midi-control code to implement midi thru boxes and remove the old midithru implementation; less code, less bugs. As a side effect, midi output doesn't implement running status "compression" any more.
Revision 1.39 / (download) - annotate - [select for diffs], Sun Nov 20 22:54:51 2011 UTC (12 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.38: +107 -585 lines
Diff to previous 1.38 (colored)
Move mmc/mtc and volume control bits from struct aproc to struct dev. Allows volume settings to be saved while the device is kept closed. Besides that, no behabiour changes.
Revision 1.38 / (download) - annotate - [select for diffs], Tue Nov 15 20:41:54 2011 UTC (12 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.37: +29 -24 lines
Diff to previous 1.37 (colored)
make midi 'owner' pointer per-output
Revision 1.37 / (download) - annotate - [select for diffs], Wed Oct 12 07:20:04 2011 UTC (12 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored)
Simplify and improve the way options are parsed and remove ~300 lines of code that becomes unused. Few command line arguments changes are required though: - stream definitions (-ios) now must follow devices definitions they are attached to (-fMn) - the -n option is now a special "loopback" device and is thus used like -f, eg it must precede streams - in midicat, midi thru boxes are not created automatically anymore, the new "-M" option must be used for that - channel numbers (-Cc options) correspond always to channel numbers of the hardware. - the -u option isn't needed anymore - increase the log verbosity so user errors are logged without using -d tested by many, help from jmc
Revision 1.36 / (download) - annotate - [select for diffs], Mon Jun 27 07:57:38 2011 UTC (12 years, 10 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE,
OPENBSD_5_0
Changes since 1.35: +1 -3 lines
Diff to previous 1.35 (colored)
remove two forgotten debug printf()s
Revision 1.35 / (download) - annotate - [select for diffs], Mon Jun 27 07:17:44 2011 UTC (12 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.34: +56 -1 lines
Diff to previous 1.34 (colored)
expose audio client names through sysex messages, this way any midi client could determine which volume knob corresponds to which client. Such sysex messages are ignored by hardware or software that don't understand them
Revision 1.34 / (download) - annotate - [select for diffs], Thu Jun 2 18:50:39 2011 UTC (12 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.33: +6 -6 lines
Diff to previous 1.33 (colored)
close midi control ports and thru boxes only when there are no inputs anymore, to ensure data is drained
Revision 1.33 / (download) - annotate - [select for diffs], Mon May 9 18:03:08 2011 UTC (13 years ago) by ratchov
Branch: MAIN
Changes since 1.32: +105 -75 lines
Diff to previous 1.32 (colored)
move all hardcoded offsets and constants relative to midi system exclusive messages in a nice sysex.h file. No behaviour change.
Revision 1.32 / (download) - annotate - [select for diffs], Sat Nov 20 05:12:38 2010 UTC (13 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE,
OPENBSD_4_9
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)
clean up cases of ;;
Revision 1.31 / (download) - annotate - [select for diffs], Sun Nov 14 13:51:27 2010 UTC (13 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.30: +6 -2 lines
Diff to previous 1.30 (colored)
Terminate midi thru boxes trying to drain but that have no outputs anymore, otherwise they can't be cleaned up by dev_close()
Revision 1.30 / (download) - annotate - [select for diffs], Thu Oct 21 19:10:52 2010 UTC (13 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)
fix style and typos in messages and comments
Revision 1.29 / (download) - annotate - [select for diffs], Thu Oct 21 18:57:42 2010 UTC (13 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.28: +23 -14 lines
Diff to previous 1.28 (colored)
use MODE_xxx and XRUN_xxx macros everywhere, and zap corresponding AMSG_xxx macros, which in turns simplifies the code
Revision 1.28 / (download) - annotate - [select for diffs], Tue Jul 6 01:12:45 2010 UTC (13 years, 10 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE,
OPENBSD_4_8
Changes since 1.27: +4 -4 lines
Diff to previous 1.27 (colored)
Handle all streams the same way because there's no actual difference between audio files and client connections. Clean up the way command line options are handled and clarify this in the manual page: stream parameters (-Ccehjmrtvx) must precede stream definitions (-ios) and per-device parameters (-abz) and stream definitions (-ios) must precede device definitions (-f). Since there's no ``server'' and ``non-server'' modes anymore, make the -l option just detach the process. ok and help from jakemsr and jmc
Revision 1.27 / (download) - annotate - [select for diffs], Sat Jun 5 16:05:17 2010 UTC (13 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)
When closing the device, request clients using a midi control slot to quit. Otherwise streams that are not attached to the device are not closed.
Revision 1.26 / (download) - annotate - [select for diffs], Fri Jun 4 07:02:59 2010 UTC (13 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.25: +1 -8 lines
Diff to previous 1.25 (colored)
midi control aproc structure is can be destroyed before any stream referencing it (for instance while a recording stream drains buffers of a closed device). So, don't abort() if this happen.
Revision 1.25 / (download) - annotate - [select for diffs], Fri Jun 4 06:15:28 2010 UTC (13 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.24: +13 -12 lines
Diff to previous 1.24 (colored)
Allow the audio device to be opened only while it's actually used. This is necessary for uaudio devices, for instance to start aucat before the device is plugged. Or to unplug a device whithout having to restart aucat when another device is plugged. This is controlled with the new -a option. Allow multiple audio devices to be used concurently, i.e. multiple ``-f devname'' options to be used; -f options must follow per-device options, which is what we do for other options.
Revision 1.24 / (download) - annotate - [select for diffs], Sat May 8 15:35:45 2010 UTC (14 years ago) by ratchov
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)
prime play buffers as soon as the device is opened, otherwise a midi client could start it with empty buffers, in turn hurting audio clients.
Revision 1.23 / (download) - annotate - [select for diffs], Fri May 7 07:07:51 2010 UTC (14 years ago) by ratchov
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)
don't prime audio buffers if the device is only started to serve as clock source for MIDI clients.
Revision 1.22 / (download) - annotate - [select for diffs], Thu May 6 06:18:37 2010 UTC (14 years ago) by ratchov
Branch: MAIN
Changes since 1.21: +5 -4 lines
Diff to previous 1.21 (colored)
allow volumes of uninitialized slots to be set
Revision 1.21 / (download) - annotate - [select for diffs], Sun May 2 11:54:26 2010 UTC (14 years ago) by ratchov
Branch: MAIN
Changes since 1.20: +2 -3 lines
Diff to previous 1.20 (colored)
Clean up device handling code to clarify different initialization phases and different device states. Split initialization in two phases: first global variables are initialized then the audio hardware is opened. Allow devices that don't support full-duplex to work in play-only or record-only mode, even if ``-m play'' or ``-m rec'' are not specified.
Revision 1.20 / (download) - annotate - [select for diffs], Sat Apr 24 06:18:23 2010 UTC (14 years ago) by ratchov
Branch: MAIN
Changes since 1.19: +8 -8 lines
Diff to previous 1.19 (colored)
rename ibuflist/obuflist -> ins/outs to cut long lines from Thomas Pfaff, thanks
Revision 1.19 / (download) - annotate - [select for diffs], Tue Apr 6 20:07:01 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.18: +160 -60 lines
Diff to previous 1.18 (colored)
aucat (server): - make the ``-m mode'' option per subdevice, allowing subdevices to be play-only or rec-only even if the server is full-duplex - add ``monitoring'' mode (with ``-m mon''). This is a record-only stream from which played streams can be recorded (kind of ``record what you hear''). - allow MIDI devices to be subscribed to the controlling MIDI port of the server, ie what midicat does (with -f option), but using the -q option. - add flow control to the protocol, and serialize clock ticks (sio_onmove() calls) and data chunks. This should fix certain full-duplex programs, broken with ``magic'' block/buffer size combinations. - enable 3 block latency which is the minimum theoretical. Make -z and -b options correspond to device parameters. - make sio_getcap(3) the same for aucat and sun backends, ie return whatever is supported (``everything'' in the aucat case, since everything is actulally supported). aucat (player): - enable ``-m mode'' option to select between monitoring and recording when ``-o file'' is used. - plug MIDI code to non-server codepath. The MIDI control device is specified with the ``-q device'' option, as in server mode. - impliment lseek()'ing within files (controlled through MIDI). Necessary to use aucat with a MIDI sequencer. midicat (thrubox): - rename ``-f'' flag to ``-q'', so it has the same name as in aucat (-f is still working) ok jakemsr@, tweaks from jmc@
Revision 1.18 / (download) - annotate - [select for diffs], Sat Apr 3 17:59:17 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.17: +59 -159 lines
Diff to previous 1.17 (colored)
backout last change, committed by mistake, sorry...
Revision 1.17 / (download) - annotate - [select for diffs], Sat Apr 3 17:40:33 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.16: +160 -60 lines
Diff to previous 1.16 (colored)
doc fixes from jmc
Revision 1.16 / (download) - annotate - [select for diffs], Sat Jan 16 23:21:56 2010 UTC (14 years, 4 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE,
OPENBSD_4_7
Changes since 1.15: +4 -1 lines
Diff to previous 1.15 (colored)
don't transmit MIDI active sensing messages, because they cannot be merged.
Revision 1.15 / (download) - annotate - [select for diffs], Sat Jan 16 23:18:31 2010 UTC (14 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.14: +2 -6 lines
Diff to previous 1.14 (colored)
when closing the device, delete its MIDI end, if it has no writers.
Revision 1.14 / (download) - annotate - [select for diffs], Sun Jan 10 21:47:41 2010 UTC (14 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.13: +209 -1 lines
Diff to previous 1.13 (colored)
Add traces to help tracking subtle timing bugs often causing underuns and overruns; such bugs are hard to debug with ktrace or a debugger. They are also handy to debug or monitor code using aucat. To enable traces, compile aucat with ``make DEBUG=-DDEBUG'' and use the -d option multiple times. ok jakemsr
Revision 1.13 / (download) - annotate - [select for diffs], Tue Nov 3 21:31:37 2009 UTC (14 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.12: +309 -5 lines
Diff to previous 1.12 (colored)
Allow any program using aucat to act as MMC slave and MTC master transparently. Multiple audio applications can be started synchronously from external software/hardware supporting the standard Start/Stop/Relocate messages. The server clock is exposed through MTC, allowing non-audio software/hardware to be synchronized to audio applications.
Revision 1.12 / (download) - annotate - [select for diffs], Tue Oct 27 22:41:03 2009 UTC (14 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.11: +36 -22 lines
Diff to previous 1.11 (colored)
slightly cleanup the socket and control bits: - reject bogus clients ignoring flow control during the start phase - don't check if dev_midi is NULL, it can't be NULL anymore - use ``struct ctl_ops'' instead of a simple call-backs - don't try to flush play buffer if it's not attached yet
Revision 1.11 / (download) - annotate - [select for diffs], Sat Oct 10 12:43:09 2009 UTC (14 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.10: +9 -1 lines
Diff to previous 1.10 (colored)
make dev_done() common to audio and MIDI, and drop dev_thrudone()
Revision 1.10 / (download) - annotate - [select for diffs], Fri Oct 9 16:49:48 2009 UTC (14 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.9: +66 -66 lines
Diff to previous 1.9 (colored)
Make abuf structure smaller: - put aproc-specific parameters into unions since they are never used together - remove constant ``data'' pointer always pointing the end of the abuf structure
Revision 1.9 / (download) - annotate - [select for diffs], Sun Sep 27 11:51:20 2009 UTC (14 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.8: +1 -40 lines
Diff to previous 1.8 (colored)
remove all debug traces
Revision 1.8 / (download) - annotate - [select for diffs], Sat Aug 29 14:46:44 2009 UTC (14 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.7: +17 -4 lines
Diff to previous 1.7 (colored)
accept ``common'' messages (including system explusive) on the control MIDI port.
Revision 1.7 / (download) - annotate - [select for diffs], Thu Aug 27 06:31:13 2009 UTC (14 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.6: +52 -9 lines
Diff to previous 1.6 (colored)
when an audio program connects to aucat, restore the volume it had the last time. For instance, this fixes the problem of programs reopenning the connection to aucat very often and thus resetting the volume setting all the time.
Revision 1.6 / (download) - annotate - [select for diffs], Wed Aug 26 08:28:21 2009 UTC (14 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.5: +22 -10 lines
Diff to previous 1.5 (colored)
when allocating the midi channel for the volume control of a new client, pick the oldest unused channel rather than the first found. This way new clients don't reuse channels of recently used applications, thus improving a lot the client<->channel affinity.
Revision 1.5 / (download) - annotate - [select for diffs], Wed Aug 26 06:10:15 2009 UTC (14 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.4: +19 -18 lines
Diff to previous 1.4 (colored)
don't mess with audio internals from within the midi bits. Instead use a call-back interface. This allows easily sending volume changes feedback to audio applications.
Revision 1.4 / (download) - annotate - [select for diffs], Sun Aug 23 13:40:45 2009 UTC (14 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.3: +58 -20 lines
Diff to previous 1.3 (colored)
Make aucat remember the control channel number a client is using. When the client connects again later, assign the same channel to it. This way applications always get the same fader on MIDI control surfaces.
Revision 1.3 / (download) - annotate - [select for diffs], Fri Aug 21 16:48:03 2009 UTC (14 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.2: +239 -2 lines
Diff to previous 1.2 (colored)
make aucat(1) expose a MIDI device to control server behaviour in realtime. For now only the playback volume of individual streams can be changed/monitored. To each stream is assigned a MIDI channel; the volume is changed/monitored using the standard controller number 7.
Revision 1.2 / (download) - annotate - [select for diffs], Wed Aug 19 05:54:15 2009 UTC (14 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.1: +1 -3 lines
Diff to previous 1.1 (colored)
organize midi code like audio code, no functional change
Revision 1.1 / (download) - annotate - [select for diffs], Sat Jul 25 08:44:27 2009 UTC (14 years, 9 months ago) by ratchov
Branch: MAIN
Currently midi capable programs can control midi hardware, but cannot cooperate with other programs. The aim of this change is to allow any program to send midi data to other programs as they were midi hardware. For instance, this change should solve the longstanding problem of using a midi sequencer with software synthesizers. More precisely: - new midicat(1) utility (actually hardlink to aucat(1)). it creates software midi thru boxes, allowing programs to send midi messages to other programs as they were midi(4) hardware. - new midi api in libsndio (see mio_open(3)), to access midi(4) devices and midicat(1) sockets in a uniform way. - new device naming scheme <service>:<unit>[.<option>], common to audio and midi. - new sndio(7) manual describing concepts and naming The current audio device naming still works, but people having scripts or configuration files containing device names could read the sndio(7) man page and slowly start updating device names. discussed with jakemsr@ and deraadt@, help form jmc@