forked from 0ad/0ad
due to h_allow_free, no longer rely on h_mgr cleaning up buffers (that was a hack, and wouldn't work if OpenAL is reset at runtime)_
now snd_cleanup before h_mgr_cleanup - makes sense anyway. also added snd_update call that doesn't change OpenAL position - this is so sound works in the main menu. This was SVN commit r1263.
This commit is contained in:
parent
0540792825
commit
20061f0e38
@ -781,12 +781,9 @@ static void Shutdown()
|
||||
// to translate() will crash.
|
||||
I18n::Shutdown();
|
||||
|
||||
h_mgr_shutdown();
|
||||
|
||||
// must be called after h_mgr_shutdown!
|
||||
// (only then are cached resources actually released; we can't
|
||||
// call the OpenAL free() function after it's been shut down)
|
||||
snd_shutdown();
|
||||
|
||||
h_mgr_shutdown();
|
||||
}
|
||||
|
||||
static void Init(int argc, char* argv[])
|
||||
@ -1083,8 +1080,15 @@ static void Frame()
|
||||
float* pos = &orientation._data[12];
|
||||
float* dir = &orientation._data[8];
|
||||
float* up = &orientation._data[4];
|
||||
snd_update(pos, dir, up);
|
||||
if(snd_update(pos, dir, up) < 0)
|
||||
debug_out("snd_update failed\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(snd_update(0, 0, 0) < 0)
|
||||
debug_out("snd_update (pos=0 version) failed\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user