Giter Site home page Giter Site logo

Comments (9)

zoul avatar zoul commented on July 2, 2024

I am afraid the only really safe thing to do after an audio interruption is to tear down and reload the whole sound engine. This can’t – or shoudn’t – be done inside the Finch code, you’ll have to do it yourself.

from finch.

 avatar commented on July 2, 2024

So I have to release the engine object then re allocate and initialise it?

from finch.

zoul avatar zoul commented on July 2, 2024

Yes, that should do. Plus you’ll probably have to reload all the sounds. I know that sucks, but I don’t know a better solution. It might be interesting to see how other sound engines solve this. With a bit of a clever design you could wrap all the sound effects in your game into a single class and reload the engine and the sounds inside this class, so that other classes do not need to care. (Just a theory. Let me know how it worked if you try.)

from finch.

 avatar commented on July 2, 2024

Hmm that doesn't seem to work. It doesn't like be initialising another engine even though I released the last one

from finch.

zoul avatar zoul commented on July 2, 2024

I’ll take a look, unfortunately not in the days to come.

from finch.

BobDG avatar BobDG commented on July 2, 2024

has anyone fixed this issue since then? I'm still having the same issue. I've tried completely removing and rebuilding/initialising a sound engine but it simply won't work. Would greatly appreciate a solution!

from finch.

lantins avatar lantins commented on July 2, 2024

I have a similar issue myself.

@zoul I'm trying as suggested; reset up the sound system and reload all the sounds. Is there anything special needed reload & reinitialise cleanly?

You can find my code here: https://gist.github.com/3800612

The setupEffects method is called by my applicationDidBecomeActive, allowing me to deal with interruptions from a phone call. Although it works I'm seeing the following error 4 times, for each sound file:

2012-09-28 16:48:23.713 Spectra[5345:907] Failed to clean up after sound, error code a003.

I'm targeting iOS 5 and using ARC. Hope you can kick me in the correct direction.

Thank you and thank you for Finch!!!

Luke

from finch.

zoul avatar zoul commented on July 2, 2024

I have added suspend/resume support to the rewritten code and some notes about it to the README. Also the demo now nicely resumes after an incoming call. If you have any further trouble with suspend/resume support, please complain.

from finch.

lantins avatar lantins commented on July 2, 2024

Sweet, thanks!

Will check it out soon :)

from finch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.