Open OlafZwe opened 6 years ago
Hi OlafZwe, Thanks for the feedback. I'll check and fix it.
Hi, I had tried, but I can't find memory leak. Could you help to provide more details and the test video? Thanks.
To reproduce the memory leak (and CPU usage spike), make the following changes to the Demo scene:
decoder.initDecoder(fileSeeker.getPath(), true);
public void Update()
{
if (decoder != null && (int)decoder.getDecoderState() >= 3)
{
float[] audioBuffer;
double time;
int samplesPerChannel;
decoder.getAllAudioChannelData(out audioBuffer, out time, out samplesPerChannel);
}
}
Running this Demo scene spikes CPU and memory usage, and this usage does not go down when stopping the scene in the editor.
I do the same thing but the memory usage didn't raise over time. So I think it may be not an issue of memory leak. I'll keep monitoring it, thanks.
A (native) memory leak occurs when using the following setup: Enabling all audio channels by initializing the decoder with
enableAllAudioCh = true
. Pulling that multi-channel audio data using the C# functiongetAllAudioChannelData
.This memory leak appears to occurs both when testing in the Unity editor, as well as in a standalone Windows build of the Unity app.