AkiyukiOkayasu / pacmog

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

Remove assert #28

Closed Marekkon5 closed 1 year ago

Marekkon5 commented 1 year ago

Hello, there is an assert which checks the AIFF file size and compares it with header. AIFF files sometimes have a bunch of padding, which causes the assert to fail, even if the entire file is properly decodeable. Also using asserts is bad idea, because users can't handle/catch them.

Thank you.

AkiyukiOkayasu commented 1 year ago

Yes, you are right, asset should not be used. I think size checking of AIFF headers considering padding is necessary, but the user should be informed if the check fails. Anyway, thank you for your contribution.