Commit graph

4068 commits

Author SHA1 Message Date
Christopher Snowhill
d41e34913a Bug Fix: Chase the dict keys with periods problem
This was a more prolific problem than I thought. Hopefully that's the
last that I need to fix.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-07 06:30:03 -07:00
Christopher Snowhill
d4fec5c70e Tag Reading: Better handle tag names with periods
Oops, I forgot that Cocoa KVO treats key names with periods in them as a
special case, assuming that each dotted word is a separate nested object
from the others. Work around this by using Unicode character replacement
that will hopefully dodge the issue.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-07 05:43:26 -07:00
Christopher Snowhill
6e655bf4b1 Sandbox: Fix missing file handler crash
Apparently, NSURL path for fileURL can return nil if the resource no
longer exists, or something. Better fail gracefully than cause a crash.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-07 05:41:21 -07:00
Christopher Snowhill
0d06590c23 Rubberband: Fix end of track reset for threading
This end of track restart notification may come from a different thread
than the processing thread. Wait on the thread to complete.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-07 05:40:18 -07:00
Christopher Snowhill
9055bc45f3 Bug Fix: Add some safety checks to URL handlers
A few places could have used nil checks, but there shouldn't be anything
passing nil URLs to these. Well, just in case, at least it won't lead to
crashes or something...

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-06 01:28:30 -07:00
Christopher Snowhill
5667a4039d Bug Fix: Really old legacy code error crash fix
This legacy playlist filename handler was falling through on newly
installed and run setups, where none of the files would exist, so the
last one would return a nil NSURL and attempt to add it to the playlist.

Fix this to check for the existence of the file before attempting to
open it. It shouldn't really exist anyway, unless someone really started
with a really old version somehow, and migrated it to the sandbox folder
proper.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-06 01:28:26 -07:00
Christopher Snowhill
8479e3fa16 Chore: Update file type associations in Info.plist
Some removed types and new types for VGMStream, and some new types for
libOpenMPT.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-06 01:03:48 -07:00
Christopher Snowhill
339665a011 Sentry: Update sentry-cocoa to version 8.52.1
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-06 00:52:43 -07:00
Christopher Snowhill
12a0e76fcf VGMStream: Updated libvgmstream code base
Updated VGMStream to r2023-16-gb2fc214a

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-06 00:51:03 -07:00
Christopher Snowhill
4b0f27acdb Updated libOpenMPT to version 0.8.0
And reordered all the source files in the projects according to name
sort. And removed all the deleted files, including some which were
forgotten in previous updates, but left as 0 byte files. Finally,
updated the project to use C23 / C++23 language standards.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-06 00:26:56 -07:00
Christopher Snowhill
6f94f33175 Spot removal
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-05 22:48:00 -07:00
Christopher Snowhill
bafbc511c6 Emergency Bug Fix: Fix loading individual tracks
And folders of tracks, too! The only thing that worked in 3117 was
playlist files. Hah!

