Пример #1
0
    ~FHrtfSpatializationAlgorithm()
    {
        // Release all the effects for the oculus spatialization effect
        for (TMap<uint32, class FXAudio2HRTFEffect* >::TIterator It(HRTFEffects); It; ++It)
        {
            It.Value()->Release();
        }

        HRTFEffects.Empty();

        // Destroy the contexts if we created them
        if (bOvrContextInitialized)
        {
            if (OvrAudioContextFast != nullptr)
            {
                ovrAudio_DestroyContext(OvrAudioContextFast);
            }

#if OCULUS_HQ_ENABLED
            if (OvrAudioContextHighQuality != nullptr)
            {
                ovrAudio_DestroyContext(OvrAudioContextHighQuality);
            }
#endif
            bOvrContextInitialized = false;
        }
    }
Пример #2
0
	~FHrtfSpatializationAlgorithm()
	{
		// Release all the effects for the oculus spatialization effect
		for (FXAudio2HRTFEffect* Effect : HRTFEffects)
		{
			if (Effect)
			{
				Effect->Release();
			}
		}
		HRTFEffects.Empty();

		// Destroy the contexts if we created them
		if (bOvrContextInitialized)
		{
			if (OvrAudioContextFast != nullptr)
			{
				ovrAudio_DestroyContext(OvrAudioContextFast);
				OvrAudioContextFast = nullptr;
			}

#if OCULUS_HQ_ENABLED
			if (OvrAudioContextHighQuality != nullptr)
			{
				ovrAudio_DestroyContext(OvrAudioContextHighQuality);
			}
#endif
			bOvrContextInitialized = false;
		}
	}