Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multichannel support for AudioFormatReader::searchForLevel #1177

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

acendan
Copy link

@acendan acendan commented Dec 24, 2022

AudioFormatReader::searchForLevel currently just checks the first two channels in a given file, regardless of channel count. The screenshots below show a simple command line utility I wrote, which checks for the first and last non-zero samples in an audio file, regardless of channel count. The bottom two files in the table include results from analyzing multi-channel files after making this change, with 8- and 10-channel files respectively.

image
image

searchForLevel currently just checks the first two channels in a given file, regardless of channel count
@acendan
Copy link
Author

acendan commented Dec 24, 2022

For additional context, the current version would just stop at the second channel altogether and silently miss the non-zeros on any channels thereafter:
image

Use std::vector for tempBuffer, cleanup spaces vs. tabs to match JUCE repo, and correct usage of intMagnitudeRangeMinimum/intMagnitudeRangeMaximum
@acendan
Copy link
Author

acendan commented Dec 25, 2022

I've definitely filled out and signed the CLA... not sure why the check-CLA validation failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant