summaryrefslogtreecommitdiffstats
path: root/Modules/linuxaudiodev.c
Commit message (Collapse)AuthorAgeFilesLines
* Include <unistd.h> in Python.h. Fixes #500924.Martin v. Löwis2002-01-121-4/+0
|
* Patch supplied by Burton Radons for his own SF bug #487390: ModifyingGuido van Rossum2001-12-081-1/+1
| | | | | | | | | | | | | 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.
* SF patch #489989 (Charles G Waldman) linuxaudiodev.c - fix initializationGuido van Rossum2001-12-081-9/+8
| | | | | | | | | | | | | | | | | | | | | 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.
* Applying SF patch #412553 by Christopher Lee: fix linuxaudiodevGuido van Rossum2001-04-021-9/+29
| | | | | | | | | | 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.
* Restore lost AFMT_S16_NE entry.Ka-Ping Yee2001-01-171-0/+1
|
* better format names and error messagesKa-Ping Yee2001-01-151-13/+12
|
* Be consistent in the description of audio formats: <format> <width>Guido van Rossum2000-10-081-4/+7
| | | | | | "audio". Also add AFMT_S16_NE ("native-endian"). (Somehow there's no AFMT_U16_NE.)
* test_linuxaudio:Jeremy Hylton2000-10-061-86/+129
| | | | | | | | | | | | | | | | | | | | | | 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
* Move the Py_DECREF(x) after the error: label so that we don't leak xGuido van Rossum2000-09-011-1/+1
| | | | when PyDict_SetItemString() fails.
* Do the absolute minimal amount of modifications to eradicateBarry Warsaw2000-09-011-5/+2
| | | | | | | | | | | | | | | 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
* This module has a poor name, since it can be used under FreeBSD andJeremy Hylton2000-08-311-0/+10
| | | | | | | | 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)
* lad_dealloc(): if xp->x_fd == -1, it means the descriptor's alreadyBarry Warsaw2000-08-181-1/+3
| | | | been closed. Don't try to reclose it. Found by Insure.
* Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters2000-07-211-1/+1
| | | | | | | | | | | | | | | | | | 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 ;)
* satisfy the -Wall: remove two unused local variables and unused ins functionJeremy Hylton2000-07-111-13/+0
|
* Add method names to PyArg_ParseTuple() calls for better error messages.Fred Drake2000-07-081-313/+298
| | | | Convert to four-space indents.
* Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum2000-05-031-2/+2
| | | | | | | | | | 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.)
* This module's name should be linuxaudio*dev*.cGuido van Rossum2000-03-311-0/+466