sbooth / SFBAudioEngine

A powerhouse of audio functionality for macOS and iOS
https://sbooth.github.io/SFBAudioEngine/
MIT License
552 stars 87 forks source link

Lack of content type detection #333

Closed sbooth closed 1 month ago

sbooth commented 2 months ago

Several AudioDecoder subclasses handle files with the ogg extension and there is no way to disambiguate the content type to discern whether it is Vorbis, FLAC, Speex, etc.

This is actually a more general problem with the extension-based content type resolution. Perhaps for seekable input each decoder should have the ability to peek at the first n bytes of input and make a best guess on whether the format is supported.