-
Notifications
You must be signed in to change notification settings - Fork 58
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
channel default volume is unusual #33
Comments
@belm0 By the way, the volume value is calculated internally as a square ( |
I was going to say something about this requiring a 64-bit intermediate value for each sample unless some optimizations are done, but then I realized that the code is using a float buffer. I'm a little surprised because float is not very fast on ESP32, so I guess this is a luxury sound library 😉 |
@belm0 |
I have no doubt that multi-channel, 16-bit sound can be handled well within fixed-point, 32-bit operations. (The PlayStation or early consoles and sound cards had no floating point hardware, etc.) To start, 32-bit dynamic range is really not needed for volume. |
Change I2S port, I2S0 is used when DAC and ADC are used, I2S1 is used otherwise
This ticket can be closed as resolved. Suggesting to create a new ticket if there is a reason to keep track of looking into the use of integers instead of floats (as discussed a bit in comments to this ticket). |
I was surprised that the channel default volume is 64. In audio designs, usually channel volume is attenuation only. So I'd expect the default to be the maximum (255).
Otherwise, the master volume doesn't really mean the "maximum volume", and some channels may have a volume equivalent to a master volume of 1024...
M5Unified/src/utility/Speaker_Class.hpp
Line 234 in 42717f0
The text was updated successfully, but these errors were encountered: