Fix error context sound meter (#1009)
This commit is contained in:
parent
6e868408ed
commit
bd4cf5d7f7
@ -17,7 +17,6 @@ export class SoundMeter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private init(context: AudioContext) {
|
private init(context: AudioContext) {
|
||||||
if (this.context === undefined) {
|
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.analyser = this.context.createAnalyser();
|
this.analyser = this.context.createAnalyser();
|
||||||
|
|
||||||
@ -25,7 +24,6 @@ export class SoundMeter {
|
|||||||
const bufferLength = this.analyser.fftSize;
|
const bufferLength = this.analyser.fftSize;
|
||||||
this.dataArray = new Uint8Array(bufferLength);
|
this.dataArray = new Uint8Array(bufferLength);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public connectToSource(stream: MediaStream, context: AudioContext): void
|
public connectToSource(stream: MediaStream, context: AudioContext): void
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user