Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey there, I added a couple of new features:
automatic channel detection: listens noise on every channel with the assumption that no audio is playing, therefore the humming from mics should be louder than a completely dead channels (there's a "bump" noise at the beginning but it gets discarded thanks to a short envelope window).
I tried to make things better with this PR respeaker/seeed-voicecard#309 (comment) but I see that sometimes it doesn't work so I took out the big guns :D
multiple hw ref channels: reespeker 6 mic module has 2 loopback channels. IDK the difference between the two but I allowed the possibility to select both of them so ppl are free to experiment
speex preprocessing: residual echo cancellation from speex improves slighly the output quality for a very small increase of CPU consumption. It's pretty much free to enable so I thought to just add it.
I also added some other preprocess filters but left them commented out, this way people will be free to experiment without spending too much time researching how to enable them.
aligned the code across ec and ec_hw: this way should be easier comparing them side by side and keeping them aligned
free speex echo state: it's always a good thing freeing up resources; since I added the preprocess thing and freed it, I thought to add it also for the echo state. why not :)
clang based linting: to help maintaining coding style for new contributions
============
I'm open to suggestions and improvements on this PR. Let me know if there's anything related to code, style, concepts or algorithims you'd like to change and let's talk about it!