Commit graph

114 commits

Author SHA1 Message Date
Christopher Snowhill
0c8f072deb Cleanup: Massive code cleanup and reorganization
Cleaned up project settings to current defaults, except for the macOS
deployment version, which is still 10.13. Cleaned up a lot of headers
and such to include with angle braces instead of double quotes. Enabled
build sandbox in a lot of places. Disabled subproject signing in several
places, for libraries and frameworks which will be stripped and signed
when they are copied into place in the final build.

Also, while trying to solve compilation issues, the visualization
controller was reverted to the Objective C implementation, which is
probably faster anyway. Stupid Swift/Objective-C language mixing issues.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-02-25 23:56:31 -08:00
Christopher Snowhill
c74423c32d TagLib: Implement preliminary writer class
This is not currently being used anywhere, but may function eventually.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-02-17 04:25:15 -08:00
Christopher Snowhill
73161fdc12 TagLib: Update metadata readers
Update the readers to support the newly added tag fields, and also read
the supported format list from the library itself.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-02-17 04:23:29 -08:00
Christopher Snowhill
de6063780b TagLib: Re-enable some file types
These may be handled by the Core Audio input, which does not read tags
on its own.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-02-14 18:59:00 -08:00
Christopher Snowhill
76d42f2c08 Fix up team identifiers again
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-02-10 14:48:17 -08:00
Christopher Snowhill
8786f2b21e TagLib: Fix up project file
Gah, how in heck did Xcode end up inserting an absolute
path? Fix that, and some other leftovers.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-01-30 02:18:16 -08:00
Christopher Snowhill
e9a17a8ba5 TagLib: Add exception handling
The TagLib C++ code was missing generic try/catch handling
which could result in any generic errors throwing straight
to a full crash. Add exception handling and logging, which
will fix a logged crash regardless of whether the tags are
read correctly or not by the newer TagLib version.

Fixes #415

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-01-29 23:57:12 -08:00
Christopher Snowhill
61165a022a TagLib: Replace bundled copy with upstream 2.0.2
Include a Framework build, unmodified, RelWithDbgInfo.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-01-29 23:41:00 -08:00
Christopher Snowhill
4ac4881e4c
Tags: Expose Composer tag through interfaces
Implement the composer field interface to playlist item tag
reading and writing.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2023-09-02 21:00:20 -07:00
Christopher Snowhill
5239c1a5c8
Disable dead code stripping
No idea why this was enabled, no idea if I should disable it.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2023-07-21 02:38:53 -07:00
Christopher Snowhill
eb26ab8be4
Update projects and source in prep for Xcode 15
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2023-06-08 04:12:29 -07:00
Christopher Snowhill
190d6959fd
Tags: Implement unsynced lyrics into TagLib plugin
Implement unsynced lyrics reading into TagLib frontend plugin.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2023-02-23 17:41:50 -08:00
Christopher Snowhill
e330c64f43 Enable warnings to track stack overuse
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-24 18:41:45 -07:00
Christopher Snowhill
8d851e5bda [Input API] Change input readAudio method
readAudio now returns an AudioChunk object directly, and all inputs have
been changed to accomodate this. Also, input and converter processing
have been altered to better work with this.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-10 15:22:04 -07:00
Christopher Snowhill
c32d14a048 [Project Files] Change most to enable modules
Most projects needed to be changed to enable C or Objective C modules.
Hopefully, this improves debugging.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-10 15:21:48 -07:00
Christopher Snowhill
8ee4a04f3b Experimental tag support redesign
This redesign completely changes how tags are stored in memory. Now all
arbitrary tag names are supported, where possible. Some extra work will
be needed to support arbitrary tags with TagLib, such as replacing it
with a different library.

Translation pending for a couple of strings.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-08 16:35:34 -07:00
Christopher Snowhill
cd45941a93 Greatly improve tag reading performance
Improve tag reading performance for Ogg, Opus, FLAC, TTA, and TAK, by
eliminating TagLib from the equation in those cases and just using the
respective file inputs to do the tag reading, which is apparently a lot
faster anyway.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-05 00:55:21 -07:00
Christopher Snowhill
e37d1d15b1 Remove unnecessary files from build and copy steps
Remove a single .inc include from CogAudio build phase, as it's included
but not compiled as Pascal like Xcode thinks. Also remove a bunch of
files from being copied into the resulting .framework and .bundle files
during link stage, as we don't need to distribute that stuff.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-04 23:58:58 -07:00
Christopher Snowhill
6a46389310 [Tag Reading] Moved external cover art reader
Moved external cover art reader to a place where it can be used for any
format, even formats unsupported by Metadata Reader interfaces.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-02 14:59:19 -07:00
Christopher Snowhill
bf1afd1923 [TagLib] Disable MP4 tag reader, as it can crash
This MP4 tag reader is buggy. Disable it in favor of FFmpeg decoder's
metadata reader.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-02 04:38:29 -07:00
Christopher Snowhill
5b6dacd29c Cog now requires macOS 10.13 as a minimum version
All optional fallback code for older versions has also been removed, and
everything now assumes 10.13.0 or newer. Some cases are still included
for point releases, such as 10.13.2.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-22 22:54:32 -07:00
Christopher Snowhill
8d031f394b Assign blank development team in project files
Hopefully this blank assignment will spare these files from being
touched by Xcode again in the future, when the variable in question is
imported from a developer supplied configuration file.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-21 23:27:53 -07:00
Christopher Snowhill
f2c6ae39c3 Remove developer supplied configuration file
This file should not be referenced directly by projects, otherwise it
will be expected to exist, even in CI.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-21 23:26:51 -07:00
Christopher Snowhill
aa36e3ce10 Completely overhaul code signing practices
Redesign the code signing from the ground up. Now all bundles and their
embedded frameworks import the Shared.xcconfig file and enable its
settings, so they may be signed with Apple Development instead of sign
to run locally. This apparently isn't necessary for frameworks which are
embedded in the main app bundle directly, only for the bundles and their
frameworks.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-21 22:42:33 -07:00
Christopher Snowhill
8dddf6a115 [Sandbox] Refine broker to return handle to token
Sandbox Broker now returns a handle to the exact path object that was
retained by the caller, so it will be released correctly, regardless of
what happens to the list of bookmarked paths.

