0 Favourites

How do I release audio from memory

  • 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

  • I've seen this requested before, for other reasons too. I'll add it to my todo list.

  • Thanks Ashley, that's great news

  • 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

  • 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.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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

  • 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.

  • Thank you Ashley!

    We really do appreciate the time and effort you always put in to helping C2 users out

  • 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

  • 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.

  • 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.

    I'm sure that you would make a lot of people (including myself) really happy with implementing this feature, even if it only works for NWjs releases.

  • This feature sounds really useful! Would love to see it if possible, having just made an app with a lot of audio in it!

  • Thanks Ashley, that will be very helpful

  • Hi Ashley, I hope you've had a good Xmas, and you have a great New Year to look forward to

    I noticed you've been making some changes to the audio plugin, over the last few releases. And I was just wondering if you're planning to add the option to release audio from memory any time soon.

    Thanks again for the help

  • Hi Ashley,

    Did you ever find the time to update the audio plugin to allow audio release from memory? If not, could you confirm if this option will still be added in C2 at a later date. Will the option be available in C3 at least?

    I really think the ability to release audio, freeing up extra memory space, would be a a very useful addition, and would allow developers to expand their use of audio within their games.

    Cheers

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)