Up to [local] / src / usr.bin / aucat
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.86, Wed Jan 21 08:43:55 2015 UTC (9 years, 4 months ago) by ratchov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.85: +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.85 / (download) - annotate - [select for diffs], Sun Aug 10 10:25:35 2014 UTC (9 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored) to selected 1.55 (colored)
typo in debug message
Revision 1.84 / (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.83: +5 -0 lines
Diff to previous 1.83 (colored) to selected 1.55 (colored)
add missing prototypes
Revision 1.83 / (download) - annotate - [select for diffs], Tue Nov 12 06:47:34 2013 UTC (10 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.82: +1 -2 lines
Diff to previous 1.82 (colored) to selected 1.55 (colored)
remove bogus legacy server-specific bits that cause confusion
Revision 1.82 / (download) - annotate - [select for diffs], Tue Sep 25 20:12:34 2012 UTC (11 years, 8 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.81: +1 -5 lines
Diff to previous 1.81 (colored) to selected 1.55 (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.81 / (download) - annotate - [select for diffs], Thu Aug 30 07:48:01 2012 UTC (11 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.80: +7 -2 lines
Diff to previous 1.80 (colored) to selected 1.55 (colored)
Use (rate / 15) as block size in off-line mode to ensure the block size stays below SHORT_MAX. Found by sthen@
Revision 1.80 / (download) - annotate - [select for diffs], Wed May 23 19:14:02 2012 UTC (12 years ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE,
OPENBSD_5_2
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored) to selected 1.55 (colored)
Fix duplicate mixer knob names
Revision 1.79 / (download) - annotate - [select for diffs], Wed Apr 11 06:05:43 2012 UTC (12 years, 2 months ago) by ratchov
Branch: MAIN
Changes since 1.78: +28 -27 lines
Diff to previous 1.78 (colored) to selected 1.55 (colored)
Use "unsigned int" rather than "unsigned". No object change. suggested by deraadt@
Revision 1.78 / (download) - annotate - [select for diffs], Wed Apr 4 11:16:24 2012 UTC (12 years, 2 months ago) by ratchov
Branch: MAIN
Changes since 1.77: +6 -6 lines
Diff to previous 1.77 (colored) to selected 1.55 (colored)
Fix memory leak in the error handling code path of failed device creation. From jsg@
Revision 1.77 / (download) - annotate - [select for diffs], Fri Mar 23 11:59:54 2012 UTC (12 years, 2 months ago) by ratchov
Branch: MAIN
Changes since 1.76: +26 -2 lines
Diff to previous 1.76 (colored) to selected 1.55 (colored)
add a MIDI-controlled master volume knob to adjust the mix of all playback stream, discussed with armani@
Revision 1.76 / (download) - annotate - [select for diffs], Thu Jan 26 09:07:03 2012 UTC (12 years, 4 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE,
OPENBSD_5_1
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored) to selected 1.55 (colored)
Make the default rate 48kHz and the default block size 10ms. These settings ensure video players and programs using MTC are smooth by default. Thanks to all who tested.
Revision 1.75 / (download) - annotate - [select for diffs], Sat Jan 14 13:15:57 2012 UTC (12 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.74: +1 -5 lines
Diff to previous 1.74 (colored) to selected 1.55 (colored)
remove unused variables, from Michael W. Bombardieri, thanks!
Revision 1.74 / (download) - annotate - [select for diffs], Tue Jan 10 08:06:28 2012 UTC (12 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored) to selected 1.55 (colored)
hide "device disappeared" messages unless -d is used
Revision 1.73 / (download) - annotate - [select for diffs], Fri Dec 2 10:34:50 2011 UTC (12 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.72: +17 -40 lines
Diff to previous 1.72 (colored) to selected 1.55 (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.72 / (download) - annotate - [select for diffs], Fri Dec 2 10:30:12 2011 UTC (12 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.71: +2 -1 lines
Diff to previous 1.71 (colored) to selected 1.55 (colored)
initialize device reference counter, unbreaks -aoff with MALLOC_OPTIONS=J
Revision 1.71 / (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.70: +477 -11 lines
Diff to previous 1.70 (colored) to selected 1.55 (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.70 / (download) - annotate - [select for diffs], Wed Nov 16 21:26:55 2011 UTC (12 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.69: +2 -3 lines
Diff to previous 1.69 (colored) to selected 1.55 (colored)
mark the device as closed before closing streams attached to it. otherwise a stream may try to close the device a second time.
Revision 1.69 / (download) - annotate - [select for diffs], Wed Nov 16 21:22:17 2011 UTC (12 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.68: +43 -22 lines
Diff to previous 1.68 (colored) to selected 1.55 (colored)
prefix device-specific messages by the device name, since we support multiple devices
Revision 1.68 / (download) - annotate - [select for diffs], Tue Nov 15 08:05:22 2011 UTC (12 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.67: +38 -30 lines
Diff to previous 1.67 (colored) to selected 1.55 (colored)
Add a "device number" component in sndio(7) device names, allowing a single aucat instance to handle all audio and MIDI services. Since this partially breaks compatibility, this is a opportunitiy to fix few other design mistakes (eg ':' being used by inet6, type name vs api name confusion, etc..). This leads to the following names: type[@hostname][,unit]/devnum[.option] The device number is the minor device number for direct hardware access (ie the 'N' in /dev/audioN). For aucat, this is the occurence number of the -f (or -M) option. There's a compatibility hook to keep old names working if only one aucat server is running.
Revision 1.67 / (download) - annotate - [select for diffs], Wed Oct 12 07:20:04 2011 UTC (12 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.66: +107 -81 lines
Diff to previous 1.66 (colored) to selected 1.55 (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.66 / (download) - annotate - [select for diffs], Mon Jun 20 20:18:44 2011 UTC (12 years, 11 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE,
OPENBSD_5_0
Changes since 1.65: +71 -32 lines
Diff to previous 1.65 (colored) to selected 1.55 (colored)
Make -aoff option apply to MIDI ports (-q) as well, ensuring the device stays closed also if -q is used. As we're at it, add -a to midicat so it behaves like aucat.
Revision 1.65 / (download) - annotate - [select for diffs], Thu May 26 07:18:40 2011 UTC (13 years ago) by ratchov
Branch: MAIN
Changes since 1.64: +4 -3 lines
Diff to previous 1.64 (colored) to selected 1.55 (colored)
add a new -w flag to control whether master volume is automatically adjusted when new streams are connected and disconnected. Disabling automatic volume adjustment makes sense if all streams are recorded with properly lowered volumes.
Revision 1.64 / (download) - annotate - [select for diffs], Thu Oct 21 18:57:42 2010 UTC (13 years, 7 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE,
OPENBSD_4_9
Changes since 1.63: +8 -5 lines
Diff to previous 1.63 (colored) to selected 1.55 (colored)
use MODE_xxx and XRUN_xxx macros everywhere, and zap corresponding AMSG_xxx macros, which in turns simplifies the code
Revision 1.63 / (download) - annotate - [select for diffs], Sat Jul 31 08:46:56 2010 UTC (13 years, 10 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE,
OPENBSD_4_8
Changes since 1.62: +1 -2 lines
Diff to previous 1.62 (colored) to selected 1.55 (colored)
remove forgotten debug message
Revision 1.62 / (download) - annotate - [select for diffs], Tue Jul 6 01:12:45 2010 UTC (13 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.61: +11 -6 lines
Diff to previous 1.61 (colored) to selected 1.55 (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.61 / (download) - annotate - [select for diffs], Tue Jun 29 06:57:00 2010 UTC (13 years, 11 months ago) by jakemsr
Branch: MAIN
Changes since 1.60: +4 -1 lines
Diff to previous 1.60 (colored) to selected 1.55 (colored)
explicitely initialize members of struct dev in dev_open() fixes crash found by nicm ok ratchov
Revision 1.60 / (download) - annotate - [select for diffs], Fri Jun 25 07:32:05 2010 UTC (13 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.59: +12 -3 lines
Diff to previous 1.59 (colored) to selected 1.55 (colored)
don't attempt to drain devices after they are destroyed, which results in a use after free(). Catched by jakemsr@ with MALLOC_OPTIONS=J
Revision 1.59 / (download) - annotate - [select for diffs], Sat Jun 5 16:14:44 2010 UTC (14 years ago) by ratchov
Branch: MAIN
Changes since 1.58: +15 -4 lines
Diff to previous 1.58 (colored) to selected 1.55 (colored)
in dev_close(), first terminate streams recording from the hardware, then terminate streams recording from the monitor (if any). Otherwise, dev_close() would try to check if a stream is recording from the hardware or the monitor, and, if there's no monitor, would dereference a NULL pointer.
Revision 1.58 / (download) - annotate - [select for diffs], Sat Jun 5 16:00:52 2010 UTC (14 years ago) by ratchov
Branch: MAIN
Changes since 1.57: +4 -39 lines
Diff to previous 1.57 (colored) to selected 1.55 (colored)
don't prime server buffers, because it's ugly and conceptually complicated. Instead, request clients to provide enough samples and start with buffers full.
Revision 1.57 / (download) - annotate - [select for diffs], Fri Jun 4 06:15:28 2010 UTC (14 years ago) by ratchov
Branch: MAIN
Changes since 1.56: +403 -369 lines
Diff to previous 1.56 (colored) to selected 1.55 (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.56 / (download) - annotate - [select for diffs], Sat May 8 15:35:45 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.55: +10 -7 lines
Diff to previous 1.55 (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.55 / (download) - annotate - [selected], Sat May 8 13:08:24 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)
Fix sign in dev_getpos(). Indeed, positive device playback latency is accounted as negative start position offset.
Revision 1.54 / (download) - annotate - [select for diffs], Sat May 8 12:29:08 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.53: +4 -8 lines
Diff to previous 1.53 (colored) to selected 1.55 (colored)
don't take into account recording latency in dev_getpos(), since dev_sync() always discards any recorded samples
Revision 1.53 / (download) - annotate - [select for diffs], Fri May 7 07:13:21 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.52: +31 -59 lines
Diff to previous 1.52 (colored) to selected 1.55 (colored)
Since aucat uses libsndio, play and rec clocks are the same, so use play and rec latencies counters to calculate the offset between play and rec direction. Greatly simplifies stream attaching code.
Revision 1.52 / (download) - annotate - [select for diffs], Tue May 4 19:35:20 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.51: +9 -5 lines
Diff to previous 1.51 (colored) to selected 1.55 (colored)
if the ``device'' is in loopback mode (ie no audio device), then disable overruns/underruns since aucat must pause when an input or an output blocks. This is a theoretical fix, since the start/stop code is never reached in loopback mode
Revision 1.51 / (download) - annotate - [select for diffs], Sun May 2 11:54:26 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.50: +434 -197 lines
Diff to previous 1.50 (colored) to selected 1.55 (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.50 / (download) - annotate - [select for diffs], Sun May 2 11:12:31 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.49: +31 -8 lines
Diff to previous 1.49 (colored) to selected 1.55 (colored)
Don't systematically fill with silence the mixer output. This might result in extra samples being written to the device when the mixer is closed.
Revision 1.49 / (download) - annotate - [select for diffs], Sat Apr 24 06:18:23 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.48: +20 -20 lines
Diff to previous 1.48 (colored) to selected 1.55 (colored)
rename ibuflist/obuflist -> ins/outs to cut long lines from Thomas Pfaff, thanks
Revision 1.48 / (download) - annotate - [select for diffs], Wed Apr 21 06:13:07 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.47: +50 -4 lines
Diff to previous 1.47 (colored) to selected 1.55 (colored)
adds the necessary bits to join channels (ex stereo->mono) or expand channels (ex mono->stereo). It's switched on/off with the ``-j'' option, (default is "on").
Revision 1.47 / (download) - annotate - [select for diffs], Sat Apr 17 09:16:57 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.46: +1 -25 lines
Diff to previous 1.46 (colored) to selected 1.55 (colored)
Allow the mixer to handle inputs with channel ranges outside the device channel range. This makes the channel mapping code no longer usefuli, so remove it. No behaviour change.
Revision 1.46 / (download) - annotate - [select for diffs], Tue Apr 6 20:07:01 2010 UTC (14 years, 2 months ago) by ratchov
Branch: MAIN
Changes since 1.45: +243 -123 lines
Diff to previous 1.45 (colored) to selected 1.55 (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.45 / (download) - annotate - [select for diffs], Sat Apr 3 17:59:17 2010 UTC (14 years, 2 months ago) by ratchov
Branch: MAIN
Changes since 1.44: +122 -242 lines
Diff to previous 1.44 (colored) to selected 1.55 (colored)
backout last change, committed by mistake, sorry...
Revision 1.44 / (download) - annotate - [select for diffs], Sat Apr 3 17:40:33 2010 UTC (14 years, 2 months ago) by ratchov
Branch: MAIN
Changes since 1.43: +243 -123 lines
Diff to previous 1.43 (colored) to selected 1.55 (colored)
doc fixes from jmc
Revision 1.43 / (download) - annotate - [select for diffs], Sat Jan 16 23:18:31 2010 UTC (14 years, 4 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE,
OPENBSD_4_7
Changes since 1.42: +3 -1 lines
Diff to previous 1.42 (colored) to selected 1.55 (colored)
when closing the device, delete its MIDI end, if it has no writers.
Revision 1.42 / (download) - annotate - [select for diffs], Wed Jan 13 10:02:52 2010 UTC (14 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored) to selected 1.55 (colored)
Rename s/safile/siofile/g, missed when libsa was renamed to libsndio. Fixes crashes in full-duplex mode on vax and hp300.
Revision 1.41 / (download) - annotate - [select for diffs], Tue Jan 12 21:39:39 2010 UTC (14 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.40: +5 -3 lines
Diff to previous 1.40 (colored) to selected 1.55 (colored)
When attaching a new stream, if the "extra" latency is zero, then don't trigger a zero-length clock tick. Fixes duplicate start ticks seen by full-duplex clients.
Revision 1.40 / (download) - annotate - [select for diffs], Mon Jan 11 13:06:32 2010 UTC (14 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.39: +21 -3 lines
Diff to previous 1.39 (colored) to selected 1.55 (colored)
When resuming from suspend, prime play buffers with silence, otherwise the client would underrun by more than its own buffer size, which currently is not allowed (causes the client to deadlock). Set the minimum client buffer size to two blocks. Single block buffers don't work properly yet. with help from jakemsr
Revision 1.39 / (download) - annotate - [select for diffs], Sun Jan 10 21:47:41 2010 UTC (14 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.38: +89 -1 lines
Diff to previous 1.38 (colored) to selected 1.55 (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.38 / (download) - annotate - [select for diffs], Tue Jan 5 10:18:12 2010 UTC (14 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.37: +31 -3 lines
Diff to previous 1.37 (colored) to selected 1.55 (colored)
Make the way .wav files are handled closer to the way sockets are handled, which is conceptually simpler. No behaviour changes.
Revision 1.37 / (download) - annotate - [select for diffs], Sun Nov 8 00:08:41 2009 UTC (14 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.36: +14 -10 lines
Diff to previous 1.36 (colored) to selected 1.55 (colored)
use the same algorithm to attach play-only, record-only and full-duplex streams. Fixes, streams with different modes not starting simultaneously.
Revision 1.36 / (download) - annotate - [select for diffs], Tue Nov 3 21:31:37 2009 UTC (14 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.35: +72 -34 lines
Diff to previous 1.35 (colored) to selected 1.55 (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.35 / (download) - annotate - [select for diffs], Tue Oct 27 22:24:27 2009 UTC (14 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.34: +3 -2 lines
Diff to previous 1.34 (colored) to selected 1.55 (colored)
set the THRU_AUTOQUIT flag only for ``thru'' devices
Revision 1.34 / (download) - annotate - [select for diffs], Sat Oct 10 12:43:09 2009 UTC (14 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.33: +16 -34 lines
Diff to previous 1.33 (colored) to selected 1.55 (colored)
make dev_done() common to audio and MIDI, and drop dev_thrudone()
Revision 1.33 / (download) - annotate - [select for diffs], Sat Oct 10 11:58:41 2009 UTC (14 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.32: +1 -27 lines
Diff to previous 1.32 (colored) to selected 1.55 (colored)
use dev_done() for loopback devices too and remove dev_loopdone()
Revision 1.32 / (download) - annotate - [select for diffs], Sat Oct 10 09:54:06 2009 UTC (14 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.31: +53 -44 lines
Diff to previous 1.31 (colored) to selected 1.55 (colored)
We don't need independent file reader and writer anymore. So, destroy reader when writer terminates and destroy writer when reader terminates. This simplifies a lot the way we drain audio devices and will help simplifying other parts.
Revision 1.31 / (download) - annotate - [select for diffs], Fri Oct 9 16:49:48 2009 UTC (14 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.30: +5 -5 lines
Diff to previous 1.30 (colored) to selected 1.55 (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.30 / (download) - annotate - [select for diffs], Sun Sep 27 11:51:20 2009 UTC (14 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.29: +6 -41 lines
Diff to previous 1.29 (colored) to selected 1.55 (colored)
remove all debug traces
Revision 1.29 / (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.28: +7 -1 lines
Diff to previous 1.28 (colored) to selected 1.55 (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.28 / (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.27: +56 -1 lines
Diff to previous 1.27 (colored) to selected 1.55 (colored)
organize midi code like audio code, no functional change
Revision 1.27 / (download) - annotate - [select for diffs], Sat Jul 25 10:52:18 2009 UTC (14 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.26: +47 -46 lines
Diff to previous 1.26 (colored) to selected 1.55 (colored)
fix comments, remove no longer needed declaration, reorder includes from Thomas Pfaff
Revision 1.26 / (download) - annotate - [select for diffs], Fri Feb 6 08:26:34 2009 UTC (15 years, 4 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE,
OPENBSD_4_6,
OPENBSD_4_5_BASE,
OPENBSD_4_5
Changes since 1.25: +4 -3 lines
Diff to previous 1.25 (colored) to selected 1.55 (colored)
move error messages reported to user into main()
Revision 1.25 / (download) - annotate - [select for diffs], Fri Jan 23 17:38:15 2009 UTC (15 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.24: +12 -12 lines
Diff to previous 1.24 (colored) to selected 1.55 (colored)
spacing + typo fix from Matt Jibson <matt.jibson(at)gmail.com>
Revision 1.24 / (download) - annotate - [select for diffs], Sat Jan 10 20:02:28 2009 UTC (15 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.23: +67 -1 lines
Diff to previous 1.23 (colored) to selected 1.55 (colored)
add "loopback" mode in which input is connected to the output. This is useful to mix, demultiplex, resample or reencode audio files off-line. tweak + ok jakemsr
Revision 1.23 / (download) - annotate - [select for diffs], Tue Jan 6 19:27:22 2009 UTC (15 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.22: +26 -22 lines
Diff to previous 1.22 (colored) to selected 1.55 (colored)
don't use a reference to the device file. Use the corresponding aproc structure instread.
Revision 1.22 / (download) - annotate - [select for diffs], Mon Dec 29 17:59:08 2008 UTC (15 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.21: +36 -7 lines
Diff to previous 1.21 (colored) to selected 1.55 (colored)
make the code "more correct": add reference counters to aproc structures so we can keep a pointer to the device. Beside some simplifications, this allows to easily handle the situation where the audio device desappears. No change in the behaviour.
Revision 1.21 / (download) - annotate - [select for diffs], Tue Dec 16 22:11:12 2008 UTC (15 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.20: +5 -2 lines
Diff to previous 1.20 (colored) to selected 1.55 (colored)
when searching for an endpoint, return the correct abuf pointers. Fixes the volume knob not working when the input chain has more than two aprocs
Revision 1.20 / (download) - annotate - [select for diffs], Sun Dec 7 17:10:41 2008 UTC (15 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.19: +26 -86 lines
Diff to previous 1.19 (colored) to selected 1.55 (colored)
When resampling, don't require the sample frequency to be an integer. This removes the arithmetic constraint between the sample frequency and the block size and all the associated code. Now aucat can work in server mode with any block size. ok jakemsr
Revision 1.19 / (download) - annotate - [select for diffs], Sun Nov 16 17:08:32 2008 UTC (15 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.18: +5 -1 lines
Diff to previous 1.18 (colored) to selected 1.55 (colored)
make aucat compile without DEBUG defined (still defined by default)
Revision 1.18 / (download) - annotate - [select for diffs], Sun Nov 16 16:30:22 2008 UTC (15 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.17: +4 -2 lines
Diff to previous 1.17 (colored) to selected 1.55 (colored)
Make clients inherit the volume parameter when the -v option is used in server mode. It gives the maximum volume a client may have. This wastes dynamic range, but allows volume to stay constant when other clients connect or disconnect.
Revision 1.17 / (download) - annotate - [select for diffs], Wed Nov 12 19:36:39 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.16: +3 -5 lines
Diff to previous 1.16 (colored) to selected 1.55 (colored)
when destroying the device, mark the mixer and the demultiplexer for ``AUTOQUIT'' first, and then call file_eof() and friends. fixes crashes sthen@ noticed on zaurus
Revision 1.16 / (download) - annotate - [select for diffs], Tue Nov 11 19:21:20 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.15: +5 -3 lines
Diff to previous 1.15 (colored) to selected 1.55 (colored)
expose the volume knob in server mode too
Revision 1.15 / (download) - annotate - [select for diffs], Tue Nov 11 12:56:02 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored) to selected 1.55 (colored)
when not in server mode, aucat terminates automatically using the {MIX,SUB}_AUTAQUIT features. In this case we're not allowed to directly touch dev_mix and dev_sub because they can disappar. So disable the ``suspend'' and ``quit'' bits when {MIX,SUB}_AUTAQUIT are used.
Revision 1.14 / (download) - annotate - [select for diffs], Mon Nov 10 23:25:37 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.13: +50 -19 lines
Diff to previous 1.13 (colored) to selected 1.55 (colored)
add a per-stream ``soft volume'' knob and the corresponding -v option. The code will be useful later for the volume knob in the sndio API.
Revision 1.13 / (download) - annotate - [select for diffs], Sun Nov 9 16:26:07 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.12: +36 -1 lines
Diff to previous 1.12 (colored) to selected 1.55 (colored)
make aucat(1) stop automatically the audio(1) device if it's idle. This way, when in server mode, it consumes no CPU if there are no clients. Later, this will allow to start aucat(1) at session or system startup.
Revision 1.12 / (download) - annotate - [select for diffs], Sat Nov 8 10:01:43 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.11: +4 -2 lines
Diff to previous 1.11 (colored) to selected 1.55 (colored)
when dev_attach()ing play-only or record-only streams, don't use both play and record parameters (one of them might be NULL, causing aucat to segfault).
Revision 1.11 / (download) - annotate - [select for diffs], Fri Nov 7 21:01:15 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.10: +21 -6 lines
Diff to previous 1.10 (colored) to selected 1.55 (colored)
expose the block size in the sndio API by making par->round writable and thus remove the ugly rate <-> block-size table from sio_setpar(3). Handle the block size negociation in aucat(1), since it has few constrains the code is overally simpler. ok jakemsr@, major crank suggested by deraadt@
Revision 1.10 / (download) - annotate - [select for diffs], Fri Nov 7 00:21:02 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.9: +38 -37 lines
Diff to previous 1.9 (colored) to selected 1.55 (colored)
when attaching a new stream, don't overwrite it's parameters with the emulated ones (otherwise the next time it's attached conversions will not be setup).
Revision 1.9 / (download) - annotate - [select for diffs], Tue Nov 4 22:18:12 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.8: +25 -35 lines
Diff to previous 1.8 (colored) to selected 1.55 (colored)
split code that converts any->any in two parts: one to encode native->any and one to decode any->native. It is simpler and faster this way.
Revision 1.8 / (download) - annotate - [select for diffs], Tue Nov 4 18:24:06 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.7: +5 -7 lines
Diff to previous 1.7 (colored) to selected 1.55 (colored)
cleanup: remove channel mapping bits from encoding conversion code. As a side effect, reduce CPU usage by ~10% on envy(4) devices.
Revision 1.7 / (download) - annotate - [select for diffs], Tue Nov 4 17:51:46 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.6: +37 -6 lines
Diff to previous 1.6 (colored) to selected 1.55 (colored)
add "new" conversion code to map any channel range into any other channel range (based on the encoding conversion code). Will allow to unentangle channel mapping from encoding conversion. As a side effect, greatly reduces CPU usage for channel mapping. No functionnal change.
Revision 1.6 / (download) - annotate - [select for diffs], Tue Nov 4 15:22:40 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.5: +5 -3 lines
Diff to previous 1.5 (colored) to selected 1.55 (colored)
cleanup: resample stream while in native format and remove resampling bits from the encoding conversion code. As a side effect this reduces CPU usage by 30% on envy(4).
Revision 1.5 / (download) - annotate - [select for diffs], Tue Nov 4 14:16:09 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.4: +15 -13 lines
Diff to previous 1.4 (colored) to selected 1.55 (colored)
optimization: add "new" resampling code (actually based on the existing conversion bits) and use it when resampling only is required (ie for clients using s16 encoding), this is the most common case. Reduces CPU usage by ~50%. No functional change.
Revision 1.4 / (download) - annotate - [select for diffs], Mon Nov 3 22:25:13 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.3: +15 -11 lines
Diff to previous 1.3 (colored) to selected 1.55 (colored)
A small optimization: handle most N-channel <-> M-channel conversions inside the mixer and the demultiplexer. This way, aucat will not trigger the heavy conversion code when only channel conversions are required. Cuts ~50% of the CPU usage on envy(4) devices, can improve surround 4.0, 5.1 and 7.1 capable devices. No functionnal change.
Revision 1.3 / (download) - annotate - [select for diffs], Sun Oct 26 08:49:43 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.2: +208 -261 lines
Diff to previous 1.2 (colored) to selected 1.55 (colored)
add minimal server capability to aucat(1). When started in server mode, it listens on an unix socket and mixes/demultiplexes any number of full-duplex streams, doing necessary format conversions and resampling on the fly. programs can use the new libsa(3) library to play and record audio. The library provides a very simple API to connect to the audio server; if aucat(1) isn't running, it uses the audio(4) driver transparently instead.
Revision 1.2 / (download) - annotate - [select for diffs], Thu Aug 14 15:25:16 2008 UTC (15 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.1: +1 -2 lines
Diff to previous 1.1 (colored) to selected 1.55 (colored)
fix comments suggested by eric@, remove stupid DPRINTF()
Revision 1.1 / (download) - annotate - [select for diffs], Thu Aug 14 09:58:55 2008 UTC (15 years, 9 months ago) by ratchov
Branch: MAIN
Diff to selected 1.55 (colored)
move all device related stuff from aucat.c to a new dev.c file. The new dev_xxx() routines expose a "high level" self-contained interface to the device. At initialization, the device is opened and two chains of aproc structures are created: * a playback chain that exposes a (initially) empty mix aproc to which the rest of the code can attach new streams to be played * record chain that exposes a (initially) empty sub aproc to which the rest of the code can attach new stream to to record The rest of the code, has just to use dev_attach() routine to attach streams. While we're at it, add a ``devops'' structure containing pointers to the device-specific routines. This will allow later to add support for other type of device than the Sun API. Also, write the .wav headers in file_del(), so put all header related data in the file strucuture. This allows to close() the file, as soon as wpipe_xxx() aproc terminates. This will be useful for the server, because it will need to close() descripts of closed connections immediately. add mix_pushzero() routine to fill the mixer with silence. It will be used to avoid the mixer to underrun when there are no input streams. Since we always have at least one input stream there's no behaviour change. ok jakemsr