-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
renderToFile stops background audio being played on iOS #2931
Comments
Did you try setting the AVAudioSession to mixWithOthers? https://github.com/AudioKit/Cookbook/blob/1baba791b27e172ca0d4c548b66d42264ce8768d/Cookbook/Cookbook/CookbookApp.swift#L28 |
Hi, yeah I tried that and it obviously worked, but I don't get why a supposed offline rendering mode has to deal with audio session. It should only process audio frames |
In the AudioKit
The underlying engine is also
|
Indeed. However, this seems like a bug to me, as rendering to a file in an offline mode shouldn't have a side-effect on audio session |
macOS Version(s) Used to Build
macOS 14 Sonoma
Xcode Version(s)
Xcode 14
Description
Hi,
I'm using AudioEngine and PitchShifter to apply an effect on an audio file.
I'm rendering an output file using
engine.renderToFile
. However, while rendering is being done other apps playing audio are getting paused.I thought renderToFile used offline rendering, in which case I don't get why the shared AudioSession is getting tampered.
Is this an expected behavior, or I am missing something ?
Here is what I'm doing (removed optional handling etc for readability)
Thanks for helping
Crash Logs, Screenshots or Other Attachments (if applicable)
No response
The text was updated successfully, but these errors were encountered: