mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-05-14 05:03:25 +08:00
Compare commits
No commits in common. "f014befbbdbcf67566c9df485831e43e77c4eb78" and "0c21d99d57c543d1d2a4a2f1047fda1cf304e9ac" have entirely different histories.
f014befbbd
...
0c21d99d57
@ -78,13 +78,6 @@ export class BgmController<
|
||||
this.mainGain.setVolume(volume);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取总音量大小
|
||||
*/
|
||||
getVolume() {
|
||||
return this.mainGain.getVolume();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否启用
|
||||
* @param enabled 是否启用
|
||||
|
@ -376,16 +376,6 @@ export class AudioRoute
|
||||
) {
|
||||
super();
|
||||
this.output = source.output;
|
||||
source.on('end', () => {
|
||||
if (this.status === AudioStatus.Playing) {
|
||||
this.status = AudioStatus.Stoped;
|
||||
}
|
||||
});
|
||||
source.on('play', () => {
|
||||
if (this.status !== AudioStatus.Playing) {
|
||||
this.status = AudioStatus.Playing;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,13 +45,6 @@ export class SoundPlayer<
|
||||
this.gain.setVolume(volume);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取音量大小
|
||||
*/
|
||||
getVolume() {
|
||||
return this.gain.getVolume();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加一个音效
|
||||
* @param id 音效名称
|
||||
|
@ -385,6 +385,8 @@ export class AudioStreamSource extends AudioSource implements IStreamReader {
|
||||
this.createSourceNode(this.buffer);
|
||||
this.output.start(0, when);
|
||||
this.playing = true;
|
||||
console.log(when);
|
||||
|
||||
this.output.addEventListener('ended', () => {
|
||||
this.playing = false;
|
||||
this.emit('end');
|
||||
|
Loading…
Reference in New Issue
Block a user