Commit graph

207 commits

Author SHA1 Message Date
Kyle Neideck
243c798ccd
Disable AddressSanitizer in release builds. 2017-06-24 22:28:11 +10:00
Kyle Neideck
a4a9530513
Change build dir back in build_and_install.sh to fix package.sh. 2017-06-24 21:40:17 +10:00
Kyle Neideck
9aec1aed34
Enable AddressSanitizer by default in debug builds and tests.
Except when running BGMDriver because you have to change coreaudiod's
sandbox profile for that. And you have to disable SIP (rootless) to do
that.
2017-06-24 20:20:16 +10:00
Kyle Neideck
7f784b5d94
Add client bundle ID for Parallels to App Volumes.
Fixes #86.
2017-06-23 00:49:27 +10:00
Kyle Neideck
c907f13554
Partial fix for apps' bundle IDs not matching their HAL clients.
Some apps have different bundle IDs to their CoreAudio clients, so
the bundle ID BGMApp sends with the app's volume doesn't match any
client in BGMDriver.

This change hardcodes the bundle IDs used by some popular apps and the
bundle IDs their clients use. We should be able to fix this for all
(almost all?) apps at some point.
2017-06-22 19:36:17 +10:00
Kyle Neideck
5a657a01a6
Fix dropped frames when starting IO.
It turns out that the HAL will sometimes call BGM_Driver::StartIO before
sending kAudioDevicePropertyDeviceIsRunning to BGMPlayThrough. In that
case, BGMApp would start playthrough and tell BGMDriver to return from
StartIO immediately, which meant we would drop the initial frames while
the output device started up.

So now BGMApp waits for the output device in that case as well.

Fixes #7.
2017-06-22 19:36:17 +10:00
Kyle Neideck
aa8d9ae518
Increment minor version number. 2017-06-22 19:36:17 +10:00
Kyle Neideck
36b4b7e0c4 README.md: Move build info out of the Download section. 2017-06-18 22:16:09 +10:00
Kyle Neideck
462bdee9cd Fix formatting in README.md. 2017-06-18 22:03:39 +10:00
Kyle Neideck
bf9faaef55
Link to the 0.1.1 pkg installer in README.md. 2017-06-18 21:07:42 +10:00
Kyle Neideck
6d2fd39296
Split uninstall.sh into an interactive and non-interactive version.
The non-interactive version can be called by a Homebrew Cask formula.

Also, change some AppleScript to reference applications by their IDs
rather than their names, which should make them slightly more robust.
2017-06-17 21:56:42 +10:00
Kyle Neideck
3732eceed8
Increase the version number. (But just the patch level.) 2017-06-17 18:01:09 +10:00
Kyle Neideck
a7750f7d1e
Travis: Only publish releases for tags. 2017-06-14 13:54:45 +10:00
Scott Humphries
76c660292e
Temporarily remove travis branch restriction 2017-06-14 13:28:29 +10:00
Kyle Neideck
d322c3ac9b
Never show warning dialog box in command-line pkg installs.
Also,
 - add Background Music Device.driver to the array of bundles in
   pkgbuild.plist, and
 - don't warn about the permissions of the install dir for BGMXPCHelper
   in build_and_install.sh if it's only building.
2017-06-13 23:18:10 +10:00
Kyle Neideck
45519a4d52
Fix BGMDriver's version number. 2017-06-12 17:22:34 +10:00
Kyle Neideck
ed2f356570
Try to fix Travis not finding the files to release.
Also, make sure commands in uninstall.sh use the binaries that ship with
OS X and add the release files to .gitignore.
2017-06-12 14:38:26 +10:00
Scott Humphries
4d80e1f38f
Fix deploy script 2017-06-12 14:04:50 +10:00
Kyle Neideck
ca56d8d0b2
travis setup releases 2017-06-12 13:52:59 +10:00
Kyle Neideck
5e4556b49d
Add packaging script and (possibly) support for OS X 10.9. 2017-06-11 19:19:31 +10:00
Kyle Neideck
8d1adf25bb
BGM_Device: Fix over-releasing custom property data.
BGM_Device::Device_SetPropertyData was releasing the CFArray it gets
from the host (i.e. coreaudiod) when BGMApp sets
kAudioDeviceCustomPropertyEnabledOutputControls, which would deallocate
it, but coreaudiod also releases that CFArray.

