Correctly set the water level based on min_avail to avoid infinite
polling loops.
Applications tested: chrome, musescore, aplay and arecord .
PR: 261767
Approved by: pi (implicit)
When computing the oss_pointer() return value, use the application
pointer value as reference, so that ALSA audio applications at any
time don't read/write more audio data than is possible. Following the
cyclic DMA pointer is not a good idea, because it doesn't account for
under- or overruns and this quickly leads to a situation where some
applications may want to write more data, ending in infinite loops.
The SNDCTL_DSP_GET space ioctls operate on buffer fragments. Any
size less than bi.fragsize is reported as zero bytes. Don't set the
water level less than bi.fragsize, because it leads to infinite
polling the way ALSA PCM is working.
Approved by: pi (implicit)
The original distfiles are getting hard to come by for some reason, so
switch to pulling source tarballs directly from GitHub. Replace
patches that apply to generated files with patches that apply to their
sources.
files/alsa-plugins.patch contains an assortment of FreeBSD-specific
improvements that may not work on alternative OSS implementations.
So, restore the ability to exclude the patch for debugging.
1) When read() or write() fails due to EAGAIN because no buffer is available or
buffer is full, return 0 instead of failure. Else clients may simply close
the device and re-open it instantly chopping the audio.
2) Implement OSS delay function to fix an issue with negative delays.
3) Use at least 16ms of HW buffer by default to avoid jitter.
Approved by: pi, jbeich
Also switch maintainership to submitter with blessing of former
maintainer. Other changes include:
* fix for bug 191190
* Use new options syntax
* Proper detection of PYTHON and FFMPEG
* fix leftovers
* strip libraries to satisfy stage-qa
* conf: alias surround stuff to pcm.default
* lib: split patches and refactor
* utils: rename XMLTO to MANPAGES
PR: 191524
Submitted by: Jan Beich
Approved by: former maintainer (Aragon Gouveia)
after being converted from float as passed by firefox/libcubeb [2]
- Restore behavior from r296140 while adding alignment options in case
of issues. This should make things slightly less broken and add more
sample formats. [1]
- Some apps (e.g. linux-firefox with ports/169896) don't check with ALSA
which sample formats are supported and just feed whatever they like,
assuming the underlying device supports it.
While here also fix mixer device for OSS plugin. It should be /dev/dsp
according to 4Front OSS wiki. The only works with ARIFF_OSS enabled
but the volume is reset on close(). audio/oss doesn't work either way:
the new (OSSv4) way to control mixer is via SNDCTL_MIX_* ioctls. [2]
PR: ports/183861 [1]
PR: ports/184006 [2]
Submitted by: Jan Beich <jbeich@tormail.org>
Approved by: maintainer timeout
on FreeBSD and should not require any quirks/workarounds.
In fact they seem to be harmful now and result in sound outages.
PR: ports/165247
Submitted by: avg
Submitted by: Aragon Gouveia <aragon@phat.za.net> (maintainer)