Skip to content

Commit 88cd3ac

Browse files
committed
fix: ts error
1 parent 4988d2e commit 88cd3ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/lib/audio.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export class AudioHandler {
5454
const uint8Data = new Uint8Array(int16Data.buffer);
5555
onChunk(uint8Data);
5656
// save recordBuffer
57+
// @ts-ignore
5758
this.recordBuffer.push.apply(this.recordBuffer, int16Data);
5859
}
5960
};
@@ -95,6 +96,7 @@ export class AudioHandler {
9596
if (!this.isPlaying) return;
9697

9798
const int16Data = new Int16Array(chunk.buffer);
99+
// @ts-ignore
98100
this.playBuffer.push.apply(this.playBuffer, int16Data); // save playBuffer
99101

100102
const float32Data = new Float32Array(int16Data.length);
@@ -155,6 +157,7 @@ export class AudioHandler {
155157
return new Blob([view, data.buffer], { type: "audio/mpeg" });
156158
}
157159
savePlayFile() {
160+
// @ts-ignore
158161
return this._saveData(new Int16Array(this.playBuffer));
159162
}
160163
saveRecordFile(
@@ -168,6 +171,7 @@ export class AudioHandler {
168171
? Math.floor((audioEndMillis * this.sampleRate) / 1000)
169172
: this.recordBuffer.length;
170173
return this._saveData(
174+
// @ts-ignore
171175
new Int16Array(this.recordBuffer.slice(startIndex, endIndex)),
172176
);
173177
}

0 commit comments

Comments
 (0)