- 'fragments' is the number of full free blocks and should not be
negative value.
- 'bytes' should not be rounded down.
It makes mpv work correctly (fixes a second half of kern/53028).
Reviewed by mlelstv@
picked up by gcc7's checker that the array size has not
been multipled by the member size.
here, we had 8 but should have had 8 * sizeof(int).
XXX: real bug - pullup-7, pullup-8
The ioctl definitions and accompanying structures were
taken from FreeBSD's soundcard.h, hopefully providing
some binary compatibility.
The ioctls are as follows:
SNDCTL_SYSINFO: Returns a structure containing
details about the audio device.
SNDCTL_ENGINEINFO - SNDCTL_AUDIOINFO: Returns a
structure with playback/recording
characteristics.
SNDCTL_DSP_GETPLAYVOL, SNDCTL_DSP_SETPLAYVOL,
SNDCTL_DSP_GETRECVOL, SNDCTL_DSP_SETRECVOL:
Retrieves/Sets Playback/Recording volume.
SNDCTL_DSP_SKIP - SNDCTL_DSP_SILENCE: These ioctls
were intended to manipulate the underlying
audio buffer skip or insert silence. These
return EINVAL.
SOUND_VERSION is unchanged, but is definable, It will be
changed when the mixer OSSv4 ioctls are written.
Addresses PR 46611
This commit was approved by wiz@.
we try to set both in one ioctl, to the same value, which fails if not
both record and play direction support that many channels. (Having
more play than record channels is common these days.)
This does likely address part of the problem described in PR pkg/35444
by Mihai Chelaru, and it helped Matthew R. Green about half a year
ago -- see the thread in tech-misc in April.
doesn't obtain the ports, gain and balance related parameters.
Those generally require reading from the hardware and therefore are much
more expensive to obtain. Modify OSS emulation to use the new ioctl
where possible.
This reduces CPU usage of mplayer during mp3 playback with my Thinkpad
from 20% to < 1% and from 50% to 20% during Xvid playback.
Review and comments from jmcneill@
<machine/endian_machdep.h>.
The previous method of wrapping a definition of _POSIX_SOURCE around the
inclusion of other headers to reduce namespace pollution had the
side-effect of not all required identifiers being defined when included
thereafter by the application itself (due to multiple-inclusion protection),
and is not blessed by that standard.
The optimized integer formula was supplied by Wolfgang Solfrank on
"tech-kern@netbsd.org". This fixes problems with e.g FreeBSD TV (fxtv),
RealPlayer-7.0 Beta 2 (PR pkg/10818) and KDE's "kscd".
encodings, too. (This is currently an issue with the eso(4) driver, which,
due to different byte orders in playing and recording directions, sets the
emulated flag for all 16-bit encodings, although it could be argued that this
is an unfortunate weakness of the query_encoding() interface.)