WaveFormViewDemo icon indicating copy to clipboard operation
WaveFormViewDemo copied to clipboard

OutOfMemoryException when processing lengthy music file

Open alanleedev opened this issue 5 years ago • 4 comments

I'm getting OOME when processing music over 5 or 6 minutes. It seems the library is loading the full length of the decoded PCM data into memory before processing resulting in memory issues.

alanleedev avatar Jan 30 '20 18:01 alanleedev

Three years ago, I implemented this library in a very inefficient way. Need to improve.

SIY1121 avatar Feb 02 '20 08:02 SIY1121

Hi @SIY1121 , thanks for sharing! Do you have any advice on improving the performance for generating the wave data?

chinalwb avatar Oct 31 '20 11:10 chinalwb

@chinalwb

I'm not sure but using MediaCodec via NDK might improve performance. https://developer.android.com/ndk/reference/group/media

SIY1121 avatar Nov 18 '20 14:11 SIY1121

Cool! Thanks @SIY1121 !

chinalwb avatar Nov 19 '20 02:11 chinalwb