Replace ArrayBufferTarget with BufferTarget, now spitting out Uint8Array and using .resize

This commit is contained in:
Vanilagy
2025-01-05 14:24:06 +01:00
parent ee81e1b674
commit 37820f1d4c
6 changed files with 63 additions and 40 deletions
+3 -9
View File
@@ -390,10 +390,8 @@ export const buildAudioCodecString = (codec: AudioCodec, numberOfChannels: numbe
return 'vorbis';
} else if (codec === 'flac') {
return 'flac';
} else if (codec === 'ulaw') {
return 'ulaw';
} else if (codec === 'alaw') {
return 'alaw';
} else if ((PCM_CODECS as readonly string[]).includes(codec)) {
return codec;
}
throw new TypeError(`Unhandled codec '${codec}'.`);
@@ -427,12 +425,8 @@ export const extractAudioCodecString = (trackInfo: {
return 'vorbis';
} else if (codec === 'flac') {
return 'flac';
} else if (codec?.startsWith('pcm-')) {
} else if (codec && (PCM_CODECS as readonly string[]).includes(codec)) {
return codec;
} else if (codec === 'ulaw') {
return 'ulaw';
} else if (codec === 'alaw') {
return 'alaw';
}
throw new TypeError(`Unhandled codec '${codec}'.`);