Skip to content

🎥 Make videos programmatically with React

`@remotion/renderer`: align bytes per sample

Jonny Burger49f034440dbf
diff --git a/packages/renderer/src/assets/inline-audio-mixing.ts b/packages/renderer/src/assets/inline-audio-mixing.ts
index fc348d0fe7..b46d930952 100644
--- a/packages/renderer/src/assets/inline-audio-mixing.ts
+++ b/packages/renderer/src/assets/inline-audio-mixing.ts
@@ -196,12 +196,10 @@ export const makeInlineAudioMixing = (dir: string) => {
const positionInSeconds =
(asset.frame - firstFrame) / fps - (isFirst ? 0 : trimLeftOffset);
- const position = Math.round(
- positionInSeconds *
- asset.numberOfChannels *
- DEFAULT_SAMPLE_RATE *
- BYTES_PER_SAMPLE,
- );
+ const position =
+ Math.round(positionInSeconds * DEFAULT_SAMPLE_RATE) *
+ asset.numberOfChannels *
+ BYTES_PER_SAMPLE;
writeSync(
// fs