Explorar o código

Stop sound source before unloading

Ray San %!s(int64=8) %!d(string=hai) anos
pai
achega
fc7d4cef18
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/audio.c

+ 2 - 0
src/audio.c

@@ -353,6 +353,8 @@ void UnloadWave(Wave wave)
 // Unload sound
 void UnloadSound(Sound sound)
 {
+    alSourceStop(sound.source);
+    
     alDeleteSources(1, &sound.source);
     alDeleteBuffers(1, &sound.buffer);