Browse Source

Stop sound source before unloading

Ray San 8 years ago
parent
commit
fc7d4cef18
1 changed files with 2 additions and 0 deletions
  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);