Commit graph

99 commits

Author SHA1 Message Date
Kyle Neideck
2cb572ecf4
Revert "Fix default icon shown for BGMApp bundle."
This reverts commit a4160d370d.

I've tested the icon bug on a couple of other machines now and haven't been
able to reproduce it. My "fix" did cause the bug on those machines, though,
despite fixing it on mine. Still not sure exactly what's going on, but it seems
to be a problem with my development environment.
2016-12-31 21:05:04 +11:00
Kyle Neideck
8d5ea9c67c
Auto-pause: make the unpause delay proportional to the pause duration.
We only unpause the music player, after auto-pausing it, if it's been
paused for longer than some minimum length of time. This commit reduces
that time if the music player hasn't been paused for long.
2016-12-29 02:25:44 +11:00
Kyle Neideck
651b91aeee
Fix a link in the Install section of README.md. 2016-12-28 05:04:54 +11:00
Kyle Neideck
12840cbf31
Superficial fixes in the Install section of README.md. 2016-12-28 05:00:52 +11:00
Kyle Neideck
f15708461d
Add some info about logging to CONTRIBUTING.md. (Also, some clean up.) 2016-12-28 04:43:43 +11:00
Kyle Neideck
a4160d370d
Fix default icon shown for BGMApp bundle.
I'm not sure why this is necessary or why it works. Probably an Xcode
bug or something. This is with Xcode 8.2.1 on macOS 10.12.3 Beta
(16D17a).
2016-12-26 21:46:30 +11:00
Kyle Neideck
847313a174
Log debug messages to syslog and include debug symbols in BGMApp bundle.
In BGMApp, messages logged with the DebugMsg macro now go to syslog
instead of stdout.

People running standalone BGMApp debug builds (i.e. not in Xcode) should
be able the find the debug logs more easily. Xcode still shows the debug
logs normally when running BGMApp in Xcode.

Also, debug symbols (the .dSYM directory) are now included in the
Background Music.app bundle. (In both debug and release builds.)
CrashReporter is able to find these and use them to symbolicate BGMApp
crash logs.
2016-12-26 21:27:41 +11:00
Kyle Neideck
7992a5708c
Use data source names instead of device names in the output device menu.
The names of the data source(s) for a device are generally the names
intended to be shown to the user, since the OS X volume menu, System
Preferences, etc. use them.

A menu item is now added for each data source of each output device,
rather than one per device.

Also adds some macros/functions for casting values to __nonnull.

Resolves #59.
2016-12-23 01:46:27 +11:00
Kyle Neideck
31b501e832
Make BGMPlayThrough::WaitForOutputDeviceToStart noexcept. 2016-12-16 21:54:08 +11:00
Kyle Neideck
ab9d4cdc2b
Add more exception handling to BGMApp...
And other reliability improvements. Mostly in BGMPlayThrough and the
classes that use it. Trying to catch C++ exceptions as early as possible
in the Objective-C++ code and, if necessary, convert them to NSErrors.

More errors are logged in release builds now, which will hopefully help
with debugging issues the developers can't reproduce themselves.
2016-12-15 03:20:07 +11:00
Kyle Neideck
e0acb34f29 Assume non-null in BGMDeviceControlSync.cpp. 2016-11-14 22:13:46 +11:00
Kyle Neideck
ec87adb6e9 Allow MainMenu.xib to open in Xcode 7. Mostly to fix the tests in 7. 2016-11-14 21:58:23 +11:00
Kyle Neideck
810b2ed462 Fix BGMApp unit tests. 2016-11-13 01:32:26 +11:00
Kyle Neideck
035faa615f Fix link in README. 2016-11-13 00:28:26 +11:00
Kyle Neideck
c8f6790274 Add a link to the about panel and refactor its code.
Link to the project website (GitHub) in the About Background Music
window, and move its code into its own class.

Also, update the copyright notices in the UI and README.
2016-11-13 00:06:58 +11:00
Kyle Neideck
b0bfebedc4 Add Hermes music player. (A Pandora client.)
Closes #83.
2016-11-12 20:54:04 +11:00
Kyle Neideck
da74e5ea1d Check that the user's accepted the Xcode license before installing.
If they haven't, xcodebuild would fail.
2016-10-08 19:33:38 +11:00
Kyle Neideck
a5fb68ad2b Fix permissions error in Travis build. 2016-10-07 07:41:08 +11:00
Kyle Neideck
61a9d89ef9 Do Travis builds on a case-sensitive .dmg to catch failures.
Compiling on case-sensitive filesystems has been broken a couple of
times, so hopefully this will let us catch some of those bugs early.
2016-10-06 19:20:17 +11:00
Kyle Neideck
b2a12b3e37 Change "Vox" to "VOX" in filenames.
Fixes #77: build fails on case-sensitive filesystems.
2016-10-05 22:07:58 +11:00
Kyle Neideck
d38ea256cd Don't quit BGMApp if BGMXPCHelper is missing. See #76. 2016-09-26 11:08:19 +10:00
Kyle Neideck
e31f2b1c29 Refactor and clean up BGMApp's music player code and add tests. Also...
- Destroy the Scripting Bridge application object for a music player
  when that music player isn't running.
