summaryrefslogtreecommitdiff
path: root/lib/libossaudio
AgeCommit message (Collapse)Author
2020-04-02Makes libossaudio use sndio instead of the kernel mixer(4) interface.Alexandre Ratchov
Programs will see the device handled by sndiod (instead of the first one) and will always get access at least the sndiod master level control. If present, hardware master input and output volumes are exposed as well. feedback from landry and sthen, "do it" deraadt
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2018-10-26remove a misleading comment; ok ratchov@miko
2015-09-10use .In rather than .Fd #includeIngo Schwarze
2015-09-10We don't want LIBRARY sections in OpenBSD, so delete it.Ingo Schwarze
2015-04-19Make SNDCLT_DSP_* ioctls return ENOTTY, and remove the correspondingAlexandre Ratchov
code. No ABI change. ok armani@, guenther@, sthen@
2015-01-22Do not need to include <sys/cdefs.h> when headers included above end upTheo de Raadt
doing so.
2014-07-16zap trailing newlines; "go for it" deraadtOkan Demirmen
2013-08-13Switch time_t, ino_t, clock_t, and struct kevent's ident and dataPhilip Guenther
members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
2013-03-27rename define to reflect current operating system, as in sys/compatTed Unangst
from tim van der molen
2012-08-02remove leftover NOLINT, WANTLINT, LINTFLAGS, LOBJ vars and lint targets.Okan Demirmen
ok guenther@
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-04-04simplify SNDCTL_DSP_SETTRIGGERJacob Meuser
- don't mess with the operational mode. that was primarily to be able to set record|play mode for full-duplex, which isn't needed any more. - don't set pause=1. this ioctl isn't supposed to be used for stopping streams. suggestions, ok ratchov
2007-11-12this is the recording source. rename 'source' to 'recsource' and beJacob Meuser
sure to only use 'record.source' instead of possibly 'inputs.source'.
2007-11-12implement SNDCTL_DSP_GETODELAYJacob Meuser
bump minor version ok deanna@
2007-11-06- when we need to do both AUDIO_SETINFO and AUDIO_GETINFO to emulateJacob Meuser
a single OSS ioctl, return the return value and errno from from AUDIO_SETINFO if there was an error, since it's more informative than the return value and errno from AUDIO_GETINFO. also, don't bail if AUDIO_SETINFO fails, because OSS ioctls should return the current value of the parameter they are setting, even if there was an error. - avoid a possible (though highly unlikely) divide by zero in SNDCTL_DSP_GET[IO]SPACE. ok ratchov@
2007-10-08- make SNDCTL_DSP_GETOSPACE much more efficient by using AUDIO_GETPRINOJacob Meuser
instead of AUDIO_GETINFO - make SNDCTL_DSP_GETISPACE return correct values by using AUDIO_GETRRINFO instead of AUDIO_GETINFO - remove calls to setblocksize() from SNDCTL_DSP_GET[IO]SPACE. changing the blocksize inside play or record loops, where these ioctls are most often used, can have serious negative consequences. the blocksize should be "fixed" to a power of 2 before these ioctls are called by using SNDCTL_DSP_SETFRAGMENT or SNDCTL_DSP_GETBLKSIZE. heavily tested by myself. no negative feedback from anyone else. ok ratchov
2007-09-28implement SNDCTL_DSP_[G|S]ETTRIGGERJacob Meuser
SNDCTL_DSP_SETTRIGGER is used to pause and unpause recording and playback data transfers. SNDCTL_DSP_GETTRIGGER returns the paused states. this implementation of SNDCTL_DSP_SETTRIGGER also sets the audio(4) mode (AUMODE_[PLAY|RECORD]), depending on which direction (play, record or both) is to be triggered. this can be used allow OSS audio programs to work in full-duplex mode without changing the audio(4) layer itself. according to OSS docs, SNDCTL_DSP_SETTRIGGER is a fairly important ioctl, and should be used "when even the first read() cannot block." tested to not break any ports currently using SNDCTL_DSP_SETTRIGGER which has been a no-op for quite some time. ok ratchov
2007-05-31convert to new .Dd format;Jason McIntyre
2006-02-13revert change that breaks KDE, until we figure out what's wrong.Marc Espie
2006-01-25Fix problem in ioctl() handling in OSS audio emulation which causedBrad Smith
unintentional changes of the audio settings e.g. when running "kphone". Adapted to the userland library from a similar change in the kernel code. ok jakemsr@
2005-12-19Use __BSD_VISIBLE instead of _POSIX_SOURCE to avoid pullingTodd C. Miller
in most of machine/endian.h. OK espie@
2005-11-24use WANTLINT= (on all architectures)Theo de Raadt
2005-01-19compare st_dev/st_ino before declaring the cached values valid; ok miodJason Wright
2004-07-13errno changes, lib major version bumps, and general flag dayMarco S Hyman
To build you must: cd /usr/src && make obj && make includes cd lib/libc && make depend && make && NOMAN=1 sudo make install cd /usr/src && make build
2003-06-02section reorder;Jason McIntyre
2003-05-03- make it -Wall cleanAnil Madhavapeddy
- add SNDCTL_DSP_SETDUPLEX emulation (netbsd) - SNDCTL_DSP_POST is a noop to prevent some apps blocking (netbsd) - some man pages fixes (from me and netbsd) - add some more missing #defines for SOUND_MIXER_* (netbsd)
2002-12-03Crank all library major numbers. Needed due to the fact that weTodd C. Miller
now build libraries with propolice enabled. Without this, existing binaries (such as ports/packages) that link with any system library other than libc will fail with an undefined symbol of "___guard" (__guard on ELF). Pointed out by markus@ and discussed with deraadt@
2002-05-01o) start new sentence on a new line;Mike Pechkin
o) always close .Bl tags; o) fix usage of .Xr; millert@ ok
2002-04-24make oss_ioctl varargs.Marc Espie
this is not standard C, but it works on the arches we support, and osscompat is a dirty hack in the first place. ok millert@, tested naddy@
2002-03-23Force inclusion of <sys/ioctl.h> before the body of soundcard.h.Todd C. Miller
Since soundcard.h #defines ioctl to oss_ioctl we need to see the ioctl prototype first. This works around a problem exposed by the __P removal. A slightly better solution may be to simply replace ioctl() in libossaudio, calling the real ioctl() via syscall(2) when needed.
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-08-18sync up libossaudio with NetBSD changes.Brad Smith
-- - Add __BEGIN_DECLS & __END_DECLS for C++ - Make protection against multiple inclusion non-invasive wrt. name space - Use EAGAIN instead of EWOULDBLOCK. The actual numeric value is same, but EAGAIN is the posixly correct name - Remove white space - Change the behaviour to report emulated encodings, too - Implement SOUND_MIXER_INFO - Implement OSS_GETVERSION - Accept mixer values above max (100) - Handle the info from AUDIO_MIXER_DEVINFO properly, parts of it is opaque - Use accurate rounding in conversion between OSS and OpenBSD volume values - Map OSS mixer device "line1" to native mixer device "aux" -- Some testing by pvalchev@, no response from other testers in over a month and a half.
2001-05-24Fix fragment handling for SNDCTL_DSP_GETxSPACE ioctls; per NetBSD PR/12796.Aaron Campbell
The kernel part of this fixes sound emulation for version 1.37c of the Linux binary of Snes9x (Super Nintendo emulator). The userland equivalent fix should allow espie to remove his local audio hacks in the squeak port.
1999-09-01typoTheo de Raadt
1999-08-31pull in ioccom.h because apps exist which do not pull in ioctl.h first; ↵Theo de Raadt
steuck@iname.com
1999-07-09- remove all trailing whitespaceAaron Campbell
* except when it is escaped with a `\' at the end of the line - fix remaining .Nm usage as well - this is from a patch I received from kwesterback@home.com, who has been working on some scripts for fixing formatting errors in mdoc'd man pages Ok, so there could be a cost/benefit debate with this commit, but since I have the patch we might as well commit it...
1999-07-07The proper order of the ``introductory'' macros in a man page is .Dd/.Dt/.Os.Aaron Campbell
Out of the approximately 1450 man pages, only about 90 of them were wrong. Thanks to kwesterback@home.com for coming up with a script and patch to repair this. The patch also inserted a .Os macro in the few man pages that were missing one.
1999-02-17#undef _POSIX_SOURCE after inclusion of machine/endian.h (if it was not ↵Todd C. Miller
already defined).
1998-05-25fix off by one error, reported by nathanw@MIT.EDU.Niels Provos
1998-05-08sighTheo de Raadt
1998-05-04it is disgusting when something gets put into the source tre incorrectly,Theo de Raadt
but 3 days later still isn't fixed.
1998-05-01libossaudio from NetBSD mostly by Lennart Augustsson <augustss@cs.chalmers.se>Niels Provos