CUE reader was crashing due to nil metadata pointers, which the new
inplace initializer I was using didn't like. Change it to use a mutable
regular dictionary, and only add items if they're not nil.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Now file hint stashes the whole file in memory, so that any other
threads reading the file at the same time will just grab the same memory
block and read it, rather than opening the file repeatedly.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Two were potential memory leaks on file errors, one was a guaranteed
leak when reading metadata.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The same file may be accessed from other threads, thanks to this cache
thing. Synchronize access so that only one thread is reading the file at
a time.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The SID decoder uses a hint cache so that when the library requests the
current file open, it will return the exact file already opened, rather
than opening it again. Unfortunately, I was closing the file regardless,
and sometimes, libsidplayfp will reopen the file multiple times, from
other threads, even.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This update is from my personal fork, and includes synchronization
around two places in ReSIDfp that use static global tables as caches.
Without the synchronization, there were errors in playback and even
crashes.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Art ID should be set on new files when they are stored into the
database, and the album art property should be affected by assigning to
the artId property, since it affects the caching identifier.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Now cache around NSData objects of individual pieces of album art,
unique by their byte contents. And the artwork image cacher will also
use the art ID keys from the database as the cache keys for NSImages,
so they'll not only be only read once per unique image, but also tracks
can have unique artwork per track, if the files so feature it.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Where TagLib is not being employed, use FFmpeg to read tags where
possible. This allows reading tags from files like IFF. It reads it
through properties, otherwise allowing tag readers to function like
usual.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
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>
Playlist now supports dragging copies of URL references to other apps,
including Finder, and possibly other audio players. The chosen drag
operation is to copy files.
Fixes#75
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The shuffle list builder was encountering errors when some album tags or
empty album tags led to empty lists.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Implement support for DFF, WSD, and IFF formats, and all DSD formats
carried within, using our own DSD decimation method instead of relying
on FFmpeg to do it.
Fixes#165
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Xcode loves to tweak coordinates by fractional values just opening the
darn thing in the resource editor.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Added buttons to remove duplicates and remove dead items, in case anyone
finds themselves needing these options often enough to want to put them
in their toolbar instead of using the menu.
Fixes#225
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Increasing the threshold for the width of the tooltip to the right of
its intended location to a more generous value, makes it appear on the
left side sooner rather than later, but should fix positioning issues.
Fixes#226
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
When feeding packet to decoder, attempt to retry another packet when it
reports invalid data.
Fixes#97
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Instead of rendering the ReplayGain values into the stream on decode, as
it did before. This allows exposing the values to the properties dialog.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Now it should flow playback correctly to the next remaining track after
the block of deleted tracks. And if the user deletes the next queued
track, it will still be queued to flow past the deleted block. If the
user undoes their deletes and restores the tracks, playback will resume
after the originally deleted track.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
These events were split up in handling after this driver fell out of
use. It needed updating with the latest split handling design.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Among the changes, range checking on lots of things, and especially,
the pre-render-loop backlog handler, which rendered samples left over
from the previous call, would possibly over-render by way too much, due
to a stupid backwards subtraction I managed to type into there. This is
totally fixed now.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This resulted in horrible things, the generic N to N upmixer was leaving
unmapped channels as uninitialized memory. This fixes horrible things
happening for people with interfaces with more channels than the source
file, frequently when the source file is stereo, or if the file is mono
and a center channel is present.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The dynamic metadata functions should only activate for unseekable
streams, not seekable streams, and not local files.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
HTTP Reader now supports limited seeking backwards even in streams, so
seek back to file start for repeated file tests, since there are at
least a few inputs that all claim to support things like Ogg containers.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
There were some leftover modifications to the 0.5.x tree I was using,
which were supposed to be speed optimizations, but they're probably
pointless anyway. The NEON optimizations were especially pointless,
since this plugin version isn't used on any macOS version that runs on
Apple Silicon.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
_mm_malloc and _mm_free are apparently based on intrinsic functions,
and only exist on Intel or older macOS targets. So removing them in
favor of posix_memalign.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>