Commit graph

259 commits

Author SHA1 Message Date
AshleyEM
2b71621c33
Update README.md 2019-08-23 15:44:15 -07:00
AshleyEM
884dd8fd0a
Update README.md 2019-08-23 15:19:57 -07:00
AshleyEM
904cb9b345
Update README.md 2019-08-23 14:44:52 -07:00
AshleyEM
85d2df909e
Update README.md 2019-08-23 14:18:26 -07:00
AshleyEM
966987702c
Update README.md 2019-08-23 14:13:34 -07:00
AshleyEM
5c0d806e57
Update README.md 2019-08-23 14:10:22 -07:00
AshleyEM
fc55ce1c54
Update README.md 2019-08-21 16:31:45 -07:00
AshleyEM
d7cb6e9318
Update README.md 2019-08-21 15:27:23 -07:00
AshleyEM
e5043e3fe0
Update README.md 2019-08-19 15:44:58 -07:00
AshleyEM
c652955a04
Update README.md 2019-08-19 14:25:12 -07:00
AshleyEM
f3ef314cd9
Update README.md 2019-08-19 14:16:32 -07:00
Kyle Neideck
8ed95eb83b
Make sure Homebrew Travis CI builds won't show a password prompt.
`sudo` is usually passwordless in Travis CI builds, but for some reason
`sudo -v` still causes a password prompt in macOS Travis builds.

_uninstall-non-interactive.sh already included a workaround for this,
but it doesn't work when the Travis build for the Homebrew Cask calls
`brew uninstall background-music`, which then calls
_uninstall-non-interactive.sh. The old workaround used the `TRAVIS` env
var, but Homebrew seems to run the script in an environment without it.

See <https://github.com/Homebrew/homebrew-cask/pull/67524>.
2019-08-14 21:58:10 +10:00
Kyle Neideck
7f6c0e9d4f
Update the README to link to v0.3.1.
Also, bump the minor version number.
2019-08-13 18:46:25 +10:00
Kyle Neideck
9e50e2348b
Bump the patch version. I code signed v0.3.0 incorrectly. #233 2019-08-13 10:13:52 +10:00
Kyle Neideck
0388b26aa1
Add Xcode 11 to Travis CI builds. 2019-08-06 17:24:25 +10:00
Kyle Neideck
002afc0cd1
Update copyright years. #227 2019-08-05 22:42:17 +10:00
Kyle Neideck
a45335b65d
Add GPMDP to the list of supported music players in the README. 2019-08-05 21:31:58 +10:00
Kyle Neideck
0a7be7d32c
Enable Hardened Runtime in BGMApp, BGMXPCHelper and BGMDriver.
This is required for Notarization, which will be mandatory in macOS
Catalina.

Also, suppress some STL deprecation warnings in PublicUtility code. (The
warnings were recently added to Clang.)
2019-08-05 21:25:57 +10:00
Dave Nicolson
d26e9ee3d1 Update README.md 2019-08-05 21:05:19 +10:00
Kyle Neideck
94fc1259e3
Add BGMMusic files to the Xcode project.
Also, add BGMMusic to BGMMusicPlayers and add the Scripting Bridge
header for Music.app.

Resolves #216.
2019-07-03 02:34:15 +10:00
Kyle Neideck
a97529e812
Merge branch 'theLMGN-patch-1' 2019-07-03 02:29:52 +10:00
Kyle Neideck
0231e131df
Merge branch 'patch-1' of https://github.com/theLMGN/BackgroundMusic into theLMGN-patch-1 2019-07-03 01:50:47 +10:00
Vikas Shukla
9951a82879 Minor error update to README
An accidental "the" I think.
2019-07-03 01:45:27 +10:00
Leo Nesfield
3ac7221cb1
Create BGMMusic.h 2019-06-30 17:16:16 +01:00
Leo Nesfield
2be4bab54f
Create BGMMusic.m 2019-06-30 17:14:35 +01:00
Kyle Neideck
04f17301a1
Fix BGMApp test compilation.
Updates the lists of files to be compiled when the tests are built,
which were missing the new source files added in the previous commit.
2019-06-09 19:43:17 +10:00
Kyle Neideck
e616718eab
Add music player: Google Play Music Desktop Player.
The code for GPMDP is a lot more complicated than the code for other
music players. See BGMGooglePlayMusicDesktopPlayer.h for details.

Adds a class, BGMAppWatcher, to hold the code that notifies listeners
when a given app is launched or terminated.

Resolves #161.
2019-06-09 18:56:12 +10:00
Kyle Neideck
503d1a92ec
Fix another crash when BGMDevice's volume is changed.
Fixes the same issue as df9815a4be, but in
BGMOutputVolumeMenuItem instead of BGMStatusBarItem.

I think the problem was that it captured a weak reference in a C++
lambda, but it would capture by (C++) reference and when the reference
was used it would be referencing invalid memory. The fix to have the
lambda capture by value instead.

See #202.
2019-03-28 18:29:54 +11:00
Kyle Neideck
2939dbe28c
Update Travis CI builds to use Xcode 10.1. 2019-03-27 13:43:10 +11:00
Kyle Neideck
a40dfde439
Fix potential minor memory leaks in BGMPreferredOutputDevices. 2019-03-27 13:36:19 +11:00
Kyle Neideck
df9815a4be
Fix a crash when BGMDevice's volume is changed.
I think that, because BGMStatusBarItem::initWithMenu was capturing a
weak reference in a C++ lambda as a C++ reference, the C++ reference
would be invalid when it was used. The fix to have the lambda capture by
value instead.

