Home | History | Annotate | only in /src/usr.bin/audio/common
History log of /src/usr.bin/audio/common
RevisionDateAuthorComments
 1.9 21-Jun-2015  mrg separate the 3 functions midirecord uses from libaudio.a into its own
file and link it directly, instead of having an (implicit) dependancy
on usr.bin/audio/common being built before usr.bin/midirecord is linked.
 1.8 03-May-2008  lukem Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)
 1.7 23-May-2004  lukem branches: 1.7.26;
Use MKPRIVATELIB=yes instead of providing an empty libinstall:: target and
setting NOLINT, NOPIC, NOPROFILE (etc)
 1.6 13-Oct-2002  mrg inline the contents of auconv.c into auconv.h. this makes audiorecord(1)
slightly smaller (about 200 bytes on x86) and i would guess slightly faster.
 1.5 18-Sep-2002  lukem makefile delint. use NETBSDSRCDIR as appropriate
 1.4 15-Jan-2002  mrg for sun output files, if we have unsigned or little endian data, convert
it to signed big endian data. pull in a modified copy of the kernels'
auconv.[ch] to help with this (and remove some home grown code that did
some of the same things.)
 1.3 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.2 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.1 26-Mar-1999  mrg branches: 1.1.10;
add audiorecord and audioplay tools. audioplay does .au and .wav files. audiorecord makes .au files only. uses parts of audioctl..
 1.1.10.1 29-Jan-2002  he Pull up revisions 1.3-1.4 (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.7.26.1 18-May-2008  yamt sync with head.
 1.2 13-Oct-2002  mrg inline the contents of auconv.c into auconv.h. this makes audiorecord(1)
slightly smaller (about 200 bytes on x86) and i would guess slightly faster.
 1.1 15-Jan-2002  mrg branches: 1.1.2;
for sun output files, if we have unsigned or little endian data, convert
it to signed big endian data. pull in a modified copy of the kernels'
auconv.[ch] to help with this (and remove some home grown code that did
some of the same things.)
 1.1.2.2 29-Jan-2002  he Pull up revision 1.1 (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.1.2.1 15-Jan-2002  he file auconv.c was added on branch netbsd-1-5 on 2002-01-29 23:09:33 +0000
 1.6 15-Apr-2023  mlelstv Add support for recording 24bit wav files.
 1.5 28-Apr-2008  martin branches: 1.5.54; 1.5.64; 1.5.72;
Remove clause 3 and 4 from TNF licenses
 1.4 24-Dec-2005  perry branches: 1.4.20;
__inline__ -> inline
 1.3 19-Jul-2004  mycroft Fix fencepost errors in the conversion functions (making them a bit more like
the kernel versions).
 1.2 13-Oct-2002  mrg branches: 1.2.2;
inline the contents of auconv.c into auconv.h. this makes audiorecord(1)
slightly smaller (about 200 bytes on x86) and i would guess slightly faster.
 1.1 15-Jan-2002  mrg branches: 1.1.2;
for sun output files, if we have unsigned or little endian data, convert
it to signed big endian data. pull in a modified copy of the kernels'
auconv.[ch] to help with this (and remove some home grown code that did
some of the same things.)
 1.1.2.2 29-Jan-2002  he Pull up revision 1.1 (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.1.2.1 15-Jan-2002  he file auconv.h was added on branch netbsd-1-5 on 2002-01-29 23:09:33 +0000
 1.2.2.1 23-Jul-2004  tron Pull up revision 1.3 (requested by mycroft in ticket #690):
Fix fencepost errors in the conversion functions (making them a bit more like
the kernel versions).
 1.4.20.1 18-May-2008  yamt sync with head.
 1.5.72.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)
 1.5.64.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.5.54.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.27 27-Feb-2024  gson Clean up lines containing only tabs.
 1.26 09-Nov-2019  mrg branches: 1.26.8;
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.25 05-Aug-2015  mrg branches: 1.25.8; 1.25.16; 1.25.18;
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.24 21-Jun-2015  mrg separate the 3 functions midirecord uses from libaudio.a into its own
file and link it directly, instead of having an (implicit) dependancy
on usr.bin/audio/common being built before usr.bin/midirecord is linked.
 1.23 30-Dec-2014  mrg add a decode_uint() function.
 1.22 30-Aug-2013  mrg branches: 1.22.4;
move most of the header writing code from record.c into wav.c and sun.c.

introduce a struct write_info for communication between front ends and
backends.

libaudio API is still pretty ugly, and needs to stay local here for now,
but it is a little more usable for other tools now.
 1.21 06-Sep-2011  jmcneill branches: 1.21.2; 1.21.8;
recognize AUDIO_ENCODING_AC3
 1.20 28-Aug-2011  joerg ANSIfy. Add static. Add __dead.
 1.19 29-May-2008  mrg remove clause #3 from my license where there are no other
copyright holders involved.
 1.18 30-Oct-2004  dsl branches: 1.18.26; 1.18.28;
Add (unsigned char) cast to ctype functions
 1.17 23-Jun-2003  agc Add NetBSD RCS Ids.
 1.16 27-Dec-2002  mrg - decode_int(): always use base 10, so that a time of "1:09" works.
- decode_time(): 60 seconds in a minute, really.
both from tsarna@netbsd.org.

- be verbose about the time we are going to record for, if verbose.
 1.15 15-Jan-2002  mrg - WARNS=3 (from ross@netbsd.org)
- fix a bug in WAV conversions
 1.14 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.13 01-Jan-2002  mrg fix 2001/03/04 change: audio_parse_wav_hdr() returns a signed value.
 1.12 07-Jun-2001  mrg fix bug in audiorecord -t handling.
 1.11 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.10 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.9 27-Sep-1999  mrg branches: 1.9.6;
fix off-by-one error in error message array. add a comment.
 1.8 13-Sep-1999  tron branches: 1.8.2;
Use "NULL" instead of "0" for null pointer.
 1.7 30-Mar-1999  mrg branches: 1.7.2;
remove duplicate include of <stdio.h>
 1.6 29-Mar-1999  mycroft Only 8-bit data is unsigned in WAVE files.
 1.5 29-Mar-1999  mrg .wav files are little endian.
 1.4 27-Mar-1999  mrg make recording precision/encoding setting sane.
 1.3 27-Mar-1999  mrg add support to play stdin.
 1.2 26-Mar-1999  mrg add missing copyrights.
 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.1 27-Sep-1999  cgd pull up rev 1.9 from trunk (requested by mrg):
Fix an off-by-one error in the error message array.
 1.8.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.6.2 29-Jan-2002  he Pull up revisions 1.10,1.12-1.15 (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.9.6.1 11-Mar-2001  he Pull up revision 1.11 (via patch, requested by hubertf):
Do not play trailing garbage at the end of RIFF WAVE (.wav) files.
Fixes PR#12328.
 1.18.28.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.18.26.1 04-Jun-2008  yamt sync with head
 1.21.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.22.4.1 12-Jan-2015  martin Pull up following revision(s) (requested by mrg in ticket #409):
usr.bin/audio/common/audio.c: revision 1.23
usr.bin/audio/common/libaudio.h: revision 1.19
add a decode_uint() function.
 1.25.18.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.25.16.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.25.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.26.8.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)
 1.2 27-Feb-2024  gson Clean up lines containing only tabs.
 1.1 21-Jun-2015  mrg branches: 1.1.8; 1.1.18; 1.1.26;
separate the 3 functions midirecord uses from libaudio.a into its own
file and link it directly, instead of having an (implicit) dependancy
on usr.bin/audio/common being built before usr.bin/midirecord is linked.
 1.1.26.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)
 1.1.18.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.1.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.22 08-Mar-2024  mrg audio_wav_parse_hdr(): avoid buffer overreads and clean up

reimplement most of this function using a new method of buffer
management to ensure that we never read beyond the provided size.

properly handle RIFF chunk lengths, instead of assuming various
offsets from most files are right.

update list of consumed documentation and fill the list of WAVE
formats from RFC 2361 (most remain not supported.)

should fix PR#57973.

tested against a large number of .wav files i have handy and with
a testsuite generator that should be incoming soon.
 1.21 09-Nov-2019  mrg branches: 1.21.8;
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.20 05-Aug-2015  mrg branches: 1.20.8; 1.20.16; 1.20.18;
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.19 30-Dec-2014  mrg add a decode_uint() function.
 1.18 30-Aug-2013  mrg branches: 1.18.4;
move most of the header writing code from record.c into wav.c and sun.c.

introduce a struct write_info for communication between front ends and
backends.

libaudio API is still pretty ugly, and needs to stay local here for now,
but it is a little more usable for other tools now.
 1.17 28-Aug-2011  joerg branches: 1.17.2; 1.17.8;
ANSIfy. Add static. Add __dead.
 1.16 18-Jun-2009  mrg - add extended WAVE header support
- attempt to play a bunch more WAV files
 1.15 29-May-2008  mrg branches: 1.15.4; 1.15.10;
remove clause #3 from my license where there are no other
copyright holders involved.
 1.14 11-May-2006  mrg branches: 1.14.20; 1.14.22;
variable signed/unsigned cleanup.
 1.13 01-Jul-2004  drochner put the __packed__ attribute close to the struct definition
(to appease gcc-3.4), and use the compiler-independant __packed
form for consistency
 1.12 21-Jan-2004  mrg apply the patch from PR#24127: make audio_wav_parse_hdr() take u_int *
parameters for encoding, precision, sample rate and channels.
 1.11 10-Feb-2002  mrg - add a AUDIO_FORMAT_DEFAULT. use it. don't change functionity.

- fix the function selection in sunau conversions.

- be more verbose when given -V. (hi lennart! :)
 1.10 15-Jan-2002  mrg - WARNS=3 (from ross@netbsd.org)
- fix a bug in WAV conversions
 1.9 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.8 01-Jan-2002  mrg fix 2001/03/04 change: audio_parse_wav_hdr() returns a signed value.
 1.7 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.6 22-Dec-2000  mrg de-__P()-ify
 1.5 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.4 18-Jun-2000  mrg branches: 1.4.2;
remove unused crap.
 1.3 27-Mar-1999  mrg branches: 1.3.8;
make recording precision/encoding setting sane.
 1.2 26-Mar-1999  mrg add missing copyrights.
 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.3.8.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.4.2.2 29-Jan-2002  he Pull up revisions 1.5-1.6,1.8-1.10 (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.4.2.1 11-Mar-2001  he Pull up revision 1.7 (via patch, requested by hubertf):
Do not play trailing garbage at the end of RIFF WAVE (.wav) files.
Fixes PR#12328.
 1.14.22.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.14.20.1 04-Jun-2008  yamt sync with head
 1.15.10.1 21-Apr-2010  matt sync to netbsd-5
 1.15.4.1 23-Jun-2009  snj Pull up following revision(s) (requested by mrg in ticket #825):
usr.bin/audio/common/libaudio.h: revision 1.16
usr.bin/audio/common/wav.c: revision 1.9
- - add extended WAVE header support
- - attempt to play a bunch more WAV files
 1.17.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.18.4.1 12-Jan-2015  martin Pull up following revision(s) (requested by mrg in ticket #409):
usr.bin/audio/common/audio.c: revision 1.23
usr.bin/audio/common/libaudio.h: revision 1.19
add a decode_uint() function.
 1.20.18.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.20.16.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.20.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.21.8.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)
 1.11 27-Feb-2024  gson Clean up lines containing only tabs.
 1.10 09-Nov-2019  mrg branches: 1.10.8;
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.9 05-Aug-2015  mrg branches: 1.9.8; 1.9.16; 1.9.18;
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.8 30-Aug-2013  mrg move most of the header writing code from record.c into wav.c and sun.c.

introduce a struct write_info for communication between front ends and
backends.

libaudio API is still pretty ugly, and needs to stay local here for now,
but it is a little more usable for other tools now.
 1.7 28-Aug-2011  joerg branches: 1.7.2; 1.7.8;
ANSIfy. Add static. Add __dead.
 1.6 29-May-2008  mrg remove clause #3 from my license where there are no other
copyright holders involved.
 1.5 22-Oct-2006  christos branches: 1.5.16; 1.5.18;
missing initializers.
 1.4 11-May-2006  mrg variable signed/unsigned cleanup.
 1.3 23-Jun-2003  agc Add NetBSD RCS Ids.
 1.2 15-Jan-2002  mrg branches: 1.2.2;
sun linear encodings are *signed*
 1.1 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.2.2.2 29-Jan-2002  he Pull up revisions 1.1-1.2 (new, 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.2.2.1 15-Jan-2002  he file sun.c was added on branch netbsd-1-5 on 2002-01-29 23:09:55 +0000
 1.5.18.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.5.16.1 04-Jun-2008  yamt sync with head
 1.7.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9.18.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.9.16.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.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.10.8.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)
 1.24 20-Mar-2024  mrg audio_wav_parse_hdr: handle zero-length data files again

the previous clean up turns zero-length data into no data and thus
an error, instead of simply doing nothing. noted by gson.
 1.23 14-Mar-2024  mrg fix some sizeof() confusion.

using "const char search[4]" as a function parameter means that
"search" is actually a pointer type so "sizeof search" returns
8 on 64-bit platforms. i mis-read this and used "sizeof *search"
which is always 1, noted by rillig.

instead of trying to avoid writing "4" twice, put it in a define
and use that in various places instead. annoying.
 1.22 12-Mar-2024  mrg audioplay(1): handle mis-aligned RIFF chunks.

put the code to find RIFF chunks into a new find_riff_chunk() function,
and handle mis-aligned chunk lengths. can now play files with chunks
that say they are 7 bytes long, and have 1 byte padding.

add some -V -V extra-verbose for the wav parser.
 1.21 11-Mar-2024  mrg minor clean up in the RIFF/WAVE header checking.

use memcmp() not strncmp() to check for "RIFF" and "WAVE".
avoid endian convesion on part.len 3 times.
 1.20 11-Mar-2024  mrg be sure to byte swap ext.len when checking/printing it.

noted by rillig@.
 1.19 08-Mar-2024  mrg audio_wav_parse_hdr(): avoid buffer overreads and clean up

reimplement most of this function using a new method of buffer
management to ensure that we never read beyond the provided size.

properly handle RIFF chunk lengths, instead of assuming various
offsets from most files are right.

update list of consumed documentation and fill the list of WAVE
formats from RFC 2361 (most remain not supported.)

should fix PR#57973.

tested against a large number of .wav files i have handy and with
a testsuite generator that should be incoming soon.
 1.18 27-Feb-2024  gson Clean up lines containing only tabs.
 1.17 27-Feb-2024  gson Clean up lines containing only spaces.
 1.16 15-Apr-2023  mlelstv Add support for recording 24bit wav files.
 1.15 09-Nov-2019  mrg branches: 1.15.8;
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.14 25-Nov-2017  jdolecek branches: 1.14.4; 1.14.6;
need getle16() for ext.sub_tag too

PR bin/52762 by Yosuke Sugahara
 1.13 05-Aug-2015  mrg branches: 1.13.8;
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.12 18-Oct-2013  christos fix unused variable warnings
 1.11 30-Aug-2013  mrg move most of the header writing code from record.c into wav.c and sun.c.

introduce a struct write_info for communication between front ends and
backends.

libaudio API is still pretty ugly, and needs to stay local here for now,
but it is a little more usable for other tools now.
 1.10 28-Aug-2011  joerg branches: 1.10.2; 1.10.8;
ANSIfy. Add static. Add __dead.
 1.9 18-Jun-2009  mrg - add extended WAVE header support
- attempt to play a bunch more WAV files
 1.8 29-May-2008  mrg branches: 1.8.4; 1.8.10;
remove clause #3 from my license where there are no other
copyright holders involved.
 1.7 21-Jan-2004  mrg branches: 1.7.32; 1.7.34;
apply the patch from PR#24127: make audio_wav_parse_hdr() take u_int *
parameters for encoding, precision, sample rate and channels.
 1.6 23-Jun-2003  agc Add NetBSD RCS Ids.
 1.5 06-Apr-2003  wiz Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.
 1.4 08-Dec-2002  mrg remove some #if 0 debug code
 1.3 25-Jan-2002  mrg branches: 1.3.2;
add $NetBSD$
 1.2 15-Jan-2002  mrg - WARNS=3 (from ross@netbsd.org)
- fix a bug in WAV conversions
 1.1 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.3.2.2 29-Jan-2002  he Pull up revisions 1.1-1.3 (new, 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.3.2.1 25-Jan-2002  he file wav.c was added on branch netbsd-1-5 on 2002-01-29 23:10:14 +0000
 1.7.34.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.7.32.1 04-Jun-2008  yamt sync with head
 1.8.10.1 21-Apr-2010  matt sync to netbsd-5
 1.8.4.1 23-Jun-2009  snj Pull up following revision(s) (requested by mrg in ticket #825):
usr.bin/audio/common/libaudio.h: revision 1.16
usr.bin/audio/common/wav.c: revision 1.9
- - add extended WAVE header support
- - attempt to play a bunch more WAV files
 1.10.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13.8.3 25-Mar-2024  martin Pull up following revision(s) (requested by mrg in ticket #1950):

usr.bin/audio/common/wav.c: revision 1.24

audio_wav_parse_hdr: handle zero-length data files again
the previous clean up turns zero-length data into no data and thus
an error, instead of simply doing nothing. noted by gson.
 1.13.8.2 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.13.8.1 27-Nov-2017  martin Pull up following revision(s) (requested by jdolecek in ticket #395):
usr.bin/audio/common/wav.c: revision 1.14
need getle16() for ext.sub_tag too
PR bin/52762 by Yosuke Sugahara
 1.14.6.3 23-Aug-2024  martin Pull up following revision(s) (requested by mrg in ticket #1874):

usr.bin/audio/common/wav.c: revision 1.23
usr.bin/audio/record/record.c: revision 1.59

fix some sizeof() confusion.

using "const char search[4]" as a function parameter means that
"search" is actually a pointer type so "sizeof search" returns
8 on 64-bit platforms. i mis-read this and used "sizeof *search"
which is always 1, noted by rillig.

instead of trying to avoid writing "4" twice, put it in a define
and use that in various places instead. annoying.
match message & conversion function name properly.

probably should make this into an array with two members.
 1.14.6.2 25-Mar-2024  martin Pull up following revision(s) (requested by mrg in ticket #1950):

usr.bin/audio/common/wav.c: revision 1.24

audio_wav_parse_hdr: handle zero-length data files again
the previous clean up turns zero-length data into no data and thus
an error, instead of simply doing nothing. noted by gson.
 1.14.6.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.14.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.15.8.3 23-Aug-2024  martin Pull up following revision(s) (requested by mrg in ticket #797):

usr.bin/audio/common/wav.c: revision 1.23
usr.bin/audio/record/record.c: revision 1.59

fix some sizeof() confusion.

using "const char search[4]" as a function parameter means that
"search" is actually a pointer type so "sizeof search" returns
8 on 64-bit platforms. i mis-read this and used "sizeof *search"
which is always 1, noted by rillig.

instead of trying to avoid writing "4" twice, put it in a define
and use that in various places instead. annoying.
match message & conversion function name properly.

probably should make this into an array with two members.
 1.15.8.2 25-Mar-2024  martin Pull up following revision(s) (requested by mrg in ticket #640):

usr.bin/audio/common/wav.c: revision 1.24

audio_wav_parse_hdr: handle zero-length data files again
the previous clean up turns zero-length data into no data and thus
an error, instead of simply doing nothing. noted by gson.
 1.15.8.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)

RSS XML Feed