How do I release audio from memory

Get help using Construct 2

Post » Tue Aug 09, 2016 12:48 pm

Hi everyone,

We're making a game with lot's of audio in. But I seem to be having problems, which I think may be linked to memory limitations.

Our game has lots of pages, and each page has it's own theme song (which equals a lot of audio data). I've tested on mobile (our target platform) and it seems that, once you've loaded a certain amount of audio data any tracks after that just won't load/play.

So (as an example) I can load the first 10 pages and the audio works fine. But any pages loaded after that just don't play audio (even though they should).

From my testing, it seems like once the memory becomes full (i.e. with the first 10 audio tracks) the game just can't load/play any more audio after that.

I've looked for a way to unload audio from the memory, but unfortunately I couldn't find one. So I'm not sure if this can be achieved with the current C2 audio plugin. I'm not even sure if it's possible. But I think it could be a very useful add-on to the C2 audio plugin (particularly for bigger games).

@Ashley I don't know how difficult this would be to add, but would you consider including this option in the C2 audio plugin sometime soon? I'd even be willing to pay a third party to add the option, if you don't currently have the time.

If anyone knows of any other way to achieve what I'm after, I'd really love to hear from you.

Thanks for reading this :)
B
33
S
6
G
7
Posts: 494
Reputation: 8,252

Post » Tue Aug 09, 2016 12:55 pm

I've seen this requested before, for other reasons too. I'll add it to my todo list.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Tue Aug 09, 2016 1:18 pm

Thanks @Ashley, that's great news :)
B
33
S
6
G
7
Posts: 494
Reputation: 8,252

Post » Thu Sep 01, 2016 10:34 am

Hi @Ashley, thanks again for adding this to your todo list.

I know you've probably got a million and one things on the list by now. But it would really help us out if you would consider adding this to the next build.

It's pretty much the only thing we're waiting for now, before releasing our app. So if you could find the time to help us out, we'd be really grateful.

We appreciate any help you can offer :)
B
33
S
6
G
7
Posts: 494
Reputation: 8,252

Post » Wed Sep 14, 2016 7:32 pm

@ashley , I second this request.

This is currently a big issue for us. We are handling a project with hundreds of sounds and on some older browsers (IE11 windows 7), the memory caused by the audio object bottlenecks and does not allow to play any sounds after the 10th or 12th track. Is there a way to dispose the audio object in runtime to unload memory? Is it possible to have such an option or similar on the next beta?

We appreciate any assistance on this.
B
106
S
20
G
8
Posts: 155
Reputation: 11,716

Post » Mon Sep 19, 2016 10:14 am

Hi @Ashley,

I'm not sure how difficult this is to achieve. But is there any chance you may be able to get this into the next build? We're trying to prepare for our release date. And this is really the only thing we have left to fix before moving forward.

Thanks for your time :)
B
33
S
6
G
7
Posts: 494
Reputation: 8,252

Post » Mon Sep 19, 2016 10:37 am

Yes, this has been on the todo list for a while, along with hundreds of other suggestions. I'll try to prioritise this for the next build.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Tue Sep 20, 2016 10:04 am

Thank you @Ashley!

We really do appreciate the time and effort you always put in to helping C2 users out :)
B
33
S
6
G
7
Posts: 494
Reputation: 8,252

Post » Fri Oct 21, 2016 3:45 pm

Hi @Ashley,

There have been a few beta releases, since we last spoke about this. Is there any chance it might be included in the next release?

Thanks again for your help :)
B
33
S
6
G
7
Posts: 494
Reputation: 8,252

Post » Sat Oct 22, 2016 2:31 pm

I reviewed how easy this would be to do and it looked a bit tricky due to the way the Audio plugin is currently architected. Throwing away the memory could mean the next time it is requested it has to re-request it from the network. That's actually okay for platforms like NW.js, but it would be nice if it could work well even on the web. We're due a stable release soon but in the next beta cycle I'll look in to it again.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Next

Return to How do I....?

Who is online

Users browsing this forum: dop2000, FacuLNF, Lordshiva1948, Matei511 and 57 guests