Code Monkey home page Code Monkey logo

Comments (8)

chrisballinger avatar chrisballinger commented on July 18, 2024

So before the final deadlock, in the screenshot above, it locks the main thread for exactly 9 seconds in -[AEAudioController housekeeping]:



from theamazingaudioengine.

michaeltyson avatar michaeltyson commented on July 18, 2024

This sounds like an iOS bug to me - none of that is anywhere near the user code, so I'm not sure this can be fixed!

from theamazingaudioengine.

chrisballinger avatar chrisballinger commented on July 18, 2024

Ah, that's a bummer. It's definitely related to using the hardware video encoder after using TAAE, and then using TAAE again. For now I had to remove m4a support from my app to ship on time. :(

I'm wondering if I can record a .m4a another way by tricking the hardware video encoder to only write the audio frames into a .mp4 file, since it is essentially the same thing...

How resilient are TAAE's M4A files to interruptions like running out of battery or force quitting the app? The video encoder path allows you to chunk the file in increments as well to prevent data loss, but I haven't really tested it.

from theamazingaudioengine.

michaeltyson avatar michaeltyson commented on July 18, 2024

Perhaps! I think the problem might be the way the hardware has to be put into certain modes in order to utilize the embedded encoders; have you played around with changing the audio session category at strategic times?

I don't know about resilience to interruptions - it's all just using ExtAudioFile under the hood, though.

It might be worth considering writing PCM format (AIFF, etc), then converting when it's time to export, if all else fails (this is what Loopy does, incidentally).

from theamazingaudioengine.

lijon avatar lijon commented on July 18, 2024

Have you tried using the software m4a codec?

        UInt32 codecManf = kAppleSoftwareAudioCodecManufacturer;
        ExtAudioFileSetProperty(recAF, kExtAudioFileProperty_CodecManufacturer, sizeof(UInt32), &codecManf);

from theamazingaudioengine.

michaeltyson avatar michaeltyson commented on July 18, 2024

Closing this for now - I don't think this is a TAAE bug.

from theamazingaudioengine.

qunten avatar qunten commented on July 18, 2024

it's not a TAAE bug, so what's the reason?

from theamazingaudioengine.

michaeltyson avatar michaeltyson commented on July 18, 2024

I suspect it has something to do with the hardware video encoder. There might be problems when it's used in tandem with the hardware AAC encoder, too. If you're still having problems, try the software codec that @lijon mentioned above. I'd be interested to hear the result.

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.