Commit Graph

331 Commits (main)

Author SHA1 Message Date
Christopher Snowhill 8acd7fb8f6 [Crashlytics] Add AppCheck for debugging builds
Enable Firebase AppCheck in debugging builds, so that more info may be
logged.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 19:18:41 -07:00
Christopher Snowhill 82e3f7bd9a [Crashlytics] Enable data collection by default
Enable data collection by default, so crashes are hopefully logged.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 19:18:05 -07:00
Christopher Snowhill 9cc5ba7c0e [Crashlytics] Enable much earlier sending reports
Sending reports is now handled synchronously on the startup path, so
that unsent reports can be sent before a startup crash causes further
crashes to occur. This is apparently needed to help one particular user
catch whatever is causing the app to crash for them.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 15:43:12 -07:00
Christopher Snowhill c7cd9b6daf [Playlist Metadata] Apply metadata correctly
Apply dynamic metadata update refreshes to the correct track index.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 10:24:45 -07:00
Christopher Snowhill 7cf6a7e03b [Crashlytics] Move the crash handler initializer
Move the initializer to a function that will be called earlier in the
startup stage. Mainly to catch crashes in the playlist importer for
legacy playlist formats.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 07:24:12 -07:00
Christopher Snowhill 39f4d09c1a Use NSNumber Literals as much as possible
Replaced a bunch of [NSNumber numberWith...] with NSNumber Literals.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 06:39:02 -07:00
Christopher Snowhill 95df58dd75 [Crash Reporting] Replace Bugsnag with Crashlytics
It was a fun ride, but I think I want to try something different. Users,
please be sure not to have DNS blocking for Crashlytics if you want me
to have any useful bug reporting info if it crashes on you, or otherwise
blows up. Otherwise, I don't get any useful data to help me fix crashes.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 00:11:48 -07:00
Christopher Snowhill 4c95c943ef [Playlist Storage] Rewrite to use Core Data
Completely rewrite the playlist storage once again, this time with a
much faster Core Data implementation. It still uses a little magic for
Album Artwork consolidation, but string consolidation doesn't seem to be
needed to reduce the disk storage size. Works much faster than my silly
implementation, too.

Old implementations are still kept for backwards compatibility with
existing playlists.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 07:14:33 -07:00
Christopher Snowhill 02d2ab01a7 [Notifications] Prevent crash on deleted tracks
Prevent an unhandled exception when a notification is sent on a track
which has been deleted from the playlist.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-15 19:55:29 -07:00
Christopher Snowhill 92573ec088 [Job Queue] Overhauled long action handling
Long actions, such as file opening, playlist loading, metadata loading
and refreshing, etc, are now handled through NSProgress. Additionally,
a new status bar change displays the progress of the task instead of
the total duration of the playlist. Finally, app quit is blocked by a
running task, and if the app is quit while a task is running, it will
be delayed until the task completes, at which time the app will
terminate cleanly.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-15 01:01:45 -07:00
Christopher Snowhill f22a74ab3a [Translation Support] Fix several string constants
Several string constants were not fetching from the translation strings
table. Fixed this.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-11 13:34:57 -07:00
Christopher Snowhill aca29e472b [Bug Reporting] Introduce Bugsnag crash reporting
Crashes will now be collected with an optional comment, and uploaded on
next launch of the app.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-09 18:58:42 -07:00
Christopher Snowhill eaa73bc52f [Threading] Queue expensive actions outside audio
Use delayed dispatching on expensive operations which occur every time
the "heard" track end happens, and when audio metadata is changed by a
stream, so that they are inserted into the main thread queue after the
invoking callback returns control execution back to the audio thread.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-05-30 23:59:42 -07:00
Christopher Snowhill 4035ca861f Spectrum Visualizer: Add customization options
Add options to the Appearance preferences page to allow changing the
spectrum's projection between a 2D-like one and 3D perspective, and add
options to change the bar and peak dot colors.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-05-22 15:26:27 -07:00
Christopher Snowhill 2aa3ddd545 Icon: Replace icon with a newly rendered design
Icon has now been replaced with a newly rendered design, and code
changed accordingly.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-05-02 14:35:09 -07:00
Christopher Snowhill efadd1d012 Changed add files to observe playlist settings
Reverted 7f3da31b45, and reverted a past
commit of some sort. Now adding URLs and opening files from the Open...
option will obey the preferences for playlist adding, including modifier
keys, if used.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-03-08 00:04:14 -08:00
Christopher Snowhill 9a2ac6ae5a When starting playback, start shuffle at selection
If starting playback from a given playlist entry, or selection, then
start shuffle mode from that track. Otherwise, start shuffle from the
beginning of the shuffle list.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-21 22:01:01 -08:00
Christopher Snowhill b6330279ce Start playback on first shuffle item in shuffle
When in shuffle mode, start playback on the first item in the shuffle
list, rather than the selection, or the start of the playlist.

Fixes #241

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-21 21:53:41 -08:00
Christopher Snowhill b63a076e21 Add more automation commands and properties
Added commands to control playback: play, pause, stop, previous, next.
Also added a spam property to PlaylistEntry, to return the formatted
spam string for the playlist entry, which is currently limited to the
playing item.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-21 21:52:09 -08:00
Christopher Snowhill 9614ec6e98 Add option to quit on natural stop
When the option is enabled, and playback comes to a completion, the
player will quit on its own.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-21 20:55:42 -08:00
Christopher Snowhill c242d53200 Resume on restart: Only seek into seekable files
This allows streams to be resumed from the beginning when restarting.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-16 13:22:53 -08:00
Christopher Snowhill 627aeda8b1 Set default volume to 75%
This doesn't fix an outstanding issue which will be fixed by the next
commit, but it does fulfill a request.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-15 22:49:26 -08:00
Christopher Snowhill df661dc466 Fix dynamic metadata in some cases
For some reason, this sometimes gets set to nil. Fix to refer to the
current track in that case.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-15 00:34:57 -08:00
Christopher Snowhill 7ef583340d Equalizer: Replace dialog with custom job
New custom equalizer dialog, painstakingly hand assembled.
2022-02-13 11:05:32 -08:00
Christopher Snowhill 6d09b72c1d Dynamic info now pushes to the correct track
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 07:29:02 -08:00
Christopher Snowhill 5ff1f95481 Add decoder open error indicator
When decoder is redirected to the internal silence decoder, show an icon
on the playlist indicating a playback error.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 02:15:48 -08:00
Christopher Snowhill d77a5472f3 Only seek on restart if file is seekable
Do not restart from the last position if file isn't seekable.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-09 13:42:47 -08:00
Christopher Snowhill 7cea254f4c Implement framework for dynamic metadata updates
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-08 21:21:53 -08:00
Christopher Snowhill b927f4c02b Replace more NSDictionary use with literals
Use literals to initialize fixed NSDictionary objects in various places.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-08 19:56:04 -08:00
Christopher Snowhill 838b31a6e8 MIDI: Replaced FluidSynth with BASSMIDI again
FluidSynth is just too unstable, and also just bad in general.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-08 18:29:03 -08:00
Christopher Snowhill f4f4f80f64 Restart playback on device or output format change
Now the output is restarted on the current file at the current position
if the output format has changed. This should resolve the issue finally.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 22:44:56 -08:00
Christopher Snowhill 85c7073649 Reformat my own source code with clang-format
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-06 21:49:27 -08:00
Christopher Snowhill d4990de7f3 Adopt the sox resampler instead of RetroArch
Removing RetroArch code from my project.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-01 18:55:39 -08:00
Christopher Snowhill 77a079bd53 Mini Window: Fix saving and restoring position
Fixes #212

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 18:00:34 -08:00
Christopher Snowhill 5184c8e48b Sparkle: Disable automatic updates when debugging
Disable automatic update checking on startup for debug builds. Prevents
a crash from occurring when it attempts to retrieve the version number.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 17:01:51 -08:00
Christopher Snowhill 7e5107d431 User Settings: Obey standards
Replace "midi.plugin" with "midiPlugin", as per the value naming
conventions that Apple set out. Migrate the old value if found.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 16:38:53 -08:00
Christopher Snowhill e7b78085ca New feature: Implemented headphone virtualization
This new virtualizer uses the Accelerate framework to process samples.
I've bundled a HeSuVi impulse for now, and will add an option to select
an impulse in the future. It will validate the selection before sending
it to the actual filter, which outright fails if it receives invalid
input. Impulses will be supported in any arbitrary format that Cog
supports, but let's not go too hog wild, it requires HeSuVi 14 channel
presets.
2022-01-25 16:50:42 -08:00
Christopher Snowhill ec7009f3fc Equalizer: Instances of GraphicEQ AU are now relinquished to the main thread for destruction instead of being destroyed by the Core Audio Output shutdown 2022-01-24 19:49:43 -08:00
Christopher Snowhill fe4e17a4a0 Equalizer: Remove equalizer from window, thus saving settings, on stop or shutdown
Fixes #204
2022-01-23 20:25:42 -08:00
Christopher Snowhill 2165d37144 Metadata: Now supports disc number field where possible 2022-01-21 21:49:17 -08:00
Christopher Snowhill a743f914e9 HDCD Indicator: Made this less janky too 2022-01-21 15:00:44 -08:00
Christopher Snowhill 26e0e0cead HDCD Decoding: Add HDCD indicator 2022-01-20 23:53:45 -08:00
Christopher Snowhill f2feb3bcd7 Equalizer: Fix applying equalizer presets on automatic track change 2022-01-19 01:23:59 -08:00
Christopher Snowhill 5c17dc9207 Notifications: Only send position notifications periodically 2022-01-19 00:41:12 -08:00
Christopher Snowhill 684951bdc0 Change a bunch of NSArray declarations to const collection literals 2022-01-18 18:12:57 -08:00
Christopher Snowhill e70efdaa5a Donate options: Re-launched my Patreon page, so added the link back 2022-01-18 00:07:40 -08:00
Christopher Snowhill 7a0c1d230e Volume control: Make preamp optional, defaulting to a limit of 100% volume 2022-01-17 22:41:26 -08:00
Christopher Snowhill 83ad969d9b Equalizer: Add option for presets to track the music genre tags 2022-01-17 20:43:08 -08:00
Christopher Snowhill dbc0698cee Equalizer: Implemented stock presets 2022-01-17 06:37:38 -08:00
Christopher Snowhill 87c771c67c Equalizer: Add option to toggle the equalizer on or off 2022-01-17 01:22:15 -08:00
Christopher Snowhill 71b2f7a4f2 Implement graphic equalizer 2022-01-16 07:32:47 -08:00
Christopher Snowhill d3548d77e7 Hide current artist from dock context menu when not playing or when there is no artist set 2022-01-15 23:41:02 -08:00
Christopher Snowhill 7da599fe3c Remove stale function declarations 2022-01-15 23:30:43 -08:00
Christopher Snowhill 602facf31a Move feed and downloads back to S3 2022-01-15 19:04:26 -08:00
Christopher Snowhill 3b62842021 Playback Notifications: Prevent crash when notifying a track with unusable album artwork 2022-01-11 20:39:10 -08:00
Christopher Snowhill c4c9a741ef Replaced AudioToolbox converter process with homebrew solution, using the RetroArch sinc resampler 2022-01-11 04:09:19 -08:00
Christopher Snowhill 87ebca5e03 Really fix saving track position on quit 2022-01-09 03:17:43 -08:00
Christopher Snowhill 6e9266e194 Fix track position storage on quit 2022-01-09 03:06:36 -08:00
Christopher Snowhill 3e72087a41 Play position is stored every 10 seconds, and status is stored every time playback is started, paused, stopped, or seeked 2022-01-09 02:34:29 -08:00
Christopher Snowhill 7fe67b1630 Implement dock icon progress bar indicator for many processing operations, including adding tracks, removing tracks, and loading or reloading track metadata 2022-01-09 02:10:08 -08:00
Christopher Snowhill 917b7457b6 Made resume playback on startup so that seeking operation is entirely atomic with starting playback, so the new seeking behavior doesn't have the potential to crash the player 2021-12-26 04:35:54 -08:00
Christopher Snowhill 2445cc94a9 - Retrieve profile paths properly instead of hard coding
- Display playlist total duration in units up to weeks and down to just seconds, and only pluralize units as necessary
- Major change: Implemented a SQLite disk backed playlist, track data, and queue storage system, which will be synchronized from the player in real time, and will hopefully survive system or app crashes. Existing plist playlist will be imported on first run, and removed on shutdown.
2021-12-24 01:01:21 -08:00
Christopher Snowhill 91bd653b55 Fading: Hopefully fix fading being broken after fading in once, possibly a rounding error that depends on the volume level set before fading in 2021-11-17 21:12:25 -08:00
Christopher Snowhill 71dd68036b Remove obsolete donation methods 2021-10-02 18:42:19 -07:00
Christopher Snowhill fdae7eec21 File info: Implemented support for Album Artist and Codec fields 2021-10-01 19:18:42 -07:00
Calvin Buckley d18c9c9bb0 Why was this commented out? 2021-08-08 17:57:42 -03:00
Calvin Buckley cdde55004a Send metadata so that NPIC can receive stop events at end of playback
Otherwise, the NPIC will just show the last track stuck at the last second.
There may be a better place to put this.
2021-08-08 17:55:51 -03:00
Christopher Snowhill fc70e0e8b4 Notifications: Fix so it supports external artwork, and also fix a crash where invalid embedded artwork would cause it to crash 2021-08-07 15:09:36 -07:00
Calvin Buckley 0e6747c21a Provide more information to MPNowPlayingInfoCenter, including album art
NPIC can ask for a lot of metadata, but for now, provide it only what (at least I know) PlaylistEntry can provide. The biggest missing one was album art, so this change should be appreciated by those who do use it.