Fixes #436

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-05-11 05:32:49 -07:00
Christopher Snowhill
70042c39f8 Sentry: Update sentry-cocoa to version 8.50.1
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-05-10 00:40:36 -07:00
Christopher Snowhill
1eddc831f3 VGMStream: Updated libvgmstream code base
Updated VGMStream to r1980-277-g72cb4b89

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-05-09 21:13:13 -07:00
Christopher Snowhill
dd69345f54 Track loading: Change file import and sorting
Files are now loaded to unique keys, and containers such as playlists
and CUE sheets maintain their file order. Deduplication now only applies
to top level files and not playlist contents. Sorting applies to top
level files, and playlist or container names, but not their contents.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-05-09 21:04:35 -07:00
Christopher Snowhill
27b1157359 VGMStream: Updated libvgmstream code base
Updated VGMStream to r1980-268-gc32951e9

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-05-03 01:56:03 -07:00
Christopher Snowhill
fcec44982c Converter Node: Change volume scale observer
This should fix an exception being thrown because the observer wasn't
registered, or known to be registered. Only register it when it will be
used, and only unregister it if it was registered.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-05-03 01:23:19 -07:00
Christopher Snowhill
1bea1699a1 HDCD: Stop dynamically halving the volume
Apparently, this doesn't work too well with real HDCD tracks, and causes
all sorts of weird volume issues. Just leave the volume alone, and let
HDCD decoding make tracks louder, possibly, rather than try to halve the
volume automatically on a detector that isn't terribly good.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-04-24 14:54:41 -07:00
Christopher Snowhill
bd8aa0e91b HDCD: Fix how unsigned audio may be processed
Unsigned will alter the input, so move it like the other integer sample
processors do.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-04-24 14:53:18 -07:00
Christopher Snowhill
46ee7fc8b9 HDCD: Make HDCD extension processing optional
And disabled by default, at that. I can't actually hear the difference
of Peak Extension in the Rock track I have that claims to use it. And
Low Level Range Extension is more trouble than it's worth on tracks that
use it by mistake, or maliciously, if the case may be. I may add track
tag level control in the future.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-04-23 21:43:51 -07:00
Christopher Snowhill
62bf2452f2 Maintenance: Touched by Xcode
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-04-23 21:42:01 -07:00
Christopher Snowhill
d2e81b7de5 VGMStream: Fix memory leak
Thanks to upstream VGMStream for fixing this in the Audacious plugin,
which I derived this code from in the first place, which explains the
memory leak getting in.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-04-20 21:34:57 -07:00
Christopher Snowhill
3408c0f791 VGMStream: Add native support for 24/32 bps int
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-04-20 21:34:11 -07:00
Christopher Snowhill
531c2b1468 VGMStream: Updated libvgmstream code base
Updated VGMStream to r1980-242-gfccbb05f

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-04-20 21:33:11 -07:00
Christopher Snowhill
baf8d1e745 Updated Sparkle to version 2.7.0
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-04-20 21:03:11 -07:00
Christopher Snowhill
07fed67f18 Updated MASShortcut to fix crashes
I hope this works to fix the crashes from migration.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-04-20 20:59:53 -07:00
Christopher Snowhill
6061901218 Path Suggester: Make font fixed size
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-04-07 14:13:15 -07:00
Christopher Snowhill
388e916f2a Path Suggester: Touched by Xcode
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-04-07 14:12:55 -07:00
Christopher Snowhill
a9ce4f4eff Bug Fix: Fix FFmpeg reporting timestamps for DSD
Raw DSD is counting frames in bytes, not bits/samples, so it needs to be
scaled up when dividing by the raw sample rate.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-28 20:26:27 -07:00
Christopher Snowhill
e9b15bc269 MIDI: Add unstable configuration for AU players
It's regarded as unstable as some plugins randomly decide to overflow
the main thread queue and crash the player on the main thread check, but
only sometimes, and not always.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-28 16:18:04 -07:00
Christopher Snowhill
56dcf4df86 Sandbox Security: Disable library validation
Apparently, this was preventing some signed plugins from being loaded
into the process, preventing their use as MIDI plugins. And this may be
needed for future AudioUnit DSP filter support, for third party plugins
there, as well.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-28 16:18:00 -07:00
Christopher Snowhill
9480bc742c MIDI: Move sample buffer from stack to class
Move the stack-based buffer, which is rather large, to the player class
instance, where it will be allocated on the heap.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-28 16:17:56 -07:00
Christopher Snowhill
d590a03595 MIDI: Fix Audio Unit player in several ways
Improve rendering functions of Audio Unit player, and also fix looping
for the Audio Unit player, and any other possible future players which
use blocked decoding with timestamped events.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-28 16:17:51 -07:00
Christopher Snowhill
2565767be2 MIDI: Make BASSMIDI the visible default
Also hide the Apple plugins from settings so they don't get activated
unless there's no SoundFont configured.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-28 16:17:43 -07:00
Christopher Snowhill
a708851b63 Dependencies: Update BASS and WavPack libraries
BASSMIDI: 2.4.15.3
BASSFLAC: 2.4.5.5
BASSOPUS: 2.4.3
BASSWV: 2.4.7.4

WavPack: 5.8.1

