IAXClient OpenAL: clean up our buffers
Avoid a console warning from OpenAL-soft about leaked buffers on shutdown, by ensuring IAXClient backend does matching cleanup for the buffers it allocates.
This commit is contained in:
parent
d571bc6f76
commit
8ae98ea543
1 changed files with 6 additions and 0 deletions
6
3rdparty/iaxclient/lib/audio_openal.c
vendored
6
3rdparty/iaxclient/lib/audio_openal.c
vendored
|
@ -246,10 +246,16 @@ int openal_destroy(struct iaxc_audio_driver *d)
|
|||
{
|
||||
struct openal_priv_data* priv = (struct openal_priv_data*)(d->priv);
|
||||
|
||||
|
||||
alcCaptureStop(priv->in_dev);
|
||||
alcCaptureCloseDevice(priv->in_dev);
|
||||
alDeleteSources(1, &priv->source);
|
||||
|
||||
// FlightGear: added by James to avoid a warning from OpenAL-soft
|
||||
// when we destroy the context in SGSoundMgr_OpenAL: since we
|
||||
// genBuffers below, we should balance that out.
|
||||
alDeleteBuffers(priv->num_buffers, priv->buffers);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue