Comments (9)
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.
So I have to release the engine object then re allocate and initialise it?
from finch.
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.
Hmm that doesn't seem to work. It doesn't like be initialising another engine even though I released the last one
from finch.
I’ll take a look, unfortunately not in the days to come.
from finch.
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.
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.
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.
Sweet, thanks!
Will check it out soon :)
from finch.
Related Issues (20)
- Popping? HOT 2
- Update documentation for the new library build HOT 1
- Better error handling
- Better decoder design HOT 1
- FYI: No Sound From Finch w/ OpenEars in iOS 4.3.x
- Volume Control? HOT 6
- Rewrite polyphony to share sound buffers HOT 1
- Make Finch a singleton class HOT 1
- Stopping a revolver sound stops the wrong sample HOT 1
- Convert mono samples to stereo HOT 3
- Recording? HOT 8
- Cached sound system HOT 6
- Finch Demo crashes with iPhone 5.1 simulator HOT 2
- Issues with the Installation HOT 2
- Error handling broken with recent Clang
- Add CocoaPods support HOT 9
- Sound playback delayed on first playback HOT 1
- Compiling for arm64 architecture HOT 1
- new
- Stopping a paused sound doesn't
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from finch.