Skip to content

Commit

Permalink
rev
Browse files Browse the repository at this point in the history
  • Loading branch information
ksyeo1010 committed Jul 19, 2023
1 parent a50fa9e commit ccb24ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/resampler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ class Resampler {
}

const memoryBuffer = new Int16Array(this._wasmMemory.buffer);
const memoryBufferView = new DataView(this._wasmMemory.buffer);

memoryBuffer.set(
inputBuffer,
Expand All @@ -272,6 +271,9 @@ class Resampler {
inputFrame.length,
this._outputBufferAddress,
);

const memoryBufferView = new DataView(this._wasmMemory.buffer);

for (let i = 0; i < processedSamples; i++) {
outputBuffer[i] = memoryBufferView.getInt16(
this._outputBufferAddress + i * Int16Array.BYTES_PER_ELEMENT,
Expand Down

0 comments on commit ccb24ed

Please sign in to comment.