OpenBSD CVS

CVS log for src/usr.bin/aucat/Attic/wav.c


[BACK] Up to [local] / src / usr.bin / aucat

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.37, Wed Jan 21 08:43:55 2015 UTC (9 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.36: +0 -0 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.36 / (download) - annotate - [select for diffs], Sun Aug 10 10:25:04 2014 UTC (9 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.35: +1 -1 lines
Diff to previous 1.35 (colored)

initialize mmcpos, found by guenther

Revision 1.35 / (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.34: +30 -0 lines
Diff to previous 1.34 (colored)

add missing prototypes

Revision 1.34 / (download) - annotate - [select for diffs], Tue Nov 12 06:47:34 2013 UTC (10 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.33: +0 -1 lines
Diff to previous 1.33 (colored)

remove bogus legacy server-specific bits that cause confusion

Revision 1.33 / (download) - annotate - [select for diffs], Fri Nov 2 11:16:58 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.32: +0 -2 lines
Diff to previous 1.32 (colored)

Dont insert twice recorded wav files (-o) on the list of recorded files;
with help from Remco <remco at d-compu.dyndns.org>

Revision 1.32 / (download) - annotate - [select for diffs], Fri Nov 2 11:08:32 2012 UTC (11 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.31: +9 -7 lines
Diff to previous 1.31 (colored)

Initialize wav structure enough for wav_close() to work in the error
code path. Fixes crashes when wav_close() is called on uninitialized
wav structure. With help from Remco <remco at d-compu.dyndns.org>,
thanks!

Revision 1.31 / (download) - annotate - [select for diffs], Thu Apr 19 06:58:29 2012 UTC (12 years, 1 month ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.30: +2 -0 lines
Diff to previous 1.30 (colored)

unbreak compilation without DEBUG defined

Revision 1.30 / (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.29: +19 -18 lines
Diff to previous 1.29 (colored)

Use "unsigned int" rather than "unsigned". No object change.
suggested by deraadt@

Revision 1.29 / (download) - annotate - [select for diffs], Fri Dec 2 10:27:24 2011 UTC (12 years, 5 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.28: +1 -1 lines
Diff to previous 1.28 (colored)

don't add .wav header to .syx files

Revision 1.28 / (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.27: +12 -13 lines
Diff to previous 1.27 (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.27 / (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.26: +162 -90 lines
Diff to previous 1.26 (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.26 / (download) - annotate - [select for diffs], Fri Jun 3 10:05:27 2011 UTC (12 years, 11 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.25: +24 -2 lines
Diff to previous 1.25 (colored)

Reorganize the way command line options are parsed and stored.
No behaviour change.

Revision 1.25 / (download) - annotate - [select for diffs], Mon May 9 17:32:27 2011 UTC (13 years ago) by ratchov
Branch: MAIN
Changes since 1.24: +2 -0 lines
Diff to previous 1.24 (colored)

initialize 'pstate' field of the wav structure

Revision 1.24 / (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.23: +2 -2 lines
Diff to previous 1.23 (colored)

clean up cases of ;;

Revision 1.23 / (download) - annotate - [select for diffs], Fri Nov 5 15:23:18 2010 UTC (13 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.22: +5 -5 lines
Diff to previous 1.22 (colored)

Convert ulaw/alaw to native format (ie using ADATA_XXX defines) rather
than s16 (using hardcoded constants). Currently s16 is the native format,
so no behavior change.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Sep 18 08:36:00 2010 UTC (13 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.21: +2 -0 lines
Diff to previous 1.21 (colored)

add forgotten ``return NULL'' when a .wav file fails to get the
device with the required mode

Revision 1.21 / (download) - annotate - [select for diffs], Fri Jun 4 07:07:33 2010 UTC (13 years, 11 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.20: +16 -0 lines
Diff to previous 1.20 (colored)

when attaching files to play or record to the device, check that
the device supports play or record modes respectively.

spotted by jakemsr

Revision 1.20 / (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.19: +63 -32 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Sat May 8 15:35:45 2010 UTC (14 years ago) by ratchov
Branch: MAIN
Changes since 1.18: +1 -1 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Sun May 2 11:54:27 2010 UTC (14 years ago) by ratchov
Branch: MAIN
Changes since 1.17: +22 -2 lines
Diff to previous 1.17 (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.17 / (download) - annotate - [select for diffs], Sat Apr 24 06:18:23 2010 UTC (14 years ago) by ratchov
Branch: MAIN
Changes since 1.16: +9 -9 lines
Diff to previous 1.16 (colored)

rename ibuflist/obuflist -> ins/outs to cut long lines
from Thomas Pfaff, thanks

Revision 1.16 / (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.15: +7 -3 lines
Diff to previous 1.15 (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.15 / (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.14: +538 -204 lines
Diff to previous 1.14 (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.14 / (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.13: +204 -538 lines
Diff to previous 1.13 (colored)

backout last change, committed by mistake, sorry...

Revision 1.13 / (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.12: +538 -204 lines
Diff to previous 1.12 (colored)

doc fixes from jmc

Revision 1.12 / (download) - annotate - [select for diffs], Thu Jan 14 17:43:55 2010 UTC (14 years, 4 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.11: +16 -0 lines
Diff to previous 1.11 (colored)

Use -C option to specify recorded channel range instead of -c which
is for played channels.

spotted by Jan Stary <hans at stare.cz>, thanks

Revision 1.11 / (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.10: +15 -0 lines
Diff to previous 1.10 (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.10 / (download) - annotate - [select for diffs], Tue Jan 5 10:18:12 2010 UTC (14 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.9: +278 -10 lines
Diff to previous 1.9 (colored)

Make the way .wav files are handled closer to the way sockets are
handled, which is conceptually simpler. No behaviour changes.

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: +0 -9 lines
Diff to previous 1.8 (colored)

remove all debug traces

Revision 1.8 / (download) - annotate - [select for diffs], Sat Sep 19 21:21:36 2009 UTC (14 years, 8 months ago) by jakemsr
Branch: MAIN
Changes since 1.7: +2 -0 lines
Diff to previous 1.7 (colored)

if pipe_read() returns 0 we are at EOF and the structure describing
the pipe will be free()d, so don't try to access the structure.

ok ratchov

Revision 1.7 / (download) - annotate - [select for diffs], Sat Jul 25 10:52:19 2009 UTC (14 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.6: +19 -2 lines
Diff to previous 1.6 (colored)

fix comments, remove no longer needed declaration, reorder includes
from Thomas Pfaff

Revision 1.6 / (download) - annotate - [select for diffs], Wed Apr 22 10:57:33 2009 UTC (15 years, 1 month ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.5: +96 -3 lines
Diff to previous 1.5 (colored)

move support for ulaw/alaw encoding in .wav files from legacy mode
to normal mode.

ok jakemsr@

Revision 1.5 / (download) - annotate - [select for diffs], Sat Apr 11 10:24:21 2009 UTC (15 years, 1 month ago) by jakemsr
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)

- make legacy mode use sio_open(3) (sndio) API
- parse .au headers in legacy mode
- support playback of ulaw and alaw encoded .au and .wav files in
legacy mode

ok ratchov

Revision 1.4 / (download) - annotate - [select for diffs], Wed Feb 4 20:35:14 2009 UTC (15 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.3: +4 -0 lines
Diff to previous 1.3 (colored)

if there are too many connections, stop acceping new ones rather
than exit()ing with ``too many open files'' fatal error

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jan 23 17:38:15 2009 UTC (15 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

spacing + typo fix from Matt Jibson <matt.jibson(at)gmail.com>

Revision 1.2 / (download) - annotate - [select for diffs], Wed Nov 26 00:33:40 2008 UTC (15 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.1: +3 -0 lines
Diff to previous 1.1 (colored)

when recording .wav files overwrite user supplied parameters with
parameters .wav files format allows (u8, s16le, etc...); a converter
is automatically setup. Allows recording .wav files on BE machines
with default parameters.
idea and help from todd@

Revision 1.1 / (download) - annotate - [select for diffs], Sun Oct 26 08:49:44 2008 UTC (15 years, 6 months ago) by ratchov
Branch: MAIN

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.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.