[fix][fix] increased playback rate

This commit is contained in:
xdrm-brackets 2018-04-06 02:30:35 +02:00
parent 3ed9f6b4d3
commit 10bd316093
1 changed files with 4 additions and 4 deletions

View File

@ -109,7 +109,7 @@ export default class AudioManager{
let buf32 = this.i16tof32(_buffer);
/* (2) Create source node */
let source = this.ctx.createBufferSource({
this.network.in = new AudioBufferSourceNode(this.ctx, {
playbackRate: 1.1
});
@ -118,11 +118,11 @@ export default class AudioManager{
input_buffer.getChannelData(0).set(buf32);
/* (4) Pass buffer to source node */
source.buffer = input_buffer;
this.network.in.buffer = input_buffer;
/* (5) Connect and play audio */
source.connect(this.gain);
source.start(0);
this.network.in.connect(this.gain);
this.network.in.start(0);
}