Procházet zdrojové kódy

Tweak looping sources to maybe fix a popping problem

master
Fen Dweller před 4 roky
rodič
revize
306835c5f2
1 změnil soubory, kde provedl 2 přidání a 4 odebrání
  1. +2
    -4
      src/sources/LoopingSource.ts

+ 2
- 4
src/sources/LoopingSource.ts Zobrazit soubor

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


Načítá se…
Zrušit
Uložit