Skip to content

add M4A, FLAC, OGG audio types and IsAudio() extension methods#50

Open
wilsonwc wants to merge 1 commit intoAJMitev:masterfrom
wilsonwc:feature/add-audio-formats
Open

add M4A, FLAC, OGG audio types and IsAudio() extension methods#50
wilsonwc wants to merge 1 commit intoAJMitev:masterfrom
wilsonwc:feature/add-audio-formats

Conversation

@wilsonwc
Copy link
Copy Markdown

Summary

  • Add M4A file type — ftyp box with M4A/M4B brand (audio/mp4), distinguishing MPEG-4 audio from video MP4
  • Add FLAC file type — fLaC magic marker (audio/flac)
  • Add OGG file type — OggS capture pattern (audio/ogg)
  • Add IsAudio() / IsAudioAsync() convenience methods on Stream, byte[], and ReadOnlySpan<byte>, following the existing IsImage / IsArchive / IsExecutable / IsDocument pattern
  • 27 new test cases across sync, async, and byte array test suites
  • Test audio files generated with ffmpeg (sine wave, no copyrighted content)

New file type definitions:
- M4A: ftyp box with M4A/M4B brand (audio/mp4)
- FLAC: fLaC magic marker (audio/flac)
- OGG: OggS capture pattern (audio/ogg)

New IsAudio() convenience methods on Stream, byte[], and
ReadOnlySpan<byte>, plus async variants, matching the existing
IsImage/IsArchive/IsExecutable/IsDocument pattern.

Includes test files and 27 new test cases across sync, async,
and byte array test suites.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants