[xmly] chore: remember to free after work

This commit is contained in:
鲁树人 2024-09-18 23:30:04 +01:00
parent e8b220b3df
commit 1cdd68e448

View File

@ -52,6 +52,7 @@ export class XimalayaPCDecipher implements DecipherInstance {
const encryptedAudioPart = buffer.slice(encryptedHeaderOffset, plainAudioDataOffset); const encryptedAudioPart = buffer.slice(encryptedHeaderOffset, plainAudioDataOffset);
const encryptedAudioPartLen = xm.decrypt(encryptedAudioPart); const encryptedAudioPartLen = xm.decrypt(encryptedAudioPart);
const audioSize = audioHeader.byteLength + encryptedAudioPartLen + plainAudioDataLength; const audioSize = audioHeader.byteLength + encryptedAudioPartLen + plainAudioDataLength;
xm.free();
const result = new Uint8Array(audioSize); const result = new Uint8Array(audioSize);
result.set(audioHeader); result.set(audioHeader);