瀏覽代碼

Fix for channel allocation error

Brian Fiete 3 年之前
父節點
當前提交
195c705a46
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      BeefLibs/SDL2/src/SDLApp.bf

+ 2 - 1
BeefLibs/SDL2/src/SDLApp.bf

@@ -192,7 +192,8 @@ namespace SDL2
 				return;
 
 			int32 channel = SDLMixer.PlayChannel(-1, sound.mChunk, 0);
-			//SDLMixer.SetPanning()
+			if (channel < 0)
+				return;
 			SDLMixer.Volume(channel, (int32)(volume * 128));
 		}