|
|
|
@ -22,6 +22,7 @@ type Decoder struct {
|
|
|
|
|
audio []byte
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//goland:noinspection GoUnusedExportedFunction
|
|
|
|
|
func NewDefaultDecoder(data []byte) common.Decoder {
|
|
|
|
|
return &Decoder{file: data, mask: getDefaultMask()}
|
|
|
|
|
}
|
|
|
|
@ -95,22 +96,29 @@ func (d Decoder) GetMeta() common.Meta {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func DecoderFuncWithExt(ext string) common.NewDecoderFunc {
|
|
|
|
|
return func(file []byte) common.Decoder {
|
|
|
|
|
return &Decoder{file: file, audioExt: ext}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//goland:noinspection SpellCheckingInspection
|
|
|
|
|
func init() {
|
|
|
|
|
common.RegisterDecoder("qmc3", NewDefaultDecoder) //QQ Music Mp3
|
|
|
|
|
common.RegisterDecoder("qmc2", NewDefaultDecoder) //QQ Music Ogg
|
|
|
|
|
common.RegisterDecoder("qmc0", NewDefaultDecoder) //QQ Music Mp3
|
|
|
|
|
common.RegisterDecoder("qmcflac", NewDefaultDecoder) //QQ Music Flac
|
|
|
|
|
common.RegisterDecoder("qmcogg", NewDefaultDecoder) //QQ Music Ogg
|
|
|
|
|
common.RegisterDecoder("tkm", NewDefaultDecoder) //QQ Music Accompaniment M4a
|
|
|
|
|
|
|
|
|
|
common.RegisterDecoder("bkcmp3", NewDefaultDecoder) //Moo Music Mp3
|
|
|
|
|
common.RegisterDecoder("bkcflac", NewDefaultDecoder) //Moo Music Flac
|
|
|
|
|
|
|
|
|
|
common.RegisterDecoder("666c6163", NewDefaultDecoder) //QQ Music Weiyun Flac
|
|
|
|
|
common.RegisterDecoder("6d7033", NewDefaultDecoder) //QQ Music Weiyun Mp3
|
|
|
|
|
common.RegisterDecoder("6f6767", NewDefaultDecoder) //QQ Music Weiyun Ogg
|
|
|
|
|
common.RegisterDecoder("6d3461", NewDefaultDecoder) //QQ Music Weiyun M4a
|
|
|
|
|
common.RegisterDecoder("776176", NewDefaultDecoder) //QQ Music Weiyun Wav
|
|
|
|
|
common.RegisterDecoder("qmc3", DecoderFuncWithExt("mp3")) //QQ Music Mp3
|
|
|
|
|
common.RegisterDecoder("qmc2", DecoderFuncWithExt("ogg")) //QQ Music Ogg
|
|
|
|
|
common.RegisterDecoder("qmc0", DecoderFuncWithExt("mp3")) //QQ Music Mp3
|
|
|
|
|
common.RegisterDecoder("qmcflac", DecoderFuncWithExt("flac")) //QQ Music Flac
|
|
|
|
|
common.RegisterDecoder("qmcogg", DecoderFuncWithExt("ogg")) //QQ Music Ogg
|
|
|
|
|
common.RegisterDecoder("tkm", DecoderFuncWithExt("m4a")) //QQ Music Accompaniment M4a
|
|
|
|
|
|
|
|
|
|
common.RegisterDecoder("bkcmp3", DecoderFuncWithExt("mp3")) //Moo Music Mp3
|
|
|
|
|
common.RegisterDecoder("bkcflac", DecoderFuncWithExt("flac")) //Moo Music Flac
|
|
|
|
|
|
|
|
|
|
common.RegisterDecoder("666c6163", DecoderFuncWithExt("flac")) //QQ Music Weiyun Flac
|
|
|
|
|
common.RegisterDecoder("6d7033", DecoderFuncWithExt("mp3")) //QQ Music Weiyun Mp3
|
|
|
|
|
common.RegisterDecoder("6f6767", DecoderFuncWithExt("ogg")) //QQ Music Weiyun Ogg
|
|
|
|
|
common.RegisterDecoder("6d3461", DecoderFuncWithExt("m4a")) //QQ Music Weiyun M4a
|
|
|
|
|
common.RegisterDecoder("776176", DecoderFuncWithExt("wav")) //QQ Music Weiyun Wav
|
|
|
|
|
|
|
|
|
|
common.RegisterDecoder("mgg", NewMgg256Decoder) //QQ Music Weiyun Wav
|
|
|
|
|
common.RegisterDecoder("mflac", NewMflac256Decoder) //QQ Music Weiyun Wav
|
|
|
|
|