And updated the WavPack plugin to support threaded decoding, using up to
four worker threads, as detected from the host machine's CPU count.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-28 16:17:25 -07:00
Christopher Snowhill
c4a5c8f45b MIDI: Update BASS docs
This was the version of BASSWV previously bundled.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-27 18:45:00 -07:00
Christopher Snowhill
c5732aa13b Audio Output: Optimize fader function
Now using Accelerate methods to calculate and multiply ramps per channel
and add the remainder if necessary.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-27 17:13:38 -07:00
Christopher Snowhill
355bdf8616 Play Control: Previous track now also restarts
If the current track has played for more than 5 seconds, previous track
now restarts the current track, instead of jumping back to the previous
track.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-26 20:09:47 -07:00
Christopher Snowhill
954cfa02d9 Bug Fix: Fix inserting empty chunks on track ends
This code did not check the number of samples in a packet before adding
it to the output buffer, which apparently had the potential to cause the
output code to emit up to 512 samples of silence between tracks. This,
as one can guess, is a bad thing, and causes noticeable gapping between
tracks.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-26 19:07:36 -07:00
Christopher Snowhill
576b199382 Bug Fix: Fix output logging, switch log method
Output logging, a debugging feature that is only enabled at build time
if I need to chase down some audio mixing or output bug, was not logging
anything at all. Change to use Cocoa file writing methods, and actually
implement the output writer function again.

This code is left disabled 99% of the time anyway, and especially in
release builds. Like the node logging code elsewhere, it has the
potential to be very noisy and consume massive amounts of disk space.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-26 19:06:02 -07:00
Christopher Snowhill
d1ff9ba0c0 Bug Fix: Include soxr latency in memory allocation
This should be included, for safety purposes, in case the rounding up to
the nearest multiple of 256 samples doesn't bump the buffer size enough.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-26 19:03:26 -07:00
Christopher Snowhill
8f595af704 Bug Fix: Retry MP3 file a few times before failure
Give up after 10 tries.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-24 16:05:19 -07:00
Christopher Snowhill
f73cde09ee Bug Fix: Fix minimp3 to deal with invalid files
If a file can't decode, there should not be a division by zero error.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-24 15:42:30 -07:00
Christopher Snowhill
2c4ca7d51d Bug Fix: Fix minimp3 streaming support
The streaming support was breaking because initial packet detection was
failing due to bit reservoir errors. Instead, detect consecutive sync
frames in the initial read buffer, then attempt to sync to a decodable
frame in the first block of data, otherwise give up.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-24 08:16:37 -07:00
Christopher Snowhill
0725f10be6 FFmpeg: Fix HLS, HLS metadata, update FFmpeg
Add missing HLS MIME type: audio/mpegurl

Update FFmpeg to version 7.1.1, carrying the same patches, and one new
patch: Implementing support for HLS ID3 tags changing mid-stream.

We cannot do away with fdk-aac yet, because the USAC codec is missing
features that fdk-aac implements already.

Fixes #428

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-24 06:08:22 -07:00
Christopher Snowhill
2ef4594916 Bug Fix: Fix minimp3 seek position
Seek offset is scaled by the number of channels in the file. Oops again.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-23 20:22:39 -07:00
Christopher Snowhill
fc2a14b0fa Bug Fix: Free memory buffers used by minimp3
This was being leaked when playing static, seekable files. Oops.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-23 20:03:44 -07:00
Christopher Snowhill
410395dded minimp3: Numerous buffering fixes, consolidation
Move minimp3 packet decoder state into the decoder_ex state structure,
instead of using the redundant duplicate structure. Also reduce input
buffer size for streams to 16KiB, and actually use the defined macro in
the header file to declare the streaming buffer size.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-23 20:02:58 -07:00
Christopher Snowhill
6e8538c7c9 minimp3: Fix seeking behavior
Seeking should clear the sample buffer if it contains anything, and non-
seekable files should return an error on an attempt to seek.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-23 16:18:07 -07:00
Christopher Snowhill
11eeaea6e2 VGMStream: Update associated filename extensions
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-03-23 16:15:21 -07:00