Commit Graph

3693 Commits (1ef7853488545c1e90a2f1c793a2fd2565f03433)

Author SHA1 Message Date
Christopher Snowhill dad2dbf236 [Audio Threads] Add extra guard to workgroup exit
Add an extra step to the workgroup exit call, so that it only calls to
leave if the join token is valid, or at least initialized.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 17:00:59 -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 0931686a78 [Ogg Vorbis / Opus Inputs] Fix streaming titles
Fix streaming metadata titles being overridden by the Icecast stream
strings. Now the Icy metadata only overrides missing strings, so Vorbis
Comments take priority.

Fixes #275

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 10:27:17 -07:00
Christopher Snowhill a0761a41c9 [Playlist Metadata] Safety check for deletion
Apply a safety check in case the update comes for a deleted track.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 10:25:27 -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 ab32365c45 [PlaylistEntry] Fix a single warning
Fix a warning about nullability of a class member.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 10:22:31 -07:00
Christopher Snowhill 5a6295be1e [Core Audio Output] Fix possible bug in enumerator
Fix a potential bug where the device enumerator would return a nil
device name string, which would result in a crash. Instead, report an
unknown numbered device.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 08:24:19 -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 f696dc2205 [Highly Complete Input] Reject unsupported systems
Reject system identifier numbers that aren't supported, outright, rather
than waiting until the decoder is initialized.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 06:39:46 -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 67f6c931bb [Highly Complete / MIDI] Fix numeric tag reading
The new Core Data interface is especially stringent with receiving
NSNumber for the numeric types rather than NSString as was mistakenly
allowed before. Fix that to prevent exceptions.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 05:48:03 -07:00
Christopher Snowhill 3eca088cc7 Update .gitignore to block Package.resolved
Apparently my Xcode version generates files which are incompatible with
whatever Xcode build environment that Github CI runs.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 05:46:31 -07:00
Christopher Snowhill 109baf4dea [Packages] Delete Package.resolved
Apparently, my Xcode is too new for Github CI to handle this file.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 05:08:27 -07:00
Christopher Snowhill d972a6eaf5 [Playlist] Correctly handle deleted items
The member that I set myself to indicate deletion has one capital letter
to differentiate it from the built-in "delete" property of managed
objects, which doesn't do what I want, so I had to dodge it with that
capitalization thing.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 04:34:17 -07:00
Christopher Snowhill 0b3e7e3ac3 [Crashlytics] Fix symbol upload script
Use a custom script found on Stack Overflow, with some minor changes for
a little more sanity, such as using find -print0 / xargs -0 to support
paths with spaces in them.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 03:35:36 -07:00
Christopher Snowhill 277e52906a [Musepack Library] Fix capitalization of headers
Header include paths are named after the framework, which is all lower-
case, not uppercase like the source folder is named. The header include
paths inside the project are lowercase as well, so this fits.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 02:24:12 -07:00
Christopher Snowhill 1661093521 [TagLib] Completely overhaul import paths
Change most, if not all, possible import paths to use the full header
directory paths instead of relative or "assume include paths" settings.
This should fix building with the CI.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 02:19:52 -07:00
Christopher Snowhill 90b06850d0 [TagLib Plugin] Fixed some mislocated headers
These header files were imported from the wrong path. I really have no
idea why Xcode didn't catch these already with my build tree.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 02:05:48 -07:00
Christopher Snowhill f2f71d0c9b [SID Decoder] Fix capitalization of header file
Header file name is Event.h, not event.h. Newly discovered bug on case-
sensitive file system.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 00:19:30 -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 4e782807d8 [ReplayGain / Volume] Fix default volume value
Fix the default volume scale reading for newly added tracks, as this
value should be 1 for any files which do not have tags. Also add an
override to the tag applying function, to reset the default on tag
re-read operations.

