mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-30 04:13:51 +02:00
Fix faultily written Xing frame
This commit is contained in:
@@ -67,7 +67,12 @@ export class Mp3Writer {
|
||||
const firstByte = 0xff;
|
||||
const secondByte = 0xe0 | (data.mpegVersionId << 3) | (data.layer << 1);
|
||||
|
||||
const lowSamplingFrequency = data.mpegVersionId & 1;
|
||||
let lowSamplingFrequency: number;
|
||||
if (data.mpegVersionId & 2) {
|
||||
lowSamplingFrequency = (data.mpegVersionId & 1) ? 0 : 1;
|
||||
} else {
|
||||
lowSamplingFrequency = 1;
|
||||
}
|
||||
|
||||
const padding = 0;
|
||||
const neededBytes = 155;
|
||||
|
||||
Reference in New Issue
Block a user