Fixed #12: Add sniffer for .dff
This commit is contained in:
parent
15e340eac4
commit
60c15894c0
@ -12,6 +12,7 @@ var snifferRegistry = map[string]Sniffer{
|
|||||||
".wav": SnifferWAV,
|
".wav": SnifferWAV,
|
||||||
".wma": SnifferWMA,
|
".wma": SnifferWMA,
|
||||||
".aac": SnifferAAC,
|
".aac": SnifferAAC,
|
||||||
|
".dff": SnifferDFF,
|
||||||
}
|
}
|
||||||
|
|
||||||
func SniffAll(header []byte) (string, bool) {
|
func SniffAll(header []byte) (string, bool) {
|
||||||
@ -46,3 +47,9 @@ func SnifferWMA(header []byte) bool {
|
|||||||
func SnifferAAC(header []byte) bool {
|
func SnifferAAC(header []byte) bool {
|
||||||
return bytes.HasPrefix(header, []byte{0xFF, 0xF1})
|
return bytes.HasPrefix(header, []byte{0xFF, 0xF1})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SnifferDFF sniff a DSDIFF format
|
||||||
|
// reference to: https://www.sonicstudio.com/pdf/dsd/DSDIFF_1.5_Spec.pdf
|
||||||
|
func SnifferDFF(header []byte) bool {
|
||||||
|
return bytes.HasPrefix(header, []byte("FRM8"))
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user