Просмотр исходного кода

Tweak looping sources to maybe fix a popping problem

master
Fen Dweller 4 лет назад
Родитель
Сommit
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);


Загрузка…
Отмена
Сохранить