- Clean before installing. (Mostly to get full logs every time.)
- Clearer error messages.
- Better checking for Xcode/xcodebuild.
- Log extra system info.
- A number of minor bug fixes.
In the manual uninstallation instructions, makes the command for
restarting coreaudiod clearer. If the old command had to fallback to
"sudo killall coreaudiod", it wasn't clear to the user that it had
actually succeeded.
build_and_install.sh is failing for some people because their versions
of launchctl don't support the command we were using to restart
coreaudiod. This commit adds several fallback versions of the command.
build_and_install.sh tries each until one works.
Fixes#10, #19 and #29.
- Move files to the trash instead of deleting them, just in case we
accidentally delete the wrong thing.
- Added some fallback variants of launchctl commands for old versions.
- Check the size of files before deleting them, just to be safe.
- Added license/copyright heading.
BGMApp is failing to build for some people with the Clang error message
"Could not read profile: Unsupported profiling format version". See #4.
I think this might be caused by building with an older version of Xcode,
but I'm far from sure about that. BGMApp uses <0.5% CPU, so it's not
worth using an optimization profile if it's causing anyone problems.
BGMXPCHelper's install script now creates a user and group for
BGMXPCHelper to run as. This reduces the risk of BGMXPCHelper being used
for privilege escalation.
The "install" action for BGMXPCHelper now checks the owner/permissions
of the installation directory. It also installs BGMXPCHelper's
launchd.plist and "bootstraps" it.
The BGMApp project now builds an XPC service bundle called BGMXPCHelper,
which vends a Mach service that BGMApp and BGMDriver can use to
communicate. This will hopefully be useful for some of the tasks HAL
notifications aren't suited to.
In this commit, BGMDriver uses the XPC helper when starting IO, to wait
until BGMApp is ready for playthrough. BGMApp can only start playthrough
when the output hardware is ready for IO. BGMDriver can now tell the HAL
when we're ready for IO, which means we don't have to keep the output
hardware running all the time (or drop frames or increase latency).
The end result is that playthrough doesn't waste CPU time while idle any
more. This also means that now playthrough won't prevent the system from
sleeping when idle.
The listener proc in BGMDeviceControlSync was being triggered during the
initial CopyVolume call. This fix just waits until after the initial
sync to register the listener proc.