- 30 Dec, 2002 6 commits
-
-
Greg Ward authored
setrecsrc() -> set_recsrc().
-
Greg Ward authored
-
Greg Ward authored
-
Greg Ward authored
-
Greg Ward authored
* channels() -> devices() * stereochannels() -> stereodevices() * recchannels() -> recdevices() * getvol() -> get() * setvol() -> set() This is for (slightly) more consistency with the OSS ioctl names (READ_DEVMASK, READ_RECMASK, READ_STEREODEVS). Also make sure the C function names correspond more closely to the Python method names for mixer methods.
-
Greg Ward authored
(It added nothing, and served no obvious purpose.) Export SOUND_MIXER_NRDEVICES constant.
-
- 12 Dec, 2002 1 commit
-
-
Greg Ward authored
-
- 11 Dec, 2002 3 commits
-
-
Greg Ward authored
* add oss_mixer_t and OSSMixerType * add newossmixerobject(), oss_mixer_dealloc(), ossopenmixer() * add _do_ioctl_1_internal() to support mixer ioctls * add mixer methods: oss_mixer_{close,fileno,channels,stereo_channels, rec_channels,getvol,setvol,getrecsrc,setrecsrc}() * add oss_mixer_methods list * add oss_mixer_getattr() (why?!) * export SOUND_MIXER_* constants from soundcard.h
-
Greg Ward authored
_do_ioctl_1() so they take a file descriptor rather than an oss_t pointer.
-
Greg Ward authored
* rename oss_t to lad_t, Ladtype to OSSType, * rename lad_*() methods to oss_*() * rename lad_methods list to oss_methods Patch and impetus supplied by Nicholas FitzRoy-Dale <wzdd@lardcave.net>.
-
- 30 Nov, 2002 5 commits
-
-
Greg Ward authored
-
Greg Ward authored
Use OSSAudioError much less frequently -- all real I/O errors (ie. any time open(), read(), write(), ioctl(), or select() return an error) become IOError. OSSAudioError is only used now for bad open() mode.
-
Greg Ward authored
Added _EXPORT_INT macro to export an integer constant to Python-space. Use it for all the AFMT_* constants, and update the list of AFMT_* constants to match what's in Linux 2.4: add AFMT_{QUERY,IMA_ADPCM, MPEG,AC3}. This should probably be tested with older versions of OSS, eg. with Linux 2.2 and 2.0. Export all SNDCTL_* ioctl numbers (where "all" is the set found in /usr/include/linux/soundcard.h on my Debian 3.0 system -- again Linux 2.4). Again needs to be tested with older OSS versions.
-
Greg Ward authored
it impossible to access blocking mode! * Rename write() to writeall(), and add a write() method that just does one write(). * Rearrange/simplify writeall(): in particular, don't supply a timeout to select(). Let it block forever if it has to. * Add a bunch of simple ioctl() wrappers: nonblock(), setfmt(), getfmts(), channels(), speed(), sync(), reset(), post(). These wrap, respectively, SNDCTL_DSP_NONBLOCK, SNDCTL_DSP_SETFMT, SNDCTL_DSP_GETFMTS, etc. * Reduce flush() (which was a wrapper for the SNDCTL_DSP_SYNC ioctl) to an alias for sync(). * Rearrange the lad_methods list to reflect the order in which the methods are defined, and add some grouping comments.
-
Greg Ward authored
This module is a replacement for linuxaudiodev, which will eventually be deprecated. Initial revision is rev 2.20 of linuxaudiodev.c, with a rewritten header comment.
-
- 27 Nov, 2002 1 commit
-
-
Greg Ward authored
consistency with the built-in open() (and every other sane open() function, for that matter). The two valid ways to call this open() are now open(mode) and open(device, mode). For backwards compatibility, retain the old open(mode) calling syntax -- this makes the error message when you call open(device) a bit confusing, but oh well. This is the first half of SF patch #644977.
-
- 17 Jul, 2002 1 commit
-
-
Jeremy Hylton authored
The staticforward define was needed to support certain broken C compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the static keyword when it was used with a forward declaration of a static initialized structure. Standard C allows the forward declaration with static, and we've decided to stop catering to broken C compilers. (In fact, we expect that the compilers are all fixed eight years later.) I'm leaving staticforward and statichere defined in object.h as static. This is only for backwards compatibility with C extensions that might still use it. XXX I haven't updated the documentation.
-
- 27 Apr, 2002 1 commit
-
-
Tim Peters authored
don't understand how this function works, also beefed up the docs. The most common usage error is of this form (often spread out across gotos): if (_PyString_Resize(&s, n) < 0) { Py_DECREF(s); s = NULL; goto outtahere; } The error is that if _PyString_Resize runs out of memory, it automatically decrefs the input string object s (which also deallocates it, since its refcount must be 1 upon entry), and sets s to NULL. So if the "if" branch ever triggers, it's an error to call Py_DECREF(s): s is already NULL! A correct way to write the above is the simpler (and intended) if (_PyString_Resize(&s, n) < 0) goto outtahere; Bugfix candidate.
-
- 12 Jan, 2002 1 commit
-
-
Martin v. Löwis authored
-
- 08 Dec, 2001 2 commits
-
-
Guido van Rossum authored
type.__module__ behavior. This adds the module name and a dot in front of the type name in every type object initializer, except for built-in types (and those that already had this). Note that it touches lots of Mac modules -- I have no way to test these but the changes look right. Apologies if they're not. This also touches the weakref docs, which contains a sample type object initializer. It also touches the mmap test output, because the mmap type's repr is included in that output. It touches object.h to put the correct description in a comment.
-
Guido van Rossum authored
The OSS Programmer's Reference (www.4front-tech.com) states: *Setting Sampling Parameters There are three parameters which affect the sound quality (and therefore memory and bandwidth requirements) of sampled audio data. These are: ** sample format (sometimes called number of bits) ** number of channels (mono or stereo), and ** sampling rate (speed) NOTE: It is important to always set these parameters in the above order. Setting sampling rate before the number of channels doesn't work with all devices.
-
- 02 Apr, 2001 1 commit
-
-
Guido van Rossum authored
handling of EAGAIN. This may or may not fix the problem for me (Mandrake 7.2 on a Dell Optiplex GX110 desktop): I can't hear the output, but it does pass the test now. It doesn't fix the problem for Fred (Mandrake 7.2 on a Dell Inspiron 7500 which has the Maestro sound drivers). Fred suspects that it's the kernel version in combination with the driver.
-
- 17 Jan, 2001 1 commit
-
-
Ka-Ping Yee authored
-
- 15 Jan, 2001 1 commit
-
-
Ka-Ping Yee authored
-
- 08 Oct, 2000 1 commit
-
-
Guido van Rossum authored
"audio". Also add AFMT_S16_NE ("native-endian"). (Somehow there's no AFMT_U16_NE.)
-
- 06 Oct, 2000 1 commit
-
-
Jeremy Hylton authored
read the header from the .au file and do a sanity check pass only the data to the audio device call flush() so that program does not exit until playback is complete call all the other methods to verify that they work minimally call setparameters with a bunch of bugs arguments linuxaudiodev.c: use explicit O_WRONLY and O_RDONLY instead of 1 and 0 add a string name to each of the entries in audio_types[] add AFMT_A_LAW to the list of known formats add x_mode attribute to lad object, stores imode from open call test ioctl return value as == -1, not < 0 in read() method, resize string before return add getptr() method, that calls does ioctl on GETIPTR or GETOPTR depending on x_mode in setparameters() method, do better error checking and raise ValueErrors; also use ioctl calls recommended by Open Sound System Programmer's Guido (www.opensound.com) use PyModule_AddXXX to define names in module
-
- 01 Sep, 2000 2 commits
-
-
Guido van Rossum authored
when PyDict_SetItemString() fails.
-
Barry Warsaw authored
Py_FatalError() from module initialization functions. The importing mechanism already checks for PyErr_Occurred() after module importation and it Does The Right Thing. Unfortunately, the following either were not compiled or tested by the regression suite, due to issues with my development platform: almodule.c cdmodule.c mpzmodule.c puremodule.c timingmodule.c
-
- 31 Aug, 2000 1 commit
-
-
Jeremy Hylton authored
Linux. Perhaps winaudio would be better, as it would offend both parties equally. tg@freebsd.org: allow this module to compile under FreeBSD (he suggests voxwareaudio)
-
- 18 Aug, 2000 1 commit
-
-
Barry Warsaw authored
been closed. Don't try to reclose it. Found by Insure.
-
- 21 Jul, 2000 1 commit
-
-
Thomas Wouters authored
and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
-
- 11 Jul, 2000 1 commit
-
-
Jeremy Hylton authored
-
- 08 Jul, 2000 1 commit
-
-
Fred Drake authored
Convert to four-space indents.
-
- 03 May, 2000 1 commit
-
-
Guido van Rossum authored
For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
-
- 31 Mar, 2000 1 commit
-
-
Guido van Rossum authored
-
- 30 Mar, 2000 1 commit
-
-
Guido van Rossum authored
Careful, this has had zero testing (except by Peter)!
-