forked from um/web
Fix .xm file type recognize error
This commit is contained in:
parent
e5bff35f89
commit
8d79035675
@ -1,4 +1,4 @@
|
|||||||
import {AudioMimeType, DetectAudioExt, GetArrayBuffer, GetFileInfo, GetMetaCoverURL, IsBytesEqual} from "./util";
|
import {AudioMimeType, GetArrayBuffer, GetFileInfo, GetMetaCoverURL, IsBytesEqual} from "./util";
|
||||||
|
|
||||||
import {Decrypt as RawDecrypt} from "./raw";
|
import {Decrypt as RawDecrypt} from "./raw";
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ export async function Decrypt(file, raw_filename, raw_ext) {
|
|||||||
for (let cur = dataOffset; cur < lenAudioData; ++cur)
|
for (let cur = dataOffset; cur < lenAudioData; ++cur)
|
||||||
audioData[cur] = (audioData[cur] - key) ^ 0xff;
|
audioData[cur] = (audioData[cur] - key) ^ 0xff;
|
||||||
|
|
||||||
const ext = DetectAudioExt(audioData, "mp3");
|
const ext = FileTypeMap[typeText];
|
||||||
const mime = AudioMimeType[ext];
|
const mime = AudioMimeType[ext];
|
||||||
let musicBlob = new Blob([audioData], {type: mime});
|
let musicBlob = new Blob([audioData], {type: mime});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user