summaryrefslogtreecommitdiffstats
path: root/Modules/audioop.c
Commit message (Collapse)AuthorAgeFilesLines
* gh-99537: Use Py_SETREF() function in C code (#99656)Victor Stinner2022-11-221-2/+1
| | | | | | | | | | | | | | | Fix potential race condition in code patterns: * Replace "Py_DECREF(var); var = new;" with "Py_SETREF(var, new);" * Replace "Py_XDECREF(var); var = new;" with "Py_XSETREF(var, new);" * Replace "Py_CLEAR(var); var = new;" with "Py_XSETREF(var, new);" Other changes: * Replace "old = var; var = new; Py_DECREF(var)" with "Py_SETREF(var, new);" * Replace "old = var; var = new; Py_XDECREF(var)" with "Py_XSETREF(var, new);" * And remove the "old" variable.
* bpo-2716: add license for audioop module (#19972)Furkan Onder2022-10-211-14/+30
|
* gh-96821: Fix undefined behaviour in `audioop.c` (#96923)Matthias Görgens2022-10-101-12/+15
| | | | | | | | | | | * gh-96821: Fix undefined behaviour in `audioop.c` Left-shifting negative numbers is undefined behaviour. Fortunately, multiplication works just as well, is defined behaviour, and gets compiled to the same machine code as before by optimizing compilers. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* Deprecate audioop (GH-32392)Brett Cannon2022-04-071-0/+7
|
* bpo-46670: Test if a macro is defined, not its value (GH-31178)Victor Stinner2022-02-071-2/+2
| | | | | | | | * audioop.c: #ifdef WORDS_BIGENDIAN * ctypes.h: #ifdef USING_MALLOC_CLOSURE_DOT_C * _ctypes/malloc_closure.c: #ifdef HAVE_FFI_CLOSURE_ALLOC and #ifdef USING_APPLE_OS_LIBFFI * pytime.c: #ifdef __APPLE__ * unicodeobject.c: #ifdef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION
* bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851)Christian Heimes2022-01-261-7/+0
|
* bpo-39824: Convert PyModule_GetState() to get_module_state() (GH-19076)Hai Shi2020-03-191-2/+2
| | | Automerge-Triggered-By: @vstinner
* bpo-39824: module_traverse() don't call m_traverse if md_state=NULL (GH-18738)Victor Stinner2020-03-171-6/+2
| | | | | | | | | | | | | Extension modules: m_traverse, m_clear and m_free functions of PyModuleDef are no longer called if the module state was requested but is not allocated yet. This is the case immediately after the module is created and before the module is executed (Py_mod_exec function). More precisely, these functions are not called if m_size is greater than 0 and the module state (as returned by PyModule_GetState()) is NULL. Extension modules without module state (m_size <= 0) are not affected. Co-Authored-By: Petr Viktorin <encukou@gmail.com>
* bpo-1635741: Port audioop extension module to multiphase initialization (PEP ↵Hai Shi2020-03-111-38/+79
| | | | | 489) (GH-18608) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-38303: Make audioop extension module PEP-384 compatible (GH-16497)Tyler Kieft2019-10-221-55/+77
| | | | | | | https://bugs.python.org/issue38303 Automerge-Triggered-By: @encukou
* bpo-33781: audioop: enhance rounding double as int (GH-7447)Victor Stinner2018-06-061-11/+17
| | | | | | Move the floor() call into fbound() to call floor() on a double rather than an int. The change should enhance the rounding. Document also (int)double rounding mode.
* bpo-28261: Fixed err msgs where PyArg_ParseTuple is used to parse normal ↵Oren Milman2017-08-201-7/+23
| | | | tuples. (#3119)
* Use uint16_t instead of short in audioop.Serhiy Storchaka2016-09-111-14/+14
|
* replace PyInt16 with int16_tBenjamin Peterson2016-09-081-14/+11
|
* replace PY_SIZE_MAX with SIZE_MAXBenjamin Peterson2016-09-071-1/+1
|
* Fix some warnings from MSVCSteve Dower2016-09-071-1/+2
|
* replace Python aliases for standard integer types with the standard integer ↵Benjamin Peterson2016-09-061-4/+4
| | | | types (#17884)
* Issue #1621: Avoid signed int negation overflow in audioopMartin Panter2016-07-191-1/+3
|
* - Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-53/+52
|\ | | | | | | generated by Argument Clinic. Patch by Petr Viktorin.
| * Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-53/+52
| | | | | | | | generated by Argument Clinic. Patch by Petr Viktorin.
* | Merge typo fixes from 3.5Martin Panter2016-05-081-2/+2
|\ \ | |/
| * Corrections for a/an in code comments and documentationMartin Panter2016-05-081-2/+2
| |
* | Issue #25923: Added the const qualifier to static constant arrays.Serhiy Storchaka2015-12-251-9/+11
|/
* Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5Martin Panter2015-11-021-2/+2
|\
| * Issue #25523: Correct "a" article to "an" articleMartin Panter2015-11-021-2/+2
| | | | | | | | | | | | This changes the main documentation, doc strings, source code comments, and a couple error messages in the test suite. In some cases the word was removed or edited some other way to fix the grammar.
* | Issue #24456: Fixed possible buffer over-read in adpcm2lin() and lin2adpcm()Serhiy Storchaka2015-06-281-13/+26
|\ \ | |/ | | | | functions of the audioop module.
| * Issue #24456: Fixed possible buffer over-read in adpcm2lin() and lin2adpcm()Serhiy Storchaka2015-06-281-13/+26
| | | | | | | | functions of the audioop module.
* | Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.Serhiy Storchaka2015-05-291-1/+1
|\ \ | |/ | | | | Original patch by David Moore.
| * Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.Serhiy Storchaka2015-05-291-1/+1
| | | | | | | | Original patch by David Moore.
* | Issue #23944: Argument Clinic now wraps long impl prototypes at column 78.Larry Hastings2015-04-141-26/+40
| |
* | Issue #23501: Argumen Clinic now generates code into separate files by default.Serhiy Storchaka2015-04-031-2/+1
|/
* Issue #20326: Argument Clinic now uses a simple, unique signature toLarry Hastings2014-01-281-27/+27
| | | | | | | | | | annotate text signatures in docstrings, resulting in fewer false positives. "self" parameters are also explicitly marked, allowing inspect.Signature() to authoritatively detect (and skip) said parameters. Issue #20326: Argument Clinic now generates separate checksums for the input and output sections of the block, allowing external tools to verify that the input has not changed (and thus the output is not out-of-date).
* Issue #20394: Attempt to silence CID 1164423: Division or modulo by zero in ↵Christian Heimes2014-01-271-1/+2
| | | | | | audioop_ratecv_impl() Serhiy and I had the same idea so it's most likely right. ;)
* fix refleak on errorBenjamin Peterson2014-01-261-4/+7
|
* Fix for catestrophic errors in previous checkin (Argument Clinic rollup patch).Larry Hastings2014-01-261-1/+1
|
* Issue #20390: Small fixes and improvements for Argument Clinic.Larry Hastings2014-01-261-1/+0
|
* Issue #20133: The audioop module now uses Argument Clinic.Serhiy Storchaka2014-01-251-486/+591
|
* fix refleak in the error caseBenjamin Peterson2014-01-131-2/+2
|
* audioop: adpcm2lin() and lin2adpcm() now raises a TypeError instead of aVictor Stinner2014-01-031-0/+6
| | | | SystemError if the state type is invalid.
* Issue #19641: Added the audioop.byteswap() function to convert big-endianSerhiy Storchaka2013-11-231-0/+32
| | | | samples to little-endian and vice versa.
* Fixed compile error on Windows caused by arithmetic with void * pointersSerhiy Storchaka2013-11-111-3/+3
| | | | (issue #16685).
* Issue #16685: Added support for any bytes-like objects in the audioop module.Serhiy Storchaka2013-11-101-288/+378
| | | | Removed support for strings.
* Issue #19418 Fix some warnings on Win64Tim Golden2013-10-311-2/+5
|
* Issue #12866: Fix bias() for 24-bit. Add more tests.Serhiy Storchaka2013-10-201-4/+8
|
* Issue #12866: The audioop module now supports 24-bit samples.Serhiy Storchaka2013-10-191-223/+200
|
* Issue #18203: Replace malloc() with PyMem_Malloc() in Python modulesVictor Stinner2013-07-071-6/+4
| | | | | Replace malloc() with PyMem_Malloc() when the GIL is held, or with PyMem_RawMalloc() otherwise.
* audioop: explicit cast to fix a compiler warningVictor Stinner2013-05-071-1/+1
|
* Issue #16686: Fixed a lot of bugs in audioop module.Serhiy Storchaka2013-02-091-156/+154
|\ | | | | | | | | | | | | | | | | | | | | | | * avgpp() and maxpp() no more crash on empty and 1-samples input fragment. They now work when peak-peak values are greater INT_MAX. * ratecv() no more crashes on empty input fragment. * Fixed an integer overflow in ratecv(). * Fixed an integer overflow in add() and bias() for 32-bit samples. * reverse(), lin2lin() and ratecv() no more lose precision for 32-bit samples. * max() and rms() no more returns negative result for 32-bit sample -0x80000000. * minmax() now returns correct max value for 32-bit sample -0x80000000. * avg(), mul(), tomono() and tostereo() now round negative result down and can return 32-bit sample -0x80000000. * add() now can return 32-bit sample -0x80000000.
| * Issue #16686: Fixed a lot of bugs in audioop module.Serhiy Storchaka2013-02-091-156/+154
| | | | | | | | | | | | | | | | | | | | | | | | * avgpp() and maxpp() no more crash on empty and 1-samples input fragment. They now work when peak-peak values are greater INT_MAX. * ratecv() no more crashes on empty input fragment. * Fixed an integer overflow in ratecv(). * Fixed an integer overflow in add() and bias() for 32-bit samples. * reverse(), lin2lin() and ratecv() no more lose precision for 32-bit samples. * max() and rms() no more returns negative result for 32-bit sample -0x80000000. * minmax() now returns correct max value for 32-bit sample -0x80000000. * avg(), mul(), tomono() and tostereo() now round negative result down and can return 32-bit sample -0x80000000. * add() now can return 32-bit sample -0x80000000.
* | Issue #16096: Fix several occurrences of potential signed integer overflow. ↵Mark Dickinson2012-10-061-2/+2
| | | | | | | | Thanks Serhiy Storchaka.