[fix] increased playback rate
This commit is contained in:
parent
f5b8440208
commit
3ed9f6b4d3
|
@ -109,7 +109,9 @@ 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();
|
let source = this.ctx.createBufferSource({
|
||||||
|
playbackRate: 1.1
|
||||||
|
});
|
||||||
|
|
||||||
/* (3) Create buffer and dump data */
|
/* (3) Create buffer and dump data */
|
||||||
let input_buffer = this.ctx.createBuffer(1, AudioManager.BUFFER_SIZE, this.ctx.sampleRate);
|
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 */
|
/* (5) Connect and play audio */
|
||||||
source.connect(this.gain);
|
source.connect(this.gain);
|
||||||
source.playbackRate = 1.1;
|
|
||||||
source.start(0);
|
source.start(0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue