added dsf support, reusing the existing ID3 parser (#43)

This commit is contained in:
ilkomiliev
2018-11-05 09:57:29 +11:00
committed by David Howden
parent 34f7f1e3c8
commit a9f04c2798
6 changed files with 164 additions and 6 deletions
+4
View File
@@ -50,6 +50,9 @@ func ReadFrom(r io.ReadSeeker) (Metadata, error) {
case string(b[0:3]) == "ID3":
return ReadID3v2Tags(r)
case string(b[0:4]) == "DSD ":
return ReadDSFTags(r)
}
m, err := ReadID3v1Tags(r)
@@ -91,6 +94,7 @@ const (
ALAC FileType = "ALAC" // Apple Lossless file FIXME: actually detect this
FLAC FileType = "FLAC" // FLAC file
OGG FileType = "OGG" // OGG file
DSF FileType = "DSF" // DSF file DSD Sony format see https://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf
)
// Metadata is an interface which is used to describe metadata retrieved by this package.