We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 266f43d commit 0f54f32Copy full SHA for 0f54f32
src/modules/WebAudio/index.ts
@@ -22,6 +22,8 @@ export default class WebAudio {
22
}
23
24
get _audioDuration(): number {
25
+ if (!this.audioBuffer)
26
+ throw new Error('can not get duration before audio inited')
27
return this.audioBuffer.duration
28
29
@@ -36,7 +38,7 @@ export default class WebAudio {
36
38
37
39
40
private createFilterData(): Promise<number[][]> {
- const samplingRate: number | undefined = this.props.samplingRate
41
+ const samplingRate: number = this.props.samplingRate as number
42
const channels: number = this.audioBuffer.numberOfChannels
43
const rawDataList: Float32Array[] = []
44
const filteredData: number[][] = []
0 commit comments