History log of /src/usr.bin/audio/play/play.c |
Revision | | Date | Author | Comments |
1.64 |
| 04-Mar-2024 |
mrg | audioplay: add -n flag that doesn't write audio data.
this will be used in an upcoming testsuite for the wav parser.
|
1.63 |
| 15-Apr-2023 |
mlelstv | Revert accidentially committed part. The 'latency' report isn't ready to be useful.
|
1.62 |
| 15-Apr-2023 |
mlelstv | Add support for recording 24bit wav files.
|
1.61 |
| 15-May-2022 |
mrg | branches: 1.61.2; fix verbose log for 64 bit float
|
1.60 |
| 11-Nov-2019 |
joerg | Spell the largest 32bit signed value as INT32_MAX. Explicitly cast to float, because it is not precisely representable.
|
1.59 |
| 09-Nov-2019 |
mrg | copyright maint.
|
1.58 |
| 09-Nov-2019 |
mrg | add support for playing IEEE float32 and float64 RIFF WAVE samples on platforms that have these types natively, and can handle signed linear 32 bit samples. explicitly disabled on vax, run-or-compile-time sizeof() check disabled for everyone else
now i can play a float32 .wav file i found. float64 not tested.
copyright maint, update HISTORY, update audio drivers list.
|
1.57 |
| 04-May-2019 |
isaki | branches: 1.57.2; Use err(3)/errx(3) properly to avoid "write failed: Undefined error: 0".
|
1.56 |
| 16-Nov-2018 |
mlelstv | The test for regular file was wrong.
From yarl on freenode, thanks!
|
1.55 |
| 05-Aug-2015 |
mrg | branches: 1.55.8; 1.55.14; 1.55.16; rename struct write_info as struct track_info, and the variable name 'wi' as 'ti', as this info is useful for reading as well.
|
1.54 |
| 28-Aug-2011 |
joerg | ANSIfy. Add static. Add __dead.
|
1.53 |
| 29-Dec-2010 |
wiz | Sort usage.
|
1.52 |
| 29-Dec-2010 |
jmcneill | allow for buffer sizes < 32k
|
1.51 |
| 29-Dec-2010 |
mrg | add a new "-B buffersize" flag to both audioplay and audiorecord. suggested by jmcneill@.
sort audioplay manual some.
|
1.50 |
| 11-Apr-2009 |
lukem | fix -Wsign-compare and other WARNS=4 issues
|
1.49 |
| 29-May-2008 |
mrg | branches: 1.49.6; remove clause #3 from my license where there are no other copyright holders involved.
|
1.48 |
| 15-Dec-2007 |
perry | branches: 1.48.4; 1.48.6; convert __attribute__s to applicable cdefs.h macros
|
1.47 |
| 05-Oct-2007 |
lukem | Convert to raise_default_signal(3).
|
1.46 |
| 23-May-2006 |
christos | branches: 1.46.10; Coverity CID 3187: Fix memory leak
|
1.45 |
| 13-Jul-2005 |
mrg | branches: 1.45.2; play.c: allow empty files to exit gracefully rather than with an error of "header seems really large". reported by wiz.
record.c: don't use total_size in the header if is -1 (it's initial value)
|
1.44 |
| 02-Jun-2005 |
lukem | appease gcc -Wuninitialized
|
1.43 |
| 09-Jul-2004 |
wiz | branches: 1.43.2; There is no -m option -- remove it from the usage. From Kouichirou Hiratsuka in PR 26192.
|
1.42 |
| 23-Jun-2003 |
agc | branches: 1.42.4; Add NetBSD RCS Ids.
|
1.41 |
| 08-Dec-2002 |
mrg | fix an error message
|
1.40 |
| 04-Nov-2002 |
mrg | fix PR#18909, but not quite exactly the same as the patch provided. also, check if the filesize causes a size_t overflow and if so, use the fallback read/write loop method.
|
1.39 |
| 03-Nov-2002 |
wiz | Move close so that last ioctl is before close call. Fix duplicate word in comment. Based on patch from Christian Biere in PR 18902, with a style nit fixed.
|
1.38 |
| 01-Oct-2002 |
mrg | print the file name in verbose mode as well. avoid printing (null) for encoding.
|
1.37 |
| 20-Jul-2002 |
grant | sweep of errx/warnx, remove unnecessary trailing \n
|
1.36 |
| 10-Feb-2002 |
mrg | define: datasize == 0 means use the whole file. fixes part of PR#12809.
|
1.35 |
| 05-Feb-2002 |
augustss | Test for default device in a portable way. Thanks to Michael Ericsson for spotting the problem.
|
1.34 |
| 02-Feb-2002 |
jdolecek | Retire -C, do all the ioctls on same audio device we do i/o
|
1.33 |
| 31-Jan-2002 |
augustss | Actually be verbose if the -V flag is given.
|
1.32 |
| 31-Jan-2002 |
augustss | Use _PATH_SOUND etc, all fall back to _PATH_SOUND0 (etc.) if that fails.
|
1.31 |
| 15-Jan-2002 |
mrg | KNF.
|
1.30 |
| 15-Jan-2002 |
mrg | flush the audio buffer on signals; from Ben Wong <hackerb9@u.washington.edu> in PR#9134
|
1.29 |
| 15-Jan-2002 |
mrg | - add rudimentary "wav" recording support: don't think it copes with big-endian systems properly yet -- need to add RIFX support or swap samples while writing. more on this coming soon.
- new "-F <format>" option for audiorecord. supported values of <format> are "sun", "wav" and "none", plus a few aliases.
- split sun & wav support out into their own files.
- don't assume that WAV header elements are properly aligned for the type of data they hold.
XXX: still need to clean up libaudio interfaces a lot.
|
1.28 |
| 13-Jan-2002 |
ross | fix regression, err() -> errx()
|
1.27 |
| 13-Jan-2002 |
ross | Rototill play_fd() to fix some original problems and some added later. Also, fix up for and enable WARNS=2. This fixes problems playing from pipes or standard input, and playing from funny filesystems or other cases that can't be mmap(2)ed.
|
1.26 |
| 02-May-2001 |
minoura | X68k built-in voice synthesizer supports 4bit ADPCM.
|
1.25 |
| 28-Mar-2001 |
simonb | Fix white space and formatting nits.
|
1.24 |
| 08-Mar-2001 |
ross | lp64/printf
|
1.23 |
| 04-Mar-2001 |
hubertf | Don't play trailing garbage at end of RIFF WAVE (.wav) files Patch sent by YAMAMOTO Takashi <takashi.yamamoto@bigfoot.com> in PR 12328
|
1.22 |
| 19-Feb-2001 |
cgd | convert to use getprogname()
|
1.21 |
| 05-Feb-2001 |
christos | fix nested extern
|
1.20 |
| 19-Jan-2001 |
mrg | - move the mmap playing code into new play() function - be more (properly) quiet with `-q'
|
1.19 |
| 22-Dec-2000 |
mrg | de-__P()-ify
|
1.18 |
| 13-Dec-2000 |
mrg | libaudio: - rename audio_get_sun_encoding() to audio_sun_to_encoding() - add audio_encoding_to_sun() play.c: - adapt record.c: - convert NetBSD encoding to sun encoding if possible, otherwise don't output a header at all. fixes PR#10380 from Michael Eriksson <eramore@era-t.ericsson.se>.
|
1.17 |
| 27-Feb-2000 |
mrg | branches: 1.17.4; honour -q (quiet) flag a bit more.
|
1.16 |
| 08-Nov-1999 |
kleink | When we have to print usage instructions, don't indicate success in the exit status.
|
1.15 |
| 06-Nov-1999 |
kleink | * Don't treat failure to open a file as fatal error; print a warning to standard error, arrange for a non-zero exit status and continue with the next file. Addresses PR bin/8748. * GCC vs. ANSI: a cast doesn't yield an lvalue. * Use MAP_FAILED.
|
1.14 |
| 23-Oct-1999 |
mrg | fix bug introduced in 1.12: only return a header length of 0 if we are using -f (force), not in the case when we know how long the header is. this stops from playing the audio header.
|
1.13 |
| 27-Sep-1999 |
mrg | honour -f, even if we appear to have a sun audio file. un-byte-screw the encoding for printing, too.
|
1.12 |
| 13-Sep-1999 |
tron | branches: 1.12.2; Fix broken "-f" and "-P" options. Patches supplied by Ben Wong in PR bin/8390.
|
1.11 |
| 13-Jul-1999 |
kleink | If not specified on the command line, attempt to fall back to the environment variables AUDIODEVICE (for -d) and AUDIOCTLDEVICE (for -C, already used in audioctl(1)) before falling back to _PATH_* constants.
|
1.10 |
| 17-May-1999 |
jtk | fix defect where specifying channels would also specify the same string as the control device (missing 'break')
|
1.9 |
| 13-Apr-1999 |
mrg | try using normal read/write is mmap() fails. tell the VM system we are going to be doing sequential access via madvise().
|
1.8 |
| 02-Apr-1999 |
augustss | Fix various buglets.
|
1.7 |
| 30-Mar-1999 |
augustss | branches: 1.7.2; Insert an AUDIO_DRAIN at the end of each file.
|
1.6 |
| 28-Mar-1999 |
mrg | add -f (force) flag to audioplay, plus -s/-P/-c/-e switches for force setting sample rate, precision, channels and encoding. fix some man pages missing .El bits (via veego)
|
1.5 |
| 27-Mar-1999 |
mrg | expand usage message to reality.
|
1.4 |
| 27-Mar-1999 |
mrg | add support to play stdin.
|
1.3 |
| 26-Mar-1999 |
mrg | add missing copyrights.
|
1.2 |
| 26-Mar-1999 |
mrg | audio paths are in <paths.h>
|
1.1 |
| 26-Mar-1999 |
mrg | add audiorecord and audioplay tools. audioplay does .au and .wav files. audiorecord makes .au files only. uses parts of audioctl..
|
1.7.2.5 |
| 11-Nov-1999 |
he | Pull up revisions 1.15-1.16 via patch (requested by kleink): Do not treat failure to open a file as a fatal error, fixing PR#8748. Change two GNU C statements to valid ANSI C.
|
1.7.2.4 |
| 22-Oct-1999 |
he | Pull up revision 1.11 (requested by dmcmahill): If not specified on the command line, attempt to fall back to the environment variables AUDIODEVICE (for -d) and AUDIOCTLDEVICE (for -C) before falling back to _PATH_* constants.
|
1.7.2.3 |
| 27-Sep-1999 |
cgd | pull up rev 1.13 from trunk (requested by mrg): Honor the "-f" flag even if we appear to recognize a broken Sun audio file, and fix an error message on little-endian hosts.
|
1.7.2.2 |
| 01-Jul-1999 |
perry | pullup 1.9->1.10 (jtk)
|
1.7.2.1 |
| 13-Apr-1999 |
mrg | pullup 1.8
|
1.12.2.1 |
| 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.17.4.3 |
| 29-Jan-2002 |
he | Pull up revisions 1.18-1.21,1.25-1.31 (via patch, requested by mrg): Bring in several fixes and enhancements to these tools: o fix stdin audioplay o add WAV support to audiorecord o allows any host to output any endian sample o don't output a bogus header o fix a bug in audiorecord -t o many manual page fixes o exit immediately on signals
|
1.17.4.2 |
| 14-Mar-2001 |
he | Pull up revision 1.24 (via patch, requested by he): Fix LP64 format/type inconsistency.
|
1.17.4.1 |
| 11-Mar-2001 |
he | Pull up revision 1.23 (via patch, requested by hubertf): Do not play trailing garbage at the end of RIFF WAVE (.wav) files. Fixes PR#12328.
|
1.42.4.1 |
| 18-Jul-2005 |
riz | Pull up revision 1.45 (requested by mrg in ticket #5498): play.c: allow empty files to exit gracefully rather than with an error of "header seems really large". reported by wiz.
record.c: don't use total_size in the header if is -1 (it's initial valu e)
|
1.43.2.1 |
| 19-Jul-2005 |
riz | Pull up revision 1.45 (requested by mrg in ticket #597): play.c: allow empty files to exit gracefully rather than with an error of "header seems really large". reported by wiz. record.c: don't use total_size in the header if is -1 (it's initial value)
|
1.45.2.1 |
| 19-Jun-2006 |
chap | Sync with head.
|
1.46.10.2 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.46.10.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.48.6.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.48.4.1 |
| 04-Jun-2008 |
yamt | sync with head
|
1.49.6.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
|
1.55.16.2 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.55.16.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.55.14.1 |
| 26-Nov-2018 |
pgoyette | Sync with HEAD, resolve a couple of conflicts
|
1.55.8.1 |
| 12-Mar-2024 |
martin | Pull up the following revisions, requested by mrg in ticket #1948:
usr.bin/audio/common/auconv.h up to 1.6 usr.bin/audio/common/audio.c up to 1.27 usr.bin/audio/common/decode.c up to 1.2 usr.bin/audio/common/libaudio.h up to 1.22 usr.bin/audio/common/sun.c up to 1.11 usr.bin/audio/common/wav.c up to 1.22 usr.bin/audio/play/audioplay.1 up to 1.34 usr.bin/audio/play/play.c up to 1.64 usr.bin/audio/record/audiorecord.1 up to 1.45 usr.bin/audio/record/record.c up to 1.58
- support for playing 32-bit and 64-bit IEEE FP .wav files - support for recording 24 bit .wav files - read-overflow fixes for .wav files, and other fixes for the wav parser - audioplay gains -n flag (no play, like make -n) - audiorecord manual gained useful examples
|
1.57.2.1 |
| 12-Mar-2024 |
martin | Pull up the following revisions, requested by mrg in ticket #1818:
usr.bin/audio/common/auconv.h up to 1.6 usr.bin/audio/common/audio.c up to 1.27 usr.bin/audio/common/decode.c up to 1.2 usr.bin/audio/common/libaudio.h up to 1.22 usr.bin/audio/common/sun.c up to 1.11 usr.bin/audio/common/wav.c up to 1.22 usr.bin/audio/ctl/audioctl.1 up to 1.25 usr.bin/audio/play/audioplay.1 up to 1.34 usr.bin/audio/play/play.c up to 1.64 usr.bin/audio/record/audiorecord.1 up to 1.45 usr.bin/audio/record/record.c up to 1.58
- support for playing 32-bit and 64-bit IEEE FP .wav files - support for recording 24 bit .wav files - read-overflow fixes for .wav files, and other fixes for the wav parser - audioplay gains -n flag (no play, like make -n) - audioctl manual spruced up - audiorecord manual gained useful examples
|
1.61.2.1 |
| 12-Mar-2024 |
martin | Pull up the following revisions, requested by mrg in ticket #634:
usr.bin/audio/common/auconv.h up to 1.6 usr.bin/audio/common/audio.c up to 1.27 usr.bin/audio/common/decode.c up to 1.2 usr.bin/audio/common/libaudio.h up to 1.22 usr.bin/audio/common/sun.c up to 1.11 usr.bin/audio/common/wav.c up to 1.22 usr.bin/audio/play/audioplay.1 up to 1.34 usr.bin/audio/play/play.c up to 1.64 usr.bin/audio/record/audiorecord.1 up to 1.45 usr.bin/audio/record/record.c up to 1.58
- support for recording 24 bit .wav files - read-overflow fixes for .wav files, and other fixes for the wav parser - audioplay gains -n flag (no play, like make -n)
|