Supports iOS on Apple Silicon#10
Open
pwnified wants to merge 16 commits intoTheAmazingAudioEngine:masterfrom
Open
Supports iOS on Apple Silicon#10pwnified wants to merge 16 commits intoTheAmazingAudioEngine:masterfrom
pwnified wants to merge 16 commits intoTheAmazingAudioEngine:masterfrom
Conversation
You must call AERealtimeWatchdogStartMonitoring and AERealtimeWatchdogStopMonitoring at the beginning and end of any coreAudio realtime thread. All this does is set the static thread pointer to the address of the CoreAudio thread. It's not as simple as dropping the library into a project and it magically working, like before, but performance is increased by a large amount if you call lots of obj-c (a quick profile run showed about 10% cpu savings). Uncomment #define USE_WATCHDOG_REGISTRATION_FUNCTIONS 1 to try it out.
You must call AERealtimeWatchdogStartMonitoring and AERealtimeWatchdogStopMonitoring at the beginning and end of any coreAudio realtime thread. All this does is set the static thread pointer to the address of the CoreAudio thread. It's not as simple as dropping the library into a project and it magically working, like before, but performance is increased by a large amount if you call lots of obj-c (a quick profile run showed about 10% cpu savings). Uncomment #define USE_WATCHDOG_REGISTRATION_FUNCTIONS 1 to try it out.
You must call AERealtimeWatchdogStartMonitoring and AERealtimeWatchdogStopMonitoring at the beginning and end of any coreAudio realtime thread. All this does is set the static thread pointer to the address of the CoreAudio thread. It's not as simple as dropping the library into a project and it magically working, like before, but performance is increased by a large amount if you call lots of obj-c (a quick profile run showed about 10% cpu savings). Uncomment #define USE_WATCHDOG_REGISTRATION_FUNCTIONS 1 to try it out.
The realtime audio thread has a different name on apple silicon. This uses the __attribute__((constructor)) to set the name on startup.
Unfortunately, processInfo.isiOSAppOnMac is still required for targets "My Mac (Designed for iPad)"
To better work with swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thought you might check out some of these changes, the first is an optional feature to set the thread pointer manually (at the start of the audio callbacks and clear it at the end, saves a string compare for every function lookup), and the second adds support for iOS on mac (which has a differnent realtime thread name, sets it up at program launch)