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.
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.
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.
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.
Add an ioctl to return channel number (AUDIO_GETCHAN). This can be used
on audio/sound/audioctl devices.
Return EIO in read/write/ioctl/poll/stat if fp has been closed or is
invalid.
Update audio.4, audioio.h and audioctl(1) to reflect these changes.
instance per process. Virtual channels are placed in a queue, so there is
no longer a compile time limit of VAUDIOCHANS.
A new sysctl has been added to control multiple user access.
Mixer labels on virtual channels are now prefixed by vchan.
audiobell.c and audioctl have been updated to reflect these changes.
Use of fdclone was posted to tech-kern@ and improvements made.
Multiuser access control changes and the use of a queue were suggessted by
pgoyette@
posted to tech-kern:
* Simultaneous playback and mixing of multiple streams
* Playback streams can be of different encoding, frequency, precision
and number of channels
* Simultaneous recording to different formats
* One audio device per process
* Sysctls to set the common format frequency, precision and channels
* Independent mixer controls for recording/playback per stream
* Utilizes little cpu time for multiple streams / good performance
* Compatible with existing programs that use OSS/NetBSD audio
* Changes to audioctl(1) to allow specifying process id for corresponding
audio device
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.