Garrett Hopper 8 年之前
父节点
当前提交
8f6bbb1731
共有 1 个文件被更改,包括 1 次插入1 次删除
  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