Browse Source

Stop sound source before unloading

pull/218/head
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 View File

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

Loading…
Cancel
Save