fixed app crash for not directly initialized audio contexts
This commit is contained in:
parent
3d75b93ace
commit
9463bd0d86
1 changed files with 6 additions and 4 deletions
|
@ -106,10 +106,12 @@ namespace sound {
|
|||
export function set_master_volume(volume: number) {
|
||||
volume_require_save = volume_require_save || master_volume != volume;
|
||||
master_volume = volume;
|
||||
if(master_mixed.gain.setValueAtTime)
|
||||
master_mixed.gain.setValueAtTime(volume, 0);
|
||||
else
|
||||
master_mixed.gain.value = volume;
|
||||
if(master_mixed) {
|
||||
if(master_mixed.gain.setValueAtTime)
|
||||
master_mixed.gain.setValueAtTime(volume, 0);
|
||||
else
|
||||
master_mixed.gain.value = volume;
|
||||
}
|
||||
}
|
||||
|
||||
export function overlap_activated() : boolean {
|
||||
|
|
Loading…
Add table
Reference in a new issue