I don't know what it can do with the other metadata though, seeing at least on macOS, it can only do album/artist/track title/artwork.
2021-06-21 19:45:46 -03:00
Dzmitry Neviadomski 9c58f67c48 Fix Info button sizing when album art not present. 2021-05-05 02:03:55 +03:00
Christopher Snowhill 4cf76dd7e3 MIDI: Replaced BASSMIDI with FluidSynth 2021-05-03 19:18:55 -07:00
Christopher Snowhill 13bd399b31 Clean up most warnings and update some dependencies 2021-04-29 18:16:24 -07:00
Christopher Snowhill 5c6b145f9a Update playback position 5 times per second instead of once, increasing smoothness of seekbar on shorter tracks, and hopefully solving jitter on some tracks 2021-04-19 23:51:31 -07:00
Christopher Snowhill d06eec4ff0 Set allowed extensions for the save picker when saving a playlist 2021-04-09 11:16:12 -07:00
Christopher Snowhill cadb54b454 Fix shutdown action so it removes the playlist filter before saving the playlist 2021-04-09 11:09:18 -07:00
Dzmitry Neviadomski 3a3694d78b Add option for Mini Player to appear on top. 2021-03-03 00:04:59 +03:00
Christopher Snowhill 483b8d6647 Don't load metadata for stream URLs 2021-02-28 18:48:21 -08:00
Dzmitry Neviadomski 8105b9e2b2 Modernize PlaybackEventController. 2021-02-26 23:01:48 +03:00
Dzmitry Neviadomski 604edc8099 Update playback control tooltips. 2021-02-21 01:38:52 +03:00
Dzmitry Neviadomski 97cc1e9845 Remove Apple Remote leftovers. 2021-02-19 07:32:33 +03:00
Dzmitry Neviadomski 18896dcc3e Rework Titlebar.
Show Album art in info button.
2021-02-19 02:58:57 +03:00
Dzmitry Neviadomski b08263159e Show Now Playing bar only when needed.
Fixes #101
Fixes #105
2021-02-19 01:07:05 +03:00
Dzmitry Neviadomski a07d07c9f9 Fix Mini window restoring.
Fixes #99
2021-02-14 03:10:03 +03:00
Dzmitry Neviadomski a64f5e08e6 Use GitHub issues for reporting feedback. 2021-02-09 03:12:31 +03:00
Dzmitry Neviadomski 899152db49 Add ability to change toolbar style.
Fixes #86
2021-02-07 01:15:12 +03:00
Dzmitry Neviadomski e313cdac14 Reflect playback status in log correctly 2021-02-07 00:39:19 +03:00
Dzmitry Neviadomski 864c56a408 Store AppController<NSApplicationDelegate> in MediaKeysApplication 2021-02-07 00:33:47 +03:00
Dzmitry Neviadomski 5e3ed2af4b Remove ThirdParty SPMediaKeyTap 2021-02-07 00:27:14 +03:00
Dzmitry Neviadomski d0ee3622ed Use MPRemoteCommandCenter without avaliability checks. 2021-02-07 00:24:45 +03:00
Dzmitry Neviadomski 9840d87127 Convert CogStatus enum to NS_ENUM 2021-02-07 00:22:19 +03:00
Dzmitry Neviadomski a0afe85130 Fix deprecations with replacemnt and reindent touched files. 2021-01-27 05:30:19 +03:00
Dzmitry Neviadomski 19dbf4c9f5 Migrate to MASShortcut.
Removed NDHotKey code.
Added ability to restore default shortcuts.
Migrated old user-set shortcuts.
2021-01-25 06:47:09 +03:00
Dzmitry Neviadomski ab88e1b65c Use NSSet for broken feed URL lookup. 2021-01-25 06:23:48 +03:00
Dzmitry Neviadomski 84b473f847 Cleanup NSDrawer leftovers from AppController. 2021-01-09 12:47:11 +03:00
Dzmitry Neviadomski 78d8c0050c Revamp Mini Window shortcuts.
Fix deprecation warnings.
Set max and min size for content view in code.
2021-01-08 12:15:01 +03:00
Christopher Snowhill 1aa9b5a01c
Merge pull request #61 from nevack/nevack/notifications
Show album art with UserNotification api.
2021-01-06 23:22:15 -08:00
Dzmitry Neviadomski e16d4e8aa7 Save artwork to jpg instead of png to reduce size. 2021-01-07 08:45:44 +03:00
Dzmitry Neviadomski 05f66d40f3 Show Album Art with UserNotification. 2021-01-07 07:44:07 +03:00
Dzmitry Neviadomski 52c31c5117 Hide Zoom button for Mini Window.
Also fix 4 deprecation warnings.
2021-01-07 07:41:58 +03:00
Dzmitry Neviadomski c192fb5c41 Fix crash when Quitting without active track set. 2021-01-07 01:40:49 +03:00