Code Monkey home page Code Monkey logo

Comments (7)

chrisballinger avatar chrisballinger commented on July 18, 2024

So it seems to be caused by the fact that I release my audioController when I'm done with it. I guess in the meantime I will just permanently hold a reference to it in my App Delegate, but that seems wasteful.

from theamazingaudioengine.

michaeltyson avatar michaeltyson commented on July 18, 2024

Hmm, interesting! I never really designed the engine to not be around for the lifetime of the app, so I may well have missed a few things. In this case, the problem is the audio session interruption callback (the one setup in AudioSessionInitialize) isn't being unregistered.

I'll take a look a bit later.

Sent from my iPhone

On 16/05/2013, at 11:54 AM, Chris Ballinger [email protected] wrote:

So it seems to be caused by the fact that I release my audioController when I'm done with it. I guess in the meantime I will just permanently hold a reference to it in my App Delegate, but that seems wasteful.


Reply to this email directly or view it on GitHub.

from theamazingaudioengine.

chrisballinger avatar chrisballinger commented on July 18, 2024

Aghhhh it turns out I need to reinitialize the audioController whenever I also use the hardware video encoder after using the audio encoder, or the audioController no longer is able to start: and returns a nondescript error.

It also looks like there is no way to EVER clear the interruptionListener because Apple's docs say you can only ever call AudioSessionInitialize once per app launch. :(

from theamazingaudioengine.

chrisballinger avatar chrisballinger commented on July 18, 2024

I attempted to fix it with this commit: OpenWatch@eb92e78

But now I see a new issue with deadlocks on the main thread: #29

I'll let you know if I figure out a workaround...

from theamazingaudioengine.

michaeltyson avatar michaeltyson commented on July 18, 2024

I've applied a similar approach to fix the crash, in SHA 0bebf9b - I haven't noticed any problems so far though

from theamazingaudioengine.

chrisballinger avatar chrisballinger commented on July 18, 2024

Thanks for the quick response! That's a much cleaner workaround, although I notice you don't abort if *THIS == nil. I guess you can theoretically send messages to nil all you want, but I generally prefer to explicitly test for it just in case something weird happens as a side effect.

I haven't tested your fix, but the diff makes sense to me, so I am going to guess it works and close the issue. :)

from theamazingaudioengine.

michaeltyson avatar michaeltyson commented on July 18, 2024

Ah - I'm an idiot, I totally forgot to add that part =) Fixed in SHA a183790

from theamazingaudioengine.

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.