File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ export class AudioHandler {
54
54
const uint8Data = new Uint8Array ( int16Data . buffer ) ;
55
55
onChunk ( uint8Data ) ;
56
56
// save recordBuffer
57
+ // @ts -ignore
57
58
this . recordBuffer . push . apply ( this . recordBuffer , int16Data ) ;
58
59
}
59
60
} ;
@@ -95,6 +96,7 @@ export class AudioHandler {
95
96
if ( ! this . isPlaying ) return ;
96
97
97
98
const int16Data = new Int16Array ( chunk . buffer ) ;
99
+ // @ts -ignore
98
100
this . playBuffer . push . apply ( this . playBuffer , int16Data ) ; // save playBuffer
99
101
100
102
const float32Data = new Float32Array ( int16Data . length ) ;
@@ -155,6 +157,7 @@ export class AudioHandler {
155
157
return new Blob ( [ view , data . buffer ] , { type : "audio/mpeg" } ) ;
156
158
}
157
159
savePlayFile ( ) {
160
+ // @ts -ignore
158
161
return this . _saveData ( new Int16Array ( this . playBuffer ) ) ;
159
162
}
160
163
saveRecordFile (
@@ -168,6 +171,7 @@ export class AudioHandler {
168
171
? Math . floor ( ( audioEndMillis * this . sampleRate ) / 1000 )
169
172
: this . recordBuffer . length ;
170
173
return this . _saveData (
174
+ // @ts -ignore
171
175
new Int16Array ( this . recordBuffer . slice ( startIndex , endIndex ) ) ,
172
176
) ;
173
177
}
You can’t perform that action at this time.
0 commit comments