Closed zachfeldman closed 1 year ago
@JohnAZoidberg any tips on how to solve the problem with the build? It seems like some of the crates are defining duplicate symbols but not even sure where to start debugging that :)...
@JohnAZoidberg any tips on how to solve the problem with the build? It seems like some of the crates are defining duplicate symbols but not even sure where to start debugging that :)...
You've got AnalyzerResult
twice in the code. Just need to remove that.
Oh you mean = note: rust-lld: error: duplicate symbol: _rphal_unsigned_divmod
when building the FW, not the tool.
Yeah... that's because it tried to build with multiple different incompatible versions of the rp2040-hal crate.
I thought I had fixed it already.
Can confirm it works
@JohnAZoidberg no rush at all, but I think this is ready for another review when you are.
Thanks for the help whipping it into shape!
@JohnAZoidberg I made the audio-visualizations
an optional feature but for some reason even when I build without it the Cargo.lock
still gets updated. I restored the one from main
, but should I just push the modified one when I build? I imagine next time someone does a build it'll get modified anyway, and the main thing that'll improve build times is making it an optional feature, it may not matter that the Cargo.lock
is longer now, right?
EDIT: A bit of Googling made me realize this is expected behavior https://github.com/rust-lang/cargo/issues/10801 so I removed the commit to restore Cargo.lock
. Build times are still faster with this as an opt-in feature
and it's clear it's just in the Cargo.lock as part of how this currently works.
Yeah, that's perfectly fine. A bit odd, but does no harm.
Alright, let's go ahead and merge this! Feel free to improve upon it.
Trying to work with an example at https://github.com/Rahix/visualizer2/blob/canon/README.md and @JohnAZoidberg 's boilerplate
eq
module code to get theledmatrix
to show a rough waveform of actual current audio input!Got it working at this point. This is just grabbing the audio input stream with some Rust wrappers for it
cpal
https://github.com/RustAudio/cpal and https://github.com/diwic/alsa-rs to access the underlyingalsa
layer at the system level.Demo: https://photos.app.goo.gl/C6NMsZdKnLAnXpwW9
Testing Instructions
cargo run --target x86_64-unknown-linux-gnu -p inputmodule-control led-matrix --input-eq
Then make some noise, assuming your microphone/input is on - try clapping, singing, putting on some music decently loudly, etc!
Next on the to-do list:
len is 34 but the index is 34
error (probably a relatively simple one to solve with how I'm constructing thevec
)info.volume as u8
code. I tried usingvec![info.volume as u8; 8]
but I kept getting an array index out of bounds error too