diff --git a/3rdparty/iaxclient/lib/audio_openal.c b/3rdparty/iaxclient/lib/audio_openal.c index 51ee457f0..033dd3f47 100644 --- a/3rdparty/iaxclient/lib/audio_openal.c +++ b/3rdparty/iaxclient/lib/audio_openal.c @@ -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; }