浏览代码

Tweak looping sources to maybe fix a popping problem

master
Fen Dweller 4 年前
父节点
当前提交
306835c5f2
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. +2
    -4
      src/sources/LoopingSource.ts

+ 2
- 4
src/sources/LoopingSource.ts 查看文件

@@ -44,10 +44,8 @@ export class LoopingSource extends Source {
this.source = context.createBufferSource();
this.source.buffer = this.soundSet.soundList[index];
this.source.connect(this.gain);
this.source.onended = () => {
this.pickRandom();
this.source.start();
};
this.source.loop = true;
this.source.loopEnd = this.source.buffer.duration - 0.1;
}
public tick(dt: number): void {
super.tick(dt);


正在加载...
取消
保存