- Move the UI code for the auto-pause menu item into its own class.
- Add a User Defaults class to BGMApp.
- Enable some more warnings for the BGMApp project.
2016-09-17 18:24:19 +10:00
Kyle Neideck
59aa04c9bc Use dot notation for properties in BGMAppVolumes.mm 2016-09-11 15:33:23 +10:00
Kyle Neideck
cbbd48dcee Show Finder in the app volumes menu. Fixes #45. 2016-09-08 00:25:03 +10:00
Kyle Neideck
c91af08d54 Enable more warnings in BGMDriver.
The PublicUtility classes are now built as a separate target so we can
disable some of those warnings for it.
2016-09-08 00:24:57 +10:00
Kyle Neideck
484ffa16f3 BGMDriver: Clean up constructor initializer lists.
See https://isocpp.org/wiki/faq/ctors#ctor-initializer-order.
2016-09-06 22:18:11 +10:00
Kyle Neideck
4e091c7398 Merge pull request #73 from Qix-/patch-1
Short circuit audible loop
2016-09-04 00:56:51 +10:00
Josh Junon
808fe1b6b3 Short circuit audible loop
Slight micro-opt that will short circuit the `BufferIsAudible` loop if we've already found something audible.

Was looking through your IO layout and noticed this.
2016-09-02 12:14:29 -07:00
Kyle Neideck
758fe02c7a Add OS X 10.10 and Xcode 8 builds to .travis.yml. 2016-08-23 19:42:07 +10:00
Kyle Neideck
23fd57713d Fix nullability warnings in builds using the macOS 10.12 SDK.
Fixes #70.
2016-08-22 00:42:55 +10:00
Kyle Neideck
dad87b57b6 Add a summary to DEVELOPING.md and update a few sections.
The summary is originally from #66.
2016-08-17 23:22:18 +10:00
Kyle Neideck
679d624860 Add BGM_Driver tests: get/set the music player bundle ID property. 2016-07-04 16:32:59 +10:00
Kyle Neideck
55e9f60774 Merge branch 'hoke-t-Decibel'. Resolves #17. 2016-06-30 09:32:12 +10:00
Kyle Neideck
e3fcbdb37e Add BGMDecibel files to the Xcode project. 2016-06-30 09:30:05 +10:00
Kyle Neideck
1ee9fa348e Fix build failure on case-sensitive file systems. Fixes #64.
It seems that BGMDriver was failing to compile on case-sensitive file
systems because BGM_Types.h included "AudioServerPlugin.h" instead of
"AudioServerPlugIn.h". (Lowercase "i".)

I tried building with the project and Xcode on a case-sensitive disk
image and it would fail without this patch. So I figure it should at
least build now. I haven't had time to test Background Music on a system
running on a case-insensitive file system yet, so I added a TODO about
it in TODO.md.

Also, some unrelated tidying up.
2016-06-16 18:38:29 +10:00
Kyle Neideck
3684483543 Merge branch 'Decibel' of https://github.com/hoke-t/BackgroundMusic into hoke-t-Decibel 2016-05-14 10:42:50 +10:00
Tanner Hoke
30a1735346 git rm extraneous Decibel files and use HTTPS links in README.md 2016-05-12 17:24:55 -05:00
Kyle Neideck
4dba9412fb Install NullAudio driver before tests run on Travis. 2016-05-11 10:02:31 +10:00
Kyle Neideck
90bceb9887 On Travis, quit BGMApp before running the tests.
Also, log the installed audio devices and their audio IDs.

I think the tests are probably failing because the Travis VMs don't have
any audio devices. If so, this won't actually fix the tests, but it
should help us narrow it down.
2016-05-11 02:34:54 +10:00
Kyle Neideck
6c9ca6e85c Merge pull request #53 from Piccirello/master
Add shortcut for changing output device from menu bar
2016-05-11 01:27:29 +10:00
Kyle Neideck
82ea2e4803 Merge pull request #27 from hoke-t/master
Disable the Auto-pause Music menu item if the selected music player isn't
running
2016-05-11 00:19:49 +10:00
Kyle Neideck
bbe65a2431 Only pretend to disable the auto-pause menu item.
Instead of disabling the menu item when the music player isn't running,
just make it appear disabled. That way you can always disable auto-pause
without having to open your music player, but the UI still indicates
when it thinks the music player isn't running.
2016-05-11 00:08:46 +10:00
Kyle Neideck
a229791ade Merge branch 'master' of https://github.com/hoke-t/BackgroundMusic into hoke-t-master 2016-05-10 07:06:57 +10:00
Piccirello
be4135523e Add shortcut for changing output device from menu bar 2016-05-03 16:36:53 -04:00
Kyle Neideck
b58ad2a1f8 Fix possible deadlock when starting IO.
BGM_Device::StartIO was holding the state mutex longer than it needed
to, which meant HasProperty, GetProperty, etc. couldn't return. If
BGMPlayThrough was notified about IO starting after StartIO locked the
mutex, BGMPlayThrough would get stuck trying to get one of BGMDevice's
properties.

Fixes #46.
2016-04-30 21:28:16 +10:00
Kyle Neideck
960fe0d28d Fix rare race condition in BGM_TaskQueue (hopefully).
Also enable a few more warnings in the BGMDriver project.
2016-04-30 20:50:29 +10:00
Kyle Neideck
d827e7e0d8 Fix build script printing a git error when run outside of a git repo. 2016-04-29 13:29:19 +10:00
Kyle Neideck
34071e633f Add an install "one-liner" to the README.
Also fix a bug when running build_and_install.sh from a directory other
than the root of the project.
2016-04-29 13:18:52 +10:00
Kyle Neideck
d021dff7a6 Merge pull request #50 from ZV95/patch-1
Addition of Wiki Install Instructions
2016-04-29 12:20:27 +10:00
Kyle Neideck
e95f371305 Add debug build option to build script.
Also add info about logging to CONTRIBUTING.md.
2016-04-29 12:09:37 +10:00