feat(20-01): implement OGG Vorbis tag writer with custom page parser and CRC32
- Custom OGG page parser/writer with MSB-first CRC32 lookup table (ogg.go) - Vorbis Comment packet parse/serialize with raw byte preservation (ogg_vorbis.go) - METADATA_BLOCK_PICTURE base64 encoding for cover art with legacy field stripping - Multi-stream and non-Vorbis OGG rejection with clear error messages - Pipeline integration: FormatOGG constant, .ogg in DetectFormat, writeOggTags dispatch - Lenient-read/strict-write: warn on CRC mismatch, always write correct CRCs - Page sequence renumbering and crash-safe writes via AtomicWrite
This commit is contained in:
@@ -38,6 +38,8 @@ const (
|
||||
FormatFLAC AudioFormat = "flac"
|
||||
// FormatWAV is the WAV audio format.
|
||||
FormatWAV AudioFormat = "wav"
|
||||
// FormatOGG is the OGG Vorbis audio format.
|
||||
FormatOGG AudioFormat = "ogg"
|
||||
)
|
||||
|
||||
// errUnsupportedFormat is returned when the audio format is not supported.
|
||||
@@ -54,6 +56,8 @@ func DetectFormat(filePath string) (AudioFormat, error) {
|
||||
return FormatFLAC, nil
|
||||
case ".wav":
|
||||
return FormatWAV, nil
|
||||
case ".ogg":
|
||||
return FormatOGG, nil
|
||||
default:
|
||||
return "", fmt.Errorf("%w: %s", errUnsupportedFormat, ext)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user