Found with AddressSanitizer.
2017-06-04 23:31:56 +10:00
Kyle Neideck
c33941a22b
Disable -Wpartial-availability in BGMDriver tests. 2017-06-04 01:31:31 +10:00
Kyle Neideck
ec7128495f
Skip setting NSMenuItem.accessibilityTitle on OS X < 10.12.
This should also fix compilation with the 10.11 SDK.

Also enabled -Wpartial-availability and raised the deployment target to
OS X 10.9.
2017-06-03 23:17:34 +10:00
Kyle Neideck
6fc46c7943
uninstall.sh: Increase the filesize limit for deletion.
As a safety check, uninstall.sh refuses to delete a file if it's over a
certain size. With debug symbols, Background Music.app was just over the
previous 5MB limit.
2017-06-01 23:54:36 +10:00
Kyle Neideck
b986b687ea
Fix exception in Mock_CAHALAudioObject during BGMApp unit tests.
Also, avoid initialising BGMDeviceControlsList in
BGMMockAudioDeviceManager::init.
2017-06-01 20:10:35 +10:00
Kyle Neideck
c617d98f9d
BGMDevice: Only enable volume/mute if the output device also has them.
BGMApp now disables BGMDevice's volume and/or mute controls if the
output device selected in BGMApp doesn't have matching controls. This
prevents the controls from being presented to the user when they don't
do anything.

In BGMPlayThrough, wait much longer for our IOProcs to stop themselves
before assuming something's gone wrong. In testing, rapidly changing
between output devices with and without controls while playing audio
would occasionally cause one of the IOProcs to take too long to stop
itself.

Also adds some basic scriptability, mainly so UI tests can use
AppleScript to check BGMApp's state that would be complicated to check
otherwise. (In this case, to check which output device is selected.)

Fixes #101.
2017-05-30 23:22:48 +10:00
Kyle Neideck
4839ea8a4b
Remove Xcode 6 from the Travis build matrix. 2017-05-30 23:22:48 +10:00
Kyle Neideck
612e249e1b
Fix BGMApp crash when BGMDriver isn't installed. 2017-05-07 16:02:50 +10:00
Kyle Neideck
d4df6107bd Add "Sound Control" to Related Projects in README.md 2017-05-07 15:17:48 +10:00
Kyle Neideck
f5628e78a9 Fix some bugs in GitHub's rendering of README.md.
Not sure why these parts stopped rendering correctly on GitHub. Might be on their end.
2017-04-09 18:25:27 +10:00
Kyle Neideck
728a3a7331
build_and_install.sh: Offer fix when xcodebuild can't find Xcode.app.
If the Xcode command line tools were set to use a "command line tools
instance", which can be installed without having Xcode installed,
build_and_install.sh would fail. It prints an error message with a
command that can fix it if you do have Xcode installed, but the message
was kind of confusing and the command would fail if you didn't run it as
root.

build_and_install.sh now offers to run the command for you and then
continues the installation. I've also tried to make the message a bit
clearer and cleaned up some of the code.

Also fixes another bug that occurred with this configuration problem,
where the error from xcodebuild would be printed at an unintended (and
confusing) point in the script.

Fixes #108.
2017-04-09 17:35:27 +10:00
Kyle Neideck
f254e8c58d
uninstall.sh: Open System Preferences pane by ID instead of by name.
The Applescript that opened System Preferences at the end of the process
was failing to find the "Sound" pane. It might have been because I don't
have OS X set to English, but it's always worked for me in the past.
Either way, it's less fragile to use the ID and it fixes the problem (on
my machine, at least).

