Android Question Change memory limitation?

Midimaster

Active Member
Licensed User
Hi,
for my multi-track audio project I need a lot of RAM. One Song contains upto 20 tracks with 10MB to 20MB each track. From all the tracks I need to calculate a realtime sum signal, which I want to stream. Every 100msec roundabout 4140*20 calculations followed by copying 4140 SHORTs (=8280 Byte) to the Audiotracker. Therefore It would be very comfortable and fast to keep all 20 tracks in RAM. The user is allowed to make changes during listening, so i cannot pre-calculate anything.

Now I made first tests on the smartphone and it looks like the max avaiable memory is 8MB*20tracks=160MB. Perfekt would be to have 400MB. My smartphone is a S10 and has 8GB. So... there should be enough anywhere.

Somewhere I read about a possiblility to write a directive for more memory in the MANIFEST.XML. Is this possible? And how to write?



Thanks
 

Midimaster

Active Member
Licensed User
Thank you, it works. It doubles the avaiale memory form 160MB to 320MB. This is enough for 20 track with 16MB each. For audios with 22kHz this means 5:30min tracks (OK!), for 48kHz this means 2:45min, which is still a little bit to less.

The app already exists on Windows System. And here I had to care less about memory consumption. All Tracks were saved in INT-Arrays, where I could manipulate each sample-value easily. Even a second INT-array of same size was possible to keep track related interim results. This made calculating the sum signal extremly fast, when only one track was manipulated by the user. Memory consumption here: 2 INT-arrays(10.000.000,20) = 800MB

Now I see, it is necessary to build a more complex data-field and this causes a lot of more calculation in case of user changes. I think performance will get my next problem.

thanks again for the code line.
 
Upvote 0
Top