AkiyukiOkayasu / pacmog

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

Improve handling of AIFF-C compression type #62

Closed AkiyukiOkayasu closed 2 months ago

AkiyukiOkayasu commented 2 months ago

In pacmog v0.4.2, the following AIFF-C compression types were supported: https://github.com/AkiyukiOkayasu/pacmog/blob/80de8c212848956424fe99f4ce177dd0eb305c5b/src/aiff.rs#L72-L77

These types are compatible with most commonly used AIFF files. However, they are insufficient for certain edge cases:

Related issues:

Additionally, there are rare cases where the bit-depth specified in the COMMON chunk does not match the bit-depth assumed by the compression type:

This PR improves the handling of AIFF-C compression types. If the compression type is present and not 'NONE', the bit-depth specified in the COMMON chunk is overwritten with the value corresponding to the compression type.

AkiyukiOkayasu commented 2 months ago

List of supported compression types. https://github.com/AkiyukiOkayasu/pacmog/blob/6f053165d25ee9f894fd1276340259a99323b413/src/aiff.rs#L154-L170