[fix] increased playback rate

This commit is contained in:
xdrm-brackets 2018-04-06 02:25:37 +02:00
parent f5b8440208
commit 3ed9f6b4d3
1 changed files with 3 additions and 2 deletions

View File

@ -109,7 +109,9 @@ export default class AudioManager{
let buf32 = this.i16tof32(_buffer);
/* (2) Create source node */
let source = this.ctx.createBufferSource();
let source = this.ctx.createBufferSource({
playbackRate: 1.1
});
/* (3) Create buffer and dump data */
let input_buffer = this.ctx.createBuffer(1, AudioManager.BUFFER_SIZE, this.ctx.sampleRate);
@ -120,7 +122,6 @@ export default class AudioManager{
/* (5) Connect and play audio */
source.connect(this.gain);
source.playbackRate = 1.1;
source.start(0);
}