ソースを参照

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);


読み込み中…
キャンセル
保存