[fix][fix] increased playback rate
This commit is contained in:
parent
3ed9f6b4d3
commit
10bd316093
|
@ -109,7 +109,7 @@ export default class AudioManager{
|
||||||
let buf32 = this.i16tof32(_buffer);
|
let buf32 = this.i16tof32(_buffer);
|
||||||
|
|
||||||
/* (2) Create source node */
|
/* (2) Create source node */
|
||||||
let source = this.ctx.createBufferSource({
|
this.network.in = new AudioBufferSourceNode(this.ctx, {
|
||||||
playbackRate: 1.1
|
playbackRate: 1.1
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -118,11 +118,11 @@ export default class AudioManager{
|
||||||
input_buffer.getChannelData(0).set(buf32);
|
input_buffer.getChannelData(0).set(buf32);
|
||||||
|
|
||||||
/* (4) Pass buffer to source node */
|
/* (4) Pass buffer to source node */
|
||||||
source.buffer = input_buffer;
|
this.network.in.buffer = input_buffer;
|
||||||
|
|
||||||
/* (5) Connect and play audio */
|
/* (5) Connect and play audio */
|
||||||
source.connect(this.gain);
|
this.network.in.connect(this.gain);
|
||||||
source.start(0);
|
this.network.in.start(0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue