summaryrefslogtreecommitdiffstats
path: root/lib/libossaudio/ossaudio.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | 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@
* simplify SNDCTL_DSP_SETTRIGGERjakemsr2008-04-041-10/+3
| | | | | | | | | | - 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
* this is the recording source. rename 'source' to 'recsource' and bejakemsr2007-11-121-9/+15
| | | | sure to only use 'record.source' instead of possibly 'inputs.source'.
* implement SNDCTL_DSP_GETODELAYjakemsr2007-11-121-1/+6
| | | | | | bump minor version ok deanna@
* - when we need to do both AUDIO_SETINFO and AUDIO_GETINFO to emulatejakemsr2007-11-061-58/+78
| | | | | | | | | | | | | | 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@
* - make SNDCTL_DSP_GETOSPACE much more efficient by using AUDIO_GETPRINOjakemsr2007-10-081-15/+12
| | | | | | | | | | | | | | | 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
* implement SNDCTL_DSP_[G|S]ETTRIGGERjakemsr2007-09-281-25/+21
| | | | | | | | | | | | | | | | | | | | 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
* revert change that breaks KDE, until we figure out what's wrong.espie2006-02-131-9/+9
|
* Fix problem in ioctl() handling in OSS audio emulation which causedbrad2006-01-251-9/+9
| | | | | | | | 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@
* compare st_dev/st_ino before declaring the cached values valid; ok miodjason2005-01-191-2/+4
|
* - make it -Wall cleanavsm2003-05-031-4/+11
| | | | | | | - 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)
* make oss_ioctl varargs.espie2002-04-241-2/+9
| | | | | | 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@
* sync up libossaudio with NetBSD changes.brad2001-08-181-58/+132
| | | | | | | | | | | | | | | | | | | -- - 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.
* Fix fragment handling for SNDCTL_DSP_GETxSPACE ioctls; per NetBSD PR/12796.aaron2001-05-241-4/+16
| | | | | | 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.
* fix off by one error, reported by nathanw@MIT.EDU.provos1998-05-251-2/+2
|
* libossaudio from NetBSD mostly by Lennart Augustsson <augustss@cs.chalmers.se>provos1998-05-011-0/+699