Skip to content

Commit

Permalink
add checks in setMasterVolume
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Capdegelle authored and pperidont committed Nov 12, 2018
1 parent 83f3dd6 commit c77778a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hxd/snd/openal/Driver.hx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ class Driver implements hxd.snd.Driver {
}

public function setMasterVolume(value : Float) : Void {
checkAL();
AL.listenerf(AL.GAIN, value);
checkAL("could not set master volume");
checkAL("could not set master volume : " + value);
}

public function setListenerParams(position : h3d.Vector, direction : h3d.Vector, up : h3d.Vector, ?velocity : h3d.Vector) : Void {
Expand Down

0 comments on commit c77778a

Please sign in to comment.