Skip to content

πŸŽ› πŸ”Š A Python library for audio.

Add logging to try to track down StackOverflow on Windows.

Peter Sobote5da72421825
diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml
index 43e28b7..ce8a343 100644
--- a/.github/workflows/all.yml
+++ b/.github/workflows/all.yml
@@ -105,7 +105,7 @@ jobs:
run: python ./tests/download_test_plugins.py
- name: Run tests
if: matrix.os != 'ubuntu-latest' || matrix.python-version != '3.6'
- run: pytest -v --cov-report term --cov-fail-under=${{ env.MINIMUM_COVERAGE_PERCENTAGE }} --cov=pedalboard
+ run: pytest -v --cov-report term --cov-fail-under=${{ env.MINIMUM_COVERAGE_PERCENTAGE }} --cov=pedalboard -s
- name: Run tests with coverage reporting
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.6'
run: |
diff --git a/pedalboard/io/AudioFile.h b/pedalboard/io/AudioFile.h
index 414a08f..b9f472e 100644
--- a/pedalboard/io/AudioFile.h
+++ b/pedalboard/io/AudioFile.h
@@ -419,6 +419,7 @@ public:
unsigned int bufferSize = DEFAULT_AUDIO_BUFFER_SIZE_FRAMES>
bool writeConvertingTo(const InputType **channels, int numChannels,
unsigned int numSamples) {
+ printf("in writeConvertingTo with %d %s %d-channel frames, converting to %s\n", numSamples, typeid(InputType).name(), numChannels, typeid(TargetType).name());
std::vector<std::vector<TargetType>> targetTypeBuffers;
targetTypeBuffers.resize(numChannels);
diff --git a/tests/test_io.py b/tests/test_io.py
index 47857cb..6cbd4cc 100644
--- a/tests/test_io.py
+++ b/tests/test_io.py
@@ -287,7 +287,7 @@ def test_basic_write(
tolerance = 0.12
else:
file_bit_depth = int(af.file_dtype.replace("float", "").replace("int", ""))
- tolerance = 4 / (2**file_bit_depth)
+ tolerance = 4 / (2 ** file_bit_depth)
if np.issubdtype(input_format, np.signedinteger):
input_bit_depth = np.dtype(input_format).itemsize * 8
tolerance = 4 / (2 ** min(file_bit_depth, input_bit_depth))