Also refined the bookmark path comparison function. For existing paths,
it will find the first match. For new paths, it will prefer the longest
path instead, to try to find the deepest matching bookmark.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-20 22:10:43 -07:00
Christopher Snowhill
c23bece62c Reintroducing App Sandbox, and more
- Implemented App Sandboxing in a more friendly manner.
- All sandboxed paths will need to be set in Preferences. Set as loose
  a path as you want. The shortest path will be preferred.
- Removed Last.fm client support, as it was non-functional by now,
  unfortunately. Maybe something better can come in the future.
- Added support for insecure SSL to the HTTP/S reader, in case anyone
  needs streams which are "protected" by self-signed or expired
  certificates, without having to futz around by adding certificates to
  the system settings, especially for expired certificates that can't
  otherwise be dodged this way.

If you want to import your old playlists to the new version, copy the
contents of `~/Library/Application Support/Cog` to the alternate sandbox
path: `~/Library/Containers/org.cogx.cog/Data/Library/Application `...
...continued...`Support/Cog`. The preferences file will migrate to the
new version automatically.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-20 03:35:29 -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
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
00ea4562dc Update project files for Xcode 14 recommendations
Update all project files with new upgrade version number, and add the
dead code stripping option. Don't touch MASShortcut because it's not my
project.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-07 18:56:11 -07:00
Christopher Snowhill
7f3bf052ca Update supported file name extensions for art
Art read from external files supports more formats than previously
listed here. Amend the list accordingly.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-16 01:56:34 -08:00
Christopher Snowhill
e13f83609e FFmpeg Input: Implement stream metadata reading
Now reads Icy interval metadata and timed ID3v2 tags.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-08 21:34:28 -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
72f1168498 TagLib: Support reading Apple SoundCheck tags from ID3v2 and MP4 2022-01-22 20:20:24 -08:00
Christopher Snowhill
2165d37144 Metadata: Now supports disc number field where possible 2022-01-21 21:49:17 -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
d24a01a637 Implemented basic embedded CueSheet support 2022-01-14 16:46:35 -08:00
Christopher Snowhill
fdae7eec21 File info: Implemented support for Album Artist and Codec fields 2021-10-01 19:18:42 -07:00
Christopher Snowhill
cfeadad97f Reduce minimum OS to macOS 10.12 2021-09-18 01:08:49 -07:00
Christopher Snowhill
510c762921 TagLib plugin: Implement FLAC embedded art reading 2021-07-03 15:31:26 -07:00
Christopher Snowhill
13bd399b31 Clean up most warnings and update some dependencies 2021-04-29 18:16:24 -07:00
Dzmitry Neviadomski
a6aaeafdca Re-apply patch for replay gain support 2021-02-07 06:50:28 +03:00
Dzmitry Neviadomski
15cbc97040 Adapt to new version of TagLib and read Vorbis Album art. 2021-02-07 04:48:49 +03:00
Dzmitry Neviadomski
1d84b7b682 Fix loading of cover art from same directory. 2021-02-07 03:54:31 +03:00
Dzmitry Neviadomski
70a22e9611 Fix some more warnings. 2021-01-27 05:12:07 +03:00
Dzmitry Neviadomski
64b9764b2e Inhibit ThirdParty libraries build errors.
This helps as to actually see warnings of our code.
2021-01-27 04:31:43 +03:00
Jan Weiß
63ed28919b Second attempt to fix build with other than maintainer’s TeamIDs. Worked for me with Xcode 12.3. 2021-01-05 17:25:12 +01:00
Christopher Snowhill
dbc51d76f9 Revert PR #60 - Nope, that breaks hardened runtime and signing it myself 2020-12-22 02:11:50 -08:00
Jan Weiß
c305a5f949 Fix build with other than maintainer’s TeamIDs.
This commit removes development team and code signing key/value pairs that slipped through when Xcode applied code signing changes.
2020-12-13 12:01:48 +01:00
Christopher Snowhill
91b1271ae2 Bump deployment target to 10.13 2020-11-24 15:26:26 -08:00