Garrett Hopper 8 years ago
parent
commit
8f6bbb1731
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hxd/snd/ALEmulator.hx

+ 1 - 1
hxd/snd/ALEmulator.hx

@@ -176,7 +176,7 @@ class ALBuffer {
 **/
 class ALEmulator {
 
-	public static var NATIVE_FREQ : Int = #if js @:privateAccess Std.int(NativeChannel.getContext().sampleRate) #else 44100 #end;
+	public static var NATIVE_FREQ : Int = #if js @:privateAccess Std.int(NativeChannel.getContext() == null ? 44100 : NativeChannel.getContext().sampleRate) #else 44100 #end;
 
 	// api