Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Dealing with '_release_all_openal_resources' audio bug
- - By EdwinOdesseiron Date 2013-06-18 13:08
Hi all.

I guess this problem, when shutting down your gosu project that uses audio, is quite common. I have tried to somehow make it go, but didn't work. In my project, I've created a global, Audio class that deals with all audio (duh) in game. Also, my Window class has a "shutdown" method. To keep it short - when I click on "exit" option, it calls window's "shutdown" method, which looks like that:

def shutdown
  $audio.kill
  if $audio.killed? then
    $audio = nil
    if $audio == nil then
      close
    end
  end
end

The "$audio.kill" method looks like that:

def kill
  @bgm.stop
  @bgm = nil
  @bgs = nil
  @se = nil
  @buzz = nil
  @click = nil
  @opt = nil
end

and "killed?" just returns true if all audio variables (Song and Samples) are nil. So basically, before I try to close window, I remove all audio from game. But the error still occurs. How can I fix that?

Regards
Edwin
Parent - - By jlnr (dev) Date 2013-06-18 15:21
Which error? The method _release_all_openal_resources was introduced to fix the existing error and I thought it worked… :(
Parent - By EdwinOdesseiron Date 2013-06-18 15:42
Okay, my bad now. It does actually work, but I forgot to change files in project folder (OpenAL32.dll, libsndfile.dll, gosu.for_1_9.so and so on) to newer after I updated gosu. Now it does work like charm. Sorry for troubles.

Regards
Edwin
Up Topic Gosu / Gosu Exchange / Dealing with '_release_all_openal_resources' audio bug

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill