AkiyukiOkayasu / pacmog

PCM decoding library for embedded systems
Apache License 2.0
6 stars 3 forks source link

Extract aiff support to a crate feature. #43

Closed kevinclark closed 2 months ago

kevinclark commented 2 months ago

I'm trying to use pacmog on a Raspberry Pi Pico and it failed to build with no_std. Looks like the issue is that aiff support is using f64::powf which is in std only. I looked into using micomath or libm, but they both only implement powf for f32. Instead, I've extracted the 'aiff' feature flag. It's disabled by default because the README explicitly states no_std working out of the box as a goal. As such, I've bumped the version to 0.5.0 since it's not backwards compatible.

Fixes AkiyukiOkayasu/pacmog#42.

AkiyukiOkayasu commented 2 months ago

Fixed at https://github.com/AkiyukiOkayasu/pacmog/pull/45 . There was no need to rely on f64::powf as it could be handled by bitwise operations, no need to add a feature, and no need to add a feature, as it could be handled by a bitwise operation.