I'm not completely sure why builds from Xcode never crashed or why ASan
didn't catch the bug. Maybe the stack memory was just never
reused/invalidated with Xcode builds. (And I probably just don't
understand how ASan works well enough.)

Fixes #202.
2019-03-27 12:55:12 +11:00
Kyle Neideck
26dd2ee1ab
Minor README change. 2019-03-23 15:25:11 +11:00
Kyle Neideck
d89d1e7813
Add a warning about clipping to Known Issues in the README.
[skip travis]
2019-03-11 11:39:04 +11:00
Kyle Neideck
e093e7d3b2
Add an option to use a volume icon instead of the Background Music logo.
This is so the icon can show the current volume. Then you can hide the
built-in volume status bar item in System Preferences.

Closes #183.
2019-03-05 00:01:42 +11:00
Kyle Neideck
14df80da24
README.md: Fix the Homebrew command for installing snapshot releases. 2019-02-27 21:57:23 +11:00
Kyle Neideck
a4c93c050b
Fix build_and_install.sh failing when run from a path containing spaces.
When build_and_install.sh tried to install BGMXPCHelper, xcodebuild
would fail to run post_install.sh.

Fixes #187.
2019-01-22 21:58:47 +11:00
Erwann Mest
5257b4c94d docs(README): add snapshot version
I created a formula for cask about the snapshot version. So I'd like to add it into the README. :)
2018-12-20 10:34:23 +11:00
Kyle Neideck
30185633ac
Add Homebrew install command to the README. 2018-11-29 23:06:12 +11:00
Kyle Neideck
624369f297
Add "unsigned" to the filenames of packages from Travis CI.
My plan is to also build the packages locally (at least full releases),
code sign manually and then check that the two packages match apart from
the code signature. That way I don't have to give the Travis script
access to my signing private key, which I figure is slightly more
secure.
2018-11-24 15:03:09 +11:00
Kyle Neideck
d1bf34e741
Add folds to the Travis CI build logs. 2018-11-17 14:49:25 +11:00
Kyle Neideck
475d141ae4
Make builds more deterministic.
Packages built with package.sh should now be byte-identical except for
timestamps in Assets.car (in BGMApp resources) and modification dates in
the package's Bom file, if built with the same version of Xcode.
Hopefully this will be enough to allow builds to be reproduced, with a
bit of effort.
2018-11-12 19:15:26 +11:00
Kyle Neideck
d1f5492a47
Fix compilation errors with Clang 8 in BGMAppUITests.
You can't run the UI tests in Xcode 8 anyway, so now we just skip
compiling them.
2018-11-04 18:15:52 +11:00
Kyle Neideck
64b7ca9fd9
Fix compilation error with Clang 8 in BGMOutputDeviceMenuSection. 2018-11-04 17:57:42 +11:00
Kyle Neideck
7b8d1a0e0d
Rename BGMOutputDevicePrefs to BGMOutputDeviceMenuSection. 2018-11-04 15:28:01 +11:00
Kyle Neideck
5e12f9fc01
Move the output device menu items to the main menu.
I don't know why I put them in the Preferences menu initially. This is
more convenient.

Closes #170.

Also:
 - Update the output device menu items as needed instead of when the
   user opens the menu. This saves a bit of CPU time and means if the
   user has the menu open, changes are made when they're needed instead
   of the next time the user opens the menu.
 - Fix BGMAppUITests::testCycleOutputDevices for the latest Xcode/macOS.
2018-11-04 12:30:43 +11:00
Kyle Neideck
94f13e747c
Clarify some comments in BGMPreferredOutputDevices. 2018-10-28 18:11:40 +11:00
Kyle Neideck
4c0c656538
Store the preferred devices list in User Defaults.
BGMApp has to set BGMDevice, and often also the Null Device for a short
time, as the systemwide default audio device, which makes CoreAudio put
them in the preferred devices list in its Plist file. And since the list
is limited to three devices, it only gives us one or two usable ones.
Ideally, CoreAudio just wouldn't add our devices to its list, but I
don't think we can prevent that.

As a partial workaround, we now store our own copy of the preferred
devices list without our devices, which BGMApp can use to figure out
which devices were pushed out of CoreAudio's list by our devices.

This doesn't fix the problem entirely because our devices still take up
room in CoreAudio's list when BGMApp is closed, but I think that would
be harder to solve.

See #167.

Also:
 - Handle setting the initial output device in BGMPreferredOutputDevices
   instead of BGMAudioDeviceManager.
 - Fix a crash in BGMOutputVolumeMenuItem::dealloc caused by using
   dispatch_sync to dispatch to the main queue while running on the main
   queue.
 - Fix a crash in BGMPreferredOutputDevices if
   /Library/Preferences/Audio/com.apple.audio.SystemSettings.plist
   doesn't exist.
 - Add Swinsian to the list of music players in the README. (I must have
   forgotten to do that when I added support for it.)
2018-10-28 17:08:47 +11:00
Kyle Neideck
871bb97a52
Increment minor version number. 2018-10-25 00:00:52 +11:00
Kyle Neideck
ffe7406025
Fix errors logged when the current output device is disconnected. 2018-10-24 23:46:28 +11:00
Kyle Neideck
29642da1cf
Update the preferred devices list when the user changes output device.
When the user chooses a different output device in BGMApp, the new
device is now added to the front of the list of preferred devices. This
stops BGMPreferredOutputDevices changing the output device back shortly
afterward when it gets a device connection/disconnection notification,
which is sent because BGMDriver's Null Device is enabled and then
disabled as part of changing the output device.

It also means BGMApp will now account for the times the output device
has been changed since BGMApp started when deciding whether to change to
a newly connected device and deciding which device to change to when the
current output device is removed.
2018-10-24 22:29:20 +11:00