Comments (4)
Can you share the relevant portions of code where you're setting up the simulation and rendering settings, and where you're creating and using the Environmental Renderer and Convolution Effect objects? We're trying to reproduce this on our end, and we want to be sure we're testing the same sequence of operations as you have.
Your expectation is correct: the value of maxConvolutionSources should only affect memory consumption, not speed.
from steam-audio.
After some more investigating it appears that it is mainly caused by not having any convolution effects with the following setup:
This is the rendering setup:
_internals->context.allocateCallback = nullptr;
_internals->context.freeCallback = nullptr;
_internals->context.logCallback = nullptr;
_internals->settings.samplingRate = 44100;
_internals->settings.frameSize = 512;
_internals->settings.convolutionType = IPL_CONVOLUTIONTYPE_PHONON;
IPLHrtfParams hrtfParams{IPL_HRTFDATABASETYPE_DEFAULT, nullptr, 0, nullptr, nullptr};
iplCreateBinauralRenderer(_internals->context, _internals->settings, hrtfParams, &_binauralRenderer);
This is the environment and environmental renderer part, scene can be a valid scene or nullptr:
IPLSimulationSettings simulationSettings;
simulationSettings.ambisonicsOrder = 3;
simulationSettings.irDuration = 0.5f;
simulationSettings.maxConvolutionSources = 20;
simulationSettings.numBounces = 16;
simulationSettings.numDiffuseSamples = 512;
simulationSettings.numRays = 64000;
simulationSettings.sceneType = IPL_SCENETYPE_PHONON;
iplCreateEnvironment(_internals->context, nullptr, simulationSettings, _scene, nullptr, &_environment); //TODO: 4th paramter should be a scene object for indirect sound modeling
iplCreateEnvironmentalRenderer(_internals->context, _environment, _internals->settings, _internals->internalAmbisonicsFormat, &_environmentalRenderer);
Then I have a callback calling iplGetMixedEnvironmentalAudio every audio frame:
iplGetMixedEnvironmentalAudio(_instance->GetEnvironmentalRenderer(),
IPLVector3{ listenerPosition.x, listenerPosition.y, listenerPosition.z },
IPLVector3{ listenerForward.x, listenerForward.y, listenerForward.z },
IPLVector3{ listenerUp.x, listenerUp.y, listenerUp.z }, mixingBuffer[1]);
In this order, this is all that is needed to make it slow. Setting maxConvolutionSources to 0 or another low value makes it fast/better.
Once there is a convolution effect, a value of 20 is not a problem anymore. Setting it to higher numbers like 100 or more will introduce cracking again.
from steam-audio.
@Slin Ah, got it. Not creating convolution effects results in an unexpected performance hit. We have been able to reproduce this issue, and will be working on a fix. Thanks!
from steam-audio.
Closing per "Fixed performance issue when calling iplGetMixedEnvironmentalAudio when no Convolution Effect objects have been created." in the 2.0-beta.5 release notes.
from steam-audio.
Related Issues (20)
- iplSimulatorRunReflections will crash, if any IPLReflectionEffect channel count differ from Simulator channel count
- [Unity/Fmod] Oneshots played side by side from the same source do not have proper reflection applied using Convolution
- [FMOD] No sound in FMOD Studio or game when enabling occulusion with "simulation-defined" option HOT 4
- How to calculate acoustic material properties? HOT 3
- `iplBinauralEffectApply` always outputs silence on armv8 HOT 6
- [C API] phonon.h uses types from stdint.h but this header is not included HOT 3
- [C api / Rust bindings] Crash upon calling iplSimulatorRunReflections in minimal setup (status access violation) HOT 2
- Attenuation Incorrect for Multiple Audio Sources HOT 7
- iplSimulatorAddProbeBatch throws exception, if simulator is created without enabling pathing or indirect effects
- FFT implementations other than IPP on macOS x86_64 HOT 2
- [UE 5.1] The following modules are missing or built with a different engine version HOT 5
- Curve driven reflection attenuation incorrect for logarithmic fall off HOT 1
- SteamAudioSource debug problem
- Minimum distance in inverse distance attenuation and reflection produces NaN or weird output buffers HOT 1
- Crashing iplSimulatorRunReflections with baking HOT 16
- Can SteamAudio plugin be used on visionOS? HOT 2
- Popping when using default HRTF HOT 4
- Segfault in phonon_test HOT 3
- Script need to handle dependency folder name "lib64" / or rename to "lib"
- adding djfft as another fft implementation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steam-audio.