Skip to content

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

Merged
AJMitev merged 1 commit into
AJMitev:masterfrom
wilsonwc:feature/add-audio-formats
Jun 24, 2026
Merged

add M4A, FLAC, OGG audio types and IsAudio() extension methods#50
AJMitev merged 1 commit into
AJMitev: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.
@AJMitev AJMitev merged commit b830723 into AJMitev:master Jun 24, 2026
1 check passed
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.

3 participants