Browse Source

Fix for channel allocation error

Brian Fiete 3 years ago
parent
commit
195c705a46
1 changed files with 2 additions and 1 deletions
  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));
 		}