Quellcode durchsuchen

Fix for channel allocation error

Brian Fiete vor 3 Jahren
Ursprung
Commit
195c705a46
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      BeefLibs/SDL2/src/SDLApp.bf

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

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