Please reload the tags or re-add your files to fix them playing
silently.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 23:31:34 -07:00
Christopher Snowhill 3e01312265 [Audio Formats] Fix handling unsigned formats
This only affects the FFmpeg input, currently.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 23:29:52 -07:00
Christopher Snowhill 7044a9a852 [Core Audio Output] Add more event listeners
Sound output format changes should now happen instantaneously instead of
with a delay.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 23:28:25 -07:00
Christopher Snowhill 7bc49ccb80 [Event Handler] Fix observers for reused classes
Fix class handling so it cleans up observers if the InputNode is reused.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 18:16:09 -07:00
Christopher Snowhill 789e8e432e [Playlist Storage] Add another compatibility hook
Add a compatibility getter/setter for URL, which was renamed to url, due
to Core Storage having a requirement of all attributes starting with a
lower case letter.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 17:43:48 -07:00
Christopher Snowhill 333c6c7e8b [Spotlight Panel] Fixed to work with new Core Data
Fixed the implementation to work correctly with the new Core Data
storage system. Tracks will be garbage collected later.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 17:37:11 -07:00
Christopher Snowhill c71021fc9b [Metadata] Fix assigning Unsigned property
The PlaylistEntry class needs a compatibility wrapper for the Unsigned
member, as it is assigned by all of the inputs. Case sensitivity and all
that is. And unfortunately, Core Data requires all model members to
start with a lower case letter.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 17:05:52 -07:00
Christopher Snowhill 72c4dddf18 [Clipboard] Add textual data to clipboard on copy
The copy action now includes formatted text of the selected entries when
copying, in addition to the supported file and URL types.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 07:18:28 -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 0997ca2c93 [Core Audio Output] Improve safety on stopping
Synchronize audio setup and audio stopping on the object's own pointer,
to hopefully prevent race conditions with out of sync calls to the stop
function from both the main and the audio thread.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-15 22:46:58 -07:00
Christopher Snowhill e9230a080c [Audio Threads] Change workgroup code for safety
The changes include no longer leaving the workgroup for seeking or for
converter format changes, and also still leaving the workgroup on thread
termination if there was an error with intervals starting or finishing.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-15 21:44:03 -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 8db2e41049 [Event Handling] Add context to all observers
Add context field to all observers that support it, in case it's useful.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-15 16:47:43 -07:00
Christopher Snowhill 5bca70d141 [Job Queue] Prevent multiple jobs from stacking
Jobs are meant to be serialized, so prevent multiple jobs from queueing
simultaneously, as they are not designed to interact with each other.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-15 01:10:53 -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 6c7a3e581c [Playlist/Metadata] Prevent a race condition
Prevent a race condition with deleting playlist entries while their
metadata is still being loaded by the player.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-14 21:27:51 -07:00
Christopher Snowhill 9d558a89ab [Playlist] Guard Open in Finder against empty set
Guard Open in Finder against being called on a playlist with no
selection, which may happen if the action is triggered on an empty
playlist, which would cause an array out of bounds access error.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-13 16:28:29 -07:00
Christopher Snowhill 686cf95795 [Playlist] Guard entry selection against empty set
Guard the playlist entry retrieval function against being called on an
empty playlist, because an empty playlist would result in a division by
zero error to occur here.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-13 16:27:32 -07:00
Christopher Snowhill e5ff6cd23d [Position Slider] Fix invalid duration setting
Fix NaN condition occurring when an invalid file is played.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-13 02:01:26 -07:00
Christopher Snowhill 55c623c9a0 [Legacy XML Playlist] Fix import if queue missing
If there is somehow a legacy XML playlist, and there is no queue entry
in the plist, then it should not throw an exception from trying to add
a nil object to the return dictionary.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-13 01:46:44 -07:00
Christopher Snowhill 6825d15f68 [HRIR Filter] Employ impulse cache
An impulse cache reduces any glitching from format channel count changes
to near insignificant levels, resulting in a more pleasant experience
when there are different mixed formats playing, or even a file which
changes format mid-playback.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-12 22:21:01 -07:00
Christopher Snowhill 120a93465e [Metadata Handling] Fix dynamic info updates
Ensure that dynamic info updates, even on static files, only update the
exact track they apply to, by atomically assigning the userInfo property
before opening the decoder, so that callbacks to the player indicate the
correct track and don't assume it's the one that's currently visibly
playing. Fixes start of track metadata notifications from overwriting
the previously playing track.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-12 19:43:41 -07:00
Christopher Snowhill e84065ff5c [libOpenMPT] Updated to version 0.6.4
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-12 19:40:39 -07:00
Christopher Snowhill b675ced77b [MAD Input] Don't do full file scans on CBR files
Only do a rough estimation on files without Xing or LAME or iTunes
headers. This is much faster, even if less accurate, and may include
the footer tag if present.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-12 16:09:56 -07:00
Christopher Snowhill a4f40971dd [SQLite Store] Every schema upgrade should process
Every schema upgrade process should fall through to the next highest
version number, so they should all run, if the user has somehow upgraded
their database from such an old version.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-12 01:57:47 -07:00
Christopher Snowhill aaade58842 [Cuesheet Input] Fix metadata handling by merge
The inputs now have their own metadata function, so it should merge in
the track tags from the Cuesheet, and not just forward it to the
decoder.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-12 00:55:37 -07:00
Christopher Snowhill ab16c43c85 [Translations] Re-sync incomplete Spanish translation
Re-sync the placeholder Spanish translation from the English one.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-11 17:04:38 -07:00
Christopher Snowhill d875be0454 [Project Files] Add possibly missing framework
Bugsnag framework was possibly missing from the config files, so
it's been added properly on older Xcode.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-11 17:01:42 -07:00
Christopher Snowhill 854431b784 [MAD Input] Initialize state variable, fix crash
This should prevent a crash if the input is recycled for another file,
which would cause the output buffer to be freed, but the output size to
contain a count on first call to readAudio, which would cause a memory
access crash.

Possibly fixes #269

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-11 14:21:43 -07:00
Christopher Snowhill 90b83f8f51 [Various] Clean up various warnings
Various warnings related to uninitialized variables, or setting values
to variables that would not be used later or would be overwritten by per
loop initializers.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-11 13:42:42 -07:00