Also, added a short pause before restarting coreaudiod because the step
before that makes Finder to play a short sound. It probably wouldn't
cause any problems, but why risk it?
2017-04-09 15:44:46 +10:00
Kyle Neideck
5f9487deb0
Add PublicUtility to manual build instructions and...
...make them less likely to fail because of permissions errors.
2017-04-09 15:40:25 +10:00
Kyle Neideck
6a26afe47a
Fix nullability warning in BGMXPCHelper. Also add Xcode 8.3 to .travis.yml.
Fixes #107.
2017-04-05 22:15:54 +10:00
Kyle Neideck
78e2813af1
Fix encoding issue on Travis caused by "©" char in Python script. 2017-02-19 20:50:11 +11:00
Kyle Neideck
87af15d290
Skip the UI tests on Travis by directly editing BGMApp's Xcode scheme.
Skipping them by overriding runTest didn't work and this is the only other way
I can think of. xcodebuild's -skip-testing option would work, but only with
recent versions of Xcode.
2017-02-19 20:25:54 +11:00
Kyle Neideck
7b32b6ef66
Skip the UI tests on Travis because it doesn't support UI testing. 2017-02-19 17:43:45 +11:00
Kyle Neideck
32723ff04b
Append the git HEAD short ID to the build version for snapshot builds. 2017-02-19 15:14:34 +11:00
Kyle Neideck
60e1b3564b
Add a UI tests target for BGMApp. Only has one test so far.
The UI tests run with clean user defaults, but BGMDevice and Scripting Bridge
still need to be mocked/stubbed out. That also means that the UI tests can only
run if BGMDriver is installed and that changes to BGMDriver's state made during
the tests will persist.
2017-02-19 13:39:34 +11:00
Kyle Neideck
d49ff20820
Add builds with Xcode 8.1 and 6.4 to .travis.yml.
6.4 should already have been retired according to their documentation, so it
will probably need to be removed. But it would be nice to have because it's the
only OSX 10.10 image.
2017-02-19 12:55:20 +11:00
Kyle Neideck
9b5d5bf921
Remove BGMAppTests, which was essentially empty. 2017-02-18 18:59:32 +11:00
Kyle Neideck
07c1c2320b
Reorganise the BGMApp test dirs slightly. 2017-02-18 18:12:40 +11:00
Kyle Neideck
523ad02761
Add -w option to build_and_install.sh, which passes -Wno-error to the compiler.
-Wno-error tells the compiler not to treat warnings as errors.

Using the option in the one-liner install command in README.md, since it's
mostly used by users rather than developers.

Also, log the options passed to build_and_install.sh in build_and_install.log.
2017-02-16 22:54:38 +11:00
Kyle Neideck
3ee563e4c5
Fix Travis again.
It seemed to think commands starting with ! were tags.
2017-02-16 00:26:04 +11:00
Kyle Neideck
e5c406da16
Fix ls command in .travis.yml failing the macOS 10.12 build.
Also, add some simple tests for build_and_install.sh and uninstall.sh to
.travis.yml.
2017-02-15 23:53:14 +11:00
Kyle Neideck
b5cf6de2ac
Update OSX image versions in .travis.yml. Add some files to the Xcode project. 2017-02-15 22:53:02 +11:00
Kyle Neideck
8257f49b46
Merge pull request #98 from rakslice/pan 2017-02-14 23:32:21 +11:00
Kyle Neideck
cdea147010
Move the pan sliders into an "extra controls" section of the menu items.
Also add centre tick marks and "L"/"R" (left/right) labels to them.

The idea is to eventually include extra controls like an equalizer, recording
apps, hiding/ignoring apps, routing apps, etc.

Also, remove the left margin from the App Volumes menu items. Even macOS isn't
consistent about including that margin, as far as I can tell.
2017-02-11 16:47:52 +11:00
Kyle Neideck
a91615fc5e
Fix a deadlock when changing output device while IO is running.
BGM_Device::StartIO blocks on
BGMAudioDeviceManager::waitForOutputDeviceToStart, which could be blocked by
HAL requests that the HAL wouldn't return until BGM_Device::StartIO returned.

Also:
 - Replace BGMPlayThrough's move constructor with a SetDevices function for
   simplicity.
 - Pause/abort debug builds if an error is logged.
2017-02-01 09:09:00 +11:00
Kyle Neideck
467b072a9d
Don't throw in BGMPlayThrough::DestroyIOProcIDs if the device has been removed.
Also, default to only aborting debug builds when they log and swallow an
exception if the exception was unexpected. That is, the developer didn't
realise the code could throw.
2017-01-27 00:33:34 +11:00