From acffb86f1a95dd408fa8578b342a08c3608f5bda Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Wed, 9 Feb 2022 13:55:29 +0100 Subject: [PATCH 01/18] build system preparation for release 0.11.0 _soundfile_data now contains up-to-date binaries for Windows 32/64 and macOS intel/arm. build scripts have been amended to use the new binaries changelog is not yet updated windows binaries use different C runtime than python, do not support file descriptors --- _soundfile_data | 2 +- build_wheels.py | 2 +- setup.py | 26 ++++++++------------------ soundfile.py | 40 ++++++++++++++++++++++++---------------- 4 files changed, 34 insertions(+), 36 deletions(-) diff --git a/_soundfile_data b/_soundfile_data index 84cb164..5b891b4 160000 --- a/_soundfile_data +++ b/_soundfile_data @@ -1 +1 @@ -Subproject commit 84cb164928f17c7ca0c1e5c40342c20ce2b90e8c +Subproject commit 5b891b4b959382fcd646c58e6db11ac054eabe25 diff --git a/build_wheels.py b/build_wheels.py index 9ad90e1..c24b6ec 100644 --- a/build_wheels.py +++ b/build_wheels.py @@ -1,7 +1,7 @@ import os import shutil -architectures = dict(darwin=['64bit'], +architectures = dict(darwin=['x86_64', 'arm64'], win32=['32bit', '64bit'], noplatform='noarch') diff --git a/setup.py b/setup.py index bed16f1..0cfb7c0 100644 --- a/setup.py +++ b/setup.py @@ -5,27 +5,14 @@ from setuptools.command.test import test as TestCommand import sys -PYTHON_INTERPRETERS = '.'.join([ - 'cp26', 'cp27', - 'cp32', 'cp33', 'cp34', 'cp35', 'cp36', - 'pp27', - 'pp32', 'pp33', -]) -MACOSX_VERSIONS = '.'.join([ - 'macosx_10_5_x86_64', - 'macosx_10_6_intel', - 'macosx_10_9_intel', - 'macosx_10_9_x86_64', -]) - # environment variables for cross-platform package creation platform = os.environ.get('PYSOUNDFILE_PLATFORM', sys.platform) architecture0 = os.environ.get('PYSOUNDFILE_ARCHITECTURE', architecture()[0]) if platform == 'darwin': - libname = 'libsndfile.dylib' + libname = 'libsndfile_' + architecture0 + '.dylib' elif platform == 'win32': - libname = 'libsndfile' + architecture0 + '.dll' + libname = 'libsndfile_' + architecture0 + '.dll' else: libname = None @@ -70,9 +57,12 @@ class bdist_wheel_half_pure(bdist_wheel): """Create OS-dependent, but Python-independent wheels.""" def get_tag(self): - pythons = 'py2.py3.' + PYTHON_INTERPRETERS + pythons = 'py2.py3' if platform == 'darwin': - oses = MACOSX_VERSIONS + if architecture0 == 'x86_64': + oses = 'macosx-10.x-x86_64' + else: + oses = 'macosx-10.x-arm64' elif platform == 'win32': if architecture0 == '32bit': oses = 'win32' @@ -87,7 +77,7 @@ def get_tag(self): setup( name='soundfile', - version='0.10.3post1', + version='0.11.0b1', description='An audio library based on libsndfile, CFFI and NumPy', author='Bastian Bechtold', author_email='basti@bastibe.de', diff --git a/soundfile.py b/soundfile.py index b15a706..4a0f3f4 100644 --- a/soundfile.py +++ b/soundfile.py @@ -8,11 +8,10 @@ For further information, see https://python-soundfile.readthedocs.io/. """ -__version__ = "0.10.3" +__version__ = "0.11.0" import os as _os import sys as _sys -from platform import machine as _machine from os import SEEK_SET, SEEK_CUR, SEEK_END from ctypes.util import find_library as _find_library from _soundfile import ffi as _ffi @@ -144,10 +143,16 @@ _snd = _ffi.dlopen(_libname) except OSError: if _sys.platform == 'darwin': + from platform import machine as _machine + _packaged_libname = 'libsndfile_' + machine() + '.dylib' _libname = 'libsndfile.dylib' elif _sys.platform == 'win32': from platform import architecture as _architecture - _libname = 'libsndfile' + _architecture()[0] + '.dll' + _packaged_libname = 'libsndfile_' + _architecture()[0] + '.dll' + _libname = 'libsndfile.dll' + elif _sys.platform == 'linux': + _packaged_libname = 'libsndfile.so' # not provided! + _libname = 'libsndfile.so' else: raise @@ -160,16 +165,19 @@ while not _os.path.isdir(_path): _path = _os.path.abspath(_os.path.join(_path, '..')) - # Homebrew on Apple M1 uses a `/opt/homebrew/lib` instead of - # `/usr/local/lib`. We are making sure we pick that up. - if _sys.platform == 'darwin' and _machine() == 'arm64': - _hbrew_path = '/opt/homebrew/lib/' if _os.path.isdir('/opt/homebrew/lib/') \ - else '/usr/local/lib/' - _snd = _ffi.dlopen(_os.path.join( - _hbrew_path, _libname)) - else: - _snd = _ffi.dlopen(_os.path.join( - _path, '_soundfile_data', _libname)) + try: # packaged libsndfile: + _snd = _ffi.dlopen(_os.path.join(_path, '_soundfile_data', _packaged_libname)) + except OSError: # try system-wide libsndfile: + # Homebrew on Apple M1 uses a `/opt/homebrew/lib` instead of + # `/usr/local/lib`. We are making sure we pick that up. + from platform import machine as _machine + if _sys.platform == 'darwin' and _machine() == 'arm64': + _hbrew_path = '/opt/homebrew/lib/' if _os.path.isdir('/opt/homebrew/lib/') \ + else '/usr/local/lib/' + _snd = _ffi.dlopen(_os.path.join(_hbrew_path, _libname)) + else: + # Try explicit file name, if the general does not work (e.g. on nixos) + _snd = _ffi.dlopen(_libname) __libsndfile_version__ = _ffi.string(_snd.sf_version_string()).decode('utf-8', 'replace') if __libsndfile_version__.startswith('libsndfile-'): @@ -1368,9 +1376,9 @@ def copy_metadata(self): ------- metadata: dict[str, str] - A dict with all metadata. Possible keys are: 'title', 'copyright', - 'software', 'artist', 'comment', 'date', 'album', 'license', - 'tracknumber' and 'genre'. + A dict with all metadata. Possible keys are: 'title', 'copyright', + 'software', 'artist', 'comment', 'date', 'album', 'license', + 'tracknumber' and 'genre'. """ strs = {} for strtype, strid in _str_types.items(): From fd1411c6caf92af49ffe42adf1fd76944265fcc9 Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Wed, 16 Feb 2022 09:21:18 +0100 Subject: [PATCH 02/18] Fixes warnings when running tests replaces @pytest.yield_fixture with @pytest.fixture, which is equivalent. --- tests/test_soundfile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_soundfile.py b/tests/test_soundfile.py index 8f09a5f..922744d 100644 --- a/tests/test_soundfile.py +++ b/tests/test_soundfile.py @@ -101,31 +101,31 @@ def file_wplus(request): return _file_new(request, os.O_CREAT | os.O_RDWR, 'w+b') -@pytest.yield_fixture +@pytest.fixture def file_inmemory(): with io.BytesIO() as f: yield f -@pytest.yield_fixture +@pytest.fixture def sf_stereo_r(file_stereo_r): with sf.SoundFile(file_stereo_r) as f: yield f -@pytest.yield_fixture +@pytest.fixture def sf_stereo_w(file_w): with sf.SoundFile(file_w, 'w', 44100, 2, format='WAV') as f: yield f -@pytest.yield_fixture +@pytest.fixture def sf_stereo_rplus(file_stereo_rplus): with sf.SoundFile(file_stereo_rplus, 'r+') as f: yield f -@pytest.yield_fixture +@pytest.fixture def sf_stereo_wplus(file_wplus): with sf.SoundFile(file_wplus, 'w+', 44100, 2, format='WAV', subtype='FLOAT') as f: From 8f7c71fa01c2c3c9fa49b33fe57f79569f208301 Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Wed, 16 Feb 2022 09:34:35 +0100 Subject: [PATCH 03/18] updates changelog --- README.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.rst b/README.rst index f7a7edb..3285675 100644 --- a/README.rst +++ b/README.rst @@ -292,3 +292,17 @@ News - Improves performance of `blocks()` and `SoundFile.blocks()`. - Improves import time by using CFFI's out of line mode. - Adds a build script for building distributions. + +2022-02-16 V0.11.0 Bastian Bechtold: + Thank you, tennies, Hannes Helmholz, Christoph Boeddeker, Matt + Vollrath, Matthias Geier, Jacek Konieczny, Boris Verkhovskiy, + Jonas Haag, Eduardo Moguillansky, Panos Laganakos, Jarvy Jarvison, + Domingo Ramirez, Tim Chagnon, Kyle Benesch + + - Adds binary wheels for macOS M1 + - Improves compatibility with macOS, specifically for M1 machines + - Updates libsndfile to v1.0.31 + - Adds get_strings method for retrieving all metadata at once + - Improves documentation, error messages and tests + - Displays length of very short files in samples + - Supports the file system path protocol (pathlib et al) From da2a650dfbb84c8c59a5bb0ec1d178ff70c67f5b Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Wed, 16 Feb 2022 09:43:28 +0100 Subject: [PATCH 04/18] fixes wheel build script - no longer leaks soundfile.egg-info directory, or environment variables. - builds a clean sdist without _soundfile_data. --- build_wheels.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build_wheels.py b/build_wheels.py index c24b6ec..c312af4 100644 --- a/build_wheels.py +++ b/build_wheels.py @@ -6,18 +6,21 @@ noplatform='noarch') def cleanup(): + os.environ['PYSOUNDFILE_PLATFORM'] = '' + os.environ['PYSOUNDFILE_ARCHITECTURE'] = '' shutil.rmtree('build', ignore_errors=True) + shutil.rmtree('soundfile.egg-info', ignore_errors=True) try: os.remove('_soundfile.py') except: pass for platform, archs in architectures.items(): - os.environ['PYSOUNDFILE_PLATFORM'] = platform for arch in archs: + os.environ['PYSOUNDFILE_PLATFORM'] = platform os.environ['PYSOUNDFILE_ARCHITECTURE'] = arch + os.system('python3 setup.py bdist_wheel') cleanup() - os.system('python setup.py bdist_wheel') +os.system('python3 setup.py sdist') cleanup() -os.system('python setup.py sdist') From 98bafff65f6a7465f63c78322171c32fe2ac055e Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Wed, 16 Feb 2022 10:02:20 +0100 Subject: [PATCH 05/18] updates windows binaries for full compatibility with Python 3.5+ the provided Windows libsndfile now uses Visual C++ 14.x, which is fully compatible with Python 3.5+. Older versions of Python will not be able to open file descriptors. --- README.rst | 1 + _soundfile_data | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 3285675..b920fcc 100644 --- a/README.rst +++ b/README.rst @@ -301,6 +301,7 @@ News - Adds binary wheels for macOS M1 - Improves compatibility with macOS, specifically for M1 machines + - Fixes file descriptor open for binary wheels on Windows and Python 3.5+ - Updates libsndfile to v1.0.31 - Adds get_strings method for retrieving all metadata at once - Improves documentation, error messages and tests diff --git a/_soundfile_data b/_soundfile_data index 5b891b4..05ed9cb 160000 --- a/_soundfile_data +++ b/_soundfile_data @@ -1 +1 @@ -Subproject commit 5b891b4b959382fcd646c58e6db11ac054eabe25 +Subproject commit 05ed9cbbb5e2727b705b4d7ca5df1d67dd674b11 From 469442c348d2922c7bec0ec1ec8b4f89a39cf978 Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Wed, 16 Feb 2022 10:28:36 +0100 Subject: [PATCH 06/18] fixes test on Windows --- tests/test_soundfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_soundfile.py b/tests/test_soundfile.py index 922744d..9eaa5f7 100644 --- a/tests/test_soundfile.py +++ b/tests/test_soundfile.py @@ -592,7 +592,8 @@ def test_file_content(sf_stereo_r): def test_file_attributes_in_read_mode(sf_stereo_r): if isinstance(sf_stereo_r.name, str): - assert sf_stereo_r.name == filename_stereo + # wrap in pathlib, to make tests pass on Windows: + assert pathlib.Path(sf_stereo_r.name) == pathlib.Path(filename_stereo) elif not isinstance(sf_stereo_r.name, int): assert sf_stereo_r.name.name == filename_stereo assert sf_stereo_r.mode == 'r' From 985d36eb8641cb3a54ef26c38d308ec0fcc01566 Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Wed, 16 Feb 2022 10:32:37 +0100 Subject: [PATCH 07/18] updates version number --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0cfb7c0..2cc58f9 100644 --- a/setup.py +++ b/setup.py @@ -77,7 +77,7 @@ def get_tag(self): setup( name='soundfile', - version='0.11.0b1', + version='0.11.0', description='An audio library based on libsndfile, CFFI and NumPy', author='Bastian Bechtold', author_email='basti@bastibe.de', From 4b4d4d3762df3560e4bcceca0c208140922126e9 Mon Sep 17 00:00:00 2001 From: msuch Date: Sun, 20 Feb 2022 18:33:35 +0100 Subject: [PATCH 08/18] Fixed import reference typo --- soundfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soundfile.py b/soundfile.py index 4a0f3f4..3cbd282 100644 --- a/soundfile.py +++ b/soundfile.py @@ -144,7 +144,7 @@ except OSError: if _sys.platform == 'darwin': from platform import machine as _machine - _packaged_libname = 'libsndfile_' + machine() + '.dylib' + _packaged_libname = 'libsndfile_' + _machine() + '.dylib' _libname = 'libsndfile.dylib' elif _sys.platform == 'win32': from platform import architecture as _architecture From ad56e129d99b1cf88dce64b9c75fcc0d1eccb4c4 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Wed, 16 Feb 2022 03:59:31 -0800 Subject: [PATCH 09/18] Add Python testing workflow. --- .github/workflows/python-package.yml | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/python-package.yml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..edc399a --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,45 @@ +name: Python Package + +on: [push, pull_request] + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, windows-2019, macos-10.15] + python-version: + - "3.6" + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "pypy-3.7" + - "pypy-3.8" + architecture: ["x86", "x64"] + exclude: + - os: macos-10.15 # Can't compile Numpy for this implementation. + python-version: "pypy-3.7" + - os: macos-10.15 + architecture: "x86" + - os: ubuntu-20.04 + architecture: "x86" + + steps: + - name: Install APT dependencies + if: runner.os == 'Linux' + run: sudo apt-get install libsndfile1 + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.architecture }} + - name: Install requirements + run: pip install numpy pytest + - name: Install editable package + run: pip install --editable . --verbose + - name: Run tests + run: python -m pytest From 5a3f6437ec8372389c07ebf749d5acbdabe9efc5 Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Wed, 23 Feb 2022 09:18:14 +0100 Subject: [PATCH 10/18] fixes setup.py for macOS release target is now 10.9, for 64bit intel and arm. Older versions of macOS may or may not work. 32bit certainly does not work with the provided binaries. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 2cc58f9..6479334 100644 --- a/setup.py +++ b/setup.py @@ -60,9 +60,9 @@ def get_tag(self): pythons = 'py2.py3' if platform == 'darwin': if architecture0 == 'x86_64': - oses = 'macosx-10.x-x86_64' + oses = 'macosx_10_9_x86_64' else: - oses = 'macosx-10.x-arm64' + oses = 'macosx_10_9_arm64' elif platform == 'win32': if architecture0 == '32bit': oses = 'win32' From fef01efd48b78fbb599fed9da8218b1370e00521 Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Wed, 2 Mar 2022 09:50:24 +0100 Subject: [PATCH 11/18] fixes macOS plaform tags, again hopefully correctly, this time. I really wish there was any sort of documentation on this stuff. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 6479334..a6a9c65 100644 --- a/setup.py +++ b/setup.py @@ -60,9 +60,9 @@ def get_tag(self): pythons = 'py2.py3' if platform == 'darwin': if architecture0 == 'x86_64': - oses = 'macosx_10_9_x86_64' + oses = 'macosx_10_9_x86_64.macosx_11_0_x86_64' else: - oses = 'macosx_10_9_arm64' + oses = 'macosx_11_0_arm64' elif platform == 'win32': if architecture0 == '32bit': oses = 'win32' From c3a30eba598b9463b697af313b350210956f3186 Mon Sep 17 00:00:00 2001 From: btd Date: Tue, 17 May 2022 16:23:59 +0200 Subject: [PATCH 12/18] adds MP3 support --- soundfile.py | 63 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/soundfile.py b/soundfile.py index 3cbd282..ee98de3 100644 --- a/soundfile.py +++ b/soundfile.py @@ -61,36 +61,44 @@ 'OGG': 0x200000, # Xiph OGG container 'MPC2K': 0x210000, # Akai MPC 2000 sampler 'RF64': 0x220000, # RF64 WAV file + 'MPEG': 0x230000, # MPEG-1/2 audio stream } _subtypes = { - 'PCM_S8': 0x0001, # Signed 8 bit data - 'PCM_16': 0x0002, # Signed 16 bit data - 'PCM_24': 0x0003, # Signed 24 bit data - 'PCM_32': 0x0004, # Signed 32 bit data - 'PCM_U8': 0x0005, # Unsigned 8 bit data (WAV and RAW only) - 'FLOAT': 0x0006, # 32 bit float data - 'DOUBLE': 0x0007, # 64 bit float data - 'ULAW': 0x0010, # U-Law encoded. - 'ALAW': 0x0011, # A-Law encoded. - 'IMA_ADPCM': 0x0012, # IMA ADPCM. - 'MS_ADPCM': 0x0013, # Microsoft ADPCM. - 'GSM610': 0x0020, # GSM 6.10 encoding. - 'VOX_ADPCM': 0x0021, # OKI / Dialogix ADPCM - 'G721_32': 0x0030, # 32kbs G721 ADPCM encoding. - 'G723_24': 0x0031, # 24kbs G723 ADPCM encoding. - 'G723_40': 0x0032, # 40kbs G723 ADPCM encoding. - 'DWVW_12': 0x0040, # 12 bit Delta Width Variable Word encoding. - 'DWVW_16': 0x0041, # 16 bit Delta Width Variable Word encoding. - 'DWVW_24': 0x0042, # 24 bit Delta Width Variable Word encoding. - 'DWVW_N': 0x0043, # N bit Delta Width Variable Word encoding. - 'DPCM_8': 0x0050, # 8 bit differential PCM (XI only) - 'DPCM_16': 0x0051, # 16 bit differential PCM (XI only) - 'VORBIS': 0x0060, # Xiph Vorbis encoding. - 'ALAC_16': 0x0070, # Apple Lossless Audio Codec (16 bit). - 'ALAC_20': 0x0071, # Apple Lossless Audio Codec (20 bit). - 'ALAC_24': 0x0072, # Apple Lossless Audio Codec (24 bit). - 'ALAC_32': 0x0073, # Apple Lossless Audio Codec (32 bit). + 'PCM_S8': 0x0001, # Signed 8 bit data + 'PCM_16': 0x0002, # Signed 16 bit data + 'PCM_24': 0x0003, # Signed 24 bit data + 'PCM_32': 0x0004, # Signed 32 bit data + 'PCM_U8': 0x0005, # Unsigned 8 bit data (WAV and RAW only) + 'FLOAT': 0x0006, # 32 bit float data + 'DOUBLE': 0x0007, # 64 bit float data + 'ULAW': 0x0010, # U-Law encoded. + 'ALAW': 0x0011, # A-Law encoded. + 'IMA_ADPCM': 0x0012, # IMA ADPCM. + 'MS_ADPCM': 0x0013, # Microsoft ADPCM. + 'GSM610': 0x0020, # GSM 6.10 encoding. + 'VOX_ADPCM': 0x0021, # OKI / Dialogix ADPCM + 'NMS_ADPCM_16': 0x0022, # 16kbs NMS G721-variant encoding. + 'NMS_ADPCM_24': 0x0023, # 24kbs NMS G721-variant encoding. + 'NMS_ADPCM_32': 0x0024, # 32kbs NMS G721-variant encoding. + 'G721_32': 0x0030, # 32kbs G721 ADPCM encoding. + 'G723_24': 0x0031, # 24kbs G723 ADPCM encoding. + 'G723_40': 0x0032, # 40kbs G723 ADPCM encoding. + 'DWVW_12': 0x0040, # 12 bit Delta Width Variable Word encoding. + 'DWVW_16': 0x0041, # 16 bit Delta Width Variable Word encoding. + 'DWVW_24': 0x0042, # 24 bit Delta Width Variable Word encoding. + 'DWVW_N': 0x0043, # N bit Delta Width Variable Word encoding. + 'DPCM_8': 0x0050, # 8 bit differential PCM (XI only) + 'DPCM_16': 0x0051, # 16 bit differential PCM (XI only) + 'VORBIS': 0x0060, # Xiph Vorbis encoding. + 'OPUS': 0x0064, # Xiph/Skype Opus encoding. + 'ALAC_16': 0x0070, # Apple Lossless Audio Codec (16 bit). + 'ALAC_20': 0x0071, # Apple Lossless Audio Codec (20 bit). + 'ALAC_24': 0x0072, # Apple Lossless Audio Codec (24 bit). + 'ALAC_32': 0x0073, # Apple Lossless Audio Codec (32 bit). + 'MPEG_LAYER_I': 0x0080, # MPEG-1 Audio Layer I. + 'MPEG_LAYER_II': 0x0081, # MPEG-1 Audio Layer II. + 'MPEG_LAYER_III': 0x0082, # MPEG-2 Audio Layer III. } _endians = { @@ -127,6 +135,7 @@ 'OGG': 'VORBIS', 'MPC2K': 'PCM_16', 'RF64': 'PCM_16', + 'MPEG': 'MPEG_LAYER_III', } _ffi_types = { From 74aa5e1be3e4478a15572b76c8ae337f0fc7651a Mon Sep 17 00:00:00 2001 From: btd Date: Tue, 17 May 2022 16:24:18 +0200 Subject: [PATCH 13/18] improves macOS ARM platform tags --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a6a9c65..655f753 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ def get_tag(self): if architecture0 == 'x86_64': oses = 'macosx_10_9_x86_64.macosx_11_0_x86_64' else: - oses = 'macosx_11_0_arm64' + oses = 'macosx_10_9_arm64.macosx_11_0_arm64' elif platform == 'win32': if architecture0 == '32bit': oses = 'win32' From c8b26169c8a69c6848d9d4a2da2be90141a5edc8 Mon Sep 17 00:00:00 2001 From: btd Date: Tue, 17 May 2022 16:34:40 +0200 Subject: [PATCH 14/18] updates soundfile_data to updated binaries --- _soundfile_data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_soundfile_data b/_soundfile_data index 05ed9cb..96b5506 160000 --- a/_soundfile_data +++ b/_soundfile_data @@ -1 +1 @@ -Subproject commit 05ed9cbbb5e2727b705b4d7ca5df1d67dd674b11 +Subproject commit 96b5506f9c81768dff3c6e74eaa59ad844229522 From 8caf3c7338d02eb2963641118276d3c43bc0966c Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Thu, 2 Jun 2022 09:56:21 +0200 Subject: [PATCH 15/18] fixes MP3 support and M1 binaries No longer assumes *.MP3 files to have the *.MPEG file extension M1 binaries should correctly support MP3 this time (thank you @faroit!) --- _soundfile_data | 2 +- soundfile.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_soundfile_data b/_soundfile_data index 96b5506..2069e57 160000 --- a/_soundfile_data +++ b/_soundfile_data @@ -1 +1 @@ -Subproject commit 96b5506f9c81768dff3c6e74eaa59ad844229522 +Subproject commit 2069e571b693f3ffb8a3b2208276c9d477ea9849 diff --git a/soundfile.py b/soundfile.py index ee98de3..22f5bba 100644 --- a/soundfile.py +++ b/soundfile.py @@ -61,7 +61,7 @@ 'OGG': 0x200000, # Xiph OGG container 'MPC2K': 0x210000, # Akai MPC 2000 sampler 'RF64': 0x220000, # RF64 WAV file - 'MPEG': 0x230000, # MPEG-1/2 audio stream + 'MP3': 0x230000, # MPEG-1/2 audio stream } _subtypes = { @@ -135,7 +135,7 @@ 'OGG': 'VORBIS', 'MPC2K': 'PCM_16', 'RF64': 'PCM_16', - 'MPEG': 'MPEG_LAYER_III', + 'MP3': 'MPEG_LAYER_III', } _ffi_types = { From 6312d9eddb4205510fe3045164fe47d1bb421f72 Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Thu, 2 Jun 2022 10:16:11 +0200 Subject: [PATCH 16/18] updates changelog --- README.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index b920fcc..99e7e59 100644 --- a/README.rst +++ b/README.rst @@ -293,16 +293,17 @@ News - Improves import time by using CFFI's out of line mode. - Adds a build script for building distributions. -2022-02-16 V0.11.0 Bastian Bechtold: +2022-06-02 V0.11.0 Bastian Bechtold: Thank you, tennies, Hannes Helmholz, Christoph Boeddeker, Matt Vollrath, Matthias Geier, Jacek Konieczny, Boris Verkhovskiy, Jonas Haag, Eduardo Moguillansky, Panos Laganakos, Jarvy Jarvison, - Domingo Ramirez, Tim Chagnon, Kyle Benesch + Domingo Ramirez, Tim Chagnon, Kyle Benesch, Fabian-Robert Stöter + - MP3 support - Adds binary wheels for macOS M1 - Improves compatibility with macOS, specifically for M1 machines - Fixes file descriptor open for binary wheels on Windows and Python 3.5+ - - Updates libsndfile to v1.0.31 + - Updates libsndfile to v1.1.0 - Adds get_strings method for retrieving all metadata at once - Improves documentation, error messages and tests - Displays length of very short files in samples From 84196f564d5a16c684c58df6494a6864f5ec0674 Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Thu, 18 Aug 2022 08:26:52 +0200 Subject: [PATCH 17/18] updates libsndfile binaries for macOS/Intel --- _soundfile_data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_soundfile_data b/_soundfile_data index 2069e57..b8c1068 160000 --- a/_soundfile_data +++ b/_soundfile_data @@ -1 +1 @@ -Subproject commit 2069e571b693f3ffb8a3b2208276c9d477ea9849 +Subproject commit b8c1068631a4d4d89eade9fb55c345d29fa3eb7c From c426f5637563fa54fcf29c84aa0b49378a303223 Mon Sep 17 00:00:00 2001 From: Bastian Bechtold Date: Tue, 27 Sep 2022 08:40:34 +0200 Subject: [PATCH 18/18] updates libsndfile binaries and thank you section --- README.rst | 3 ++- _soundfile_data | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 99e7e59..647a644 100644 --- a/README.rst +++ b/README.rst @@ -297,7 +297,8 @@ News Thank you, tennies, Hannes Helmholz, Christoph Boeddeker, Matt Vollrath, Matthias Geier, Jacek Konieczny, Boris Verkhovskiy, Jonas Haag, Eduardo Moguillansky, Panos Laganakos, Jarvy Jarvison, - Domingo Ramirez, Tim Chagnon, Kyle Benesch, Fabian-Robert Stöter + Domingo Ramirez, Tim Chagnon, Kyle Benesch, Fabian-Robert Stöter, + Joe Todd - MP3 support - Adds binary wheels for macOS M1 diff --git a/_soundfile_data b/_soundfile_data index b8c1068..4bd2073 160000 --- a/_soundfile_data +++ b/_soundfile_data @@ -1 +1 @@ -Subproject commit b8c1068631a4d4d89eade9fb55c345d29fa3eb7c +Subproject commit 4bd2073585337484c287b5f6da51702855228b69