Commit Graph

3039 Commits (5611d08df1c7ca2a799dc7f115881d0ff3a84df4)

Author SHA1 Message Date
Christopher Snowhill 455dc0d5c8 Remove unused formatter class from info inspector
The info inspector xib still referenced the blank zero formatter, left
over from before disc support was added.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 07:19:50 -08:00
Christopher Snowhill a05d4537c1 Various tagging fixes
- Fix Vorbis, Opus, and FLAC tag reading
- Fix Vorbis getting a 0 length if passing through the CUE Sheet reader
- Implement support for FLAC binary CUE Sheets

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 07:16:59 -08:00
Christopher Snowhill 1df166b060 Updated lazyusf2, and disabled RSP HLE warnings
The warn logging was preventing working USFs from playing due
to warnings occurring during the playback that didn't otherwise
affect the ability to play the files.
2022-02-12 03:29:43 -08:00
Christopher Snowhill c39b7ee96a Converter: Smarter, if less portable, endian swap
For big endian sample formats, endianness can be swapped using Clang
specific byte swap functions, which are present in all supported
versions of Xcode.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 00:38:08 -08:00
Christopher Snowhill 5f68131437 Converter: One minor change to double to float
Use Accelerate for this, too.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 00:03:25 -08:00
Christopher Snowhill 6b148fef11 Channel Mixer: Rewrite upmixing, changed HRIR
Simple upmixing algorithms now use Accelerate framework functions
instead of complex loops, and the HRIR filter now supports forcing
stereo output to any channel output configuration that has at least
front stereo speakers.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 23:51:41 -08:00
Christopher Snowhill 5bcedab274 Disallow window tabbing on main window
No point in allowing tabs when we don't support multiple playlists yet.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 17:11:04 -08:00
Christopher Snowhill 3711999112 Cog Audio: Allocate maximum needed audio memory
The chunk could be any format, up to floating point double samples, and
up to 18 channels.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 13:50:26 -08:00
Christopher Snowhill 7f8c19799d Fix a very serious error resampling short files
Files that are so short that they need both pre- and post-extrapolation
at the same time.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 07:10:31 -08:00
Christopher Snowhill 0b33fe6dea Don't count output buffering for queue hold
This would count the output duration for every file buffered, rather
than only once.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 06:50:58 -08:00
Christopher Snowhill d5aecaf6a2 Fix outstanding crashes and issues with CUE reader
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>
2022-02-11 06:49:41 -08:00
Christopher Snowhill d7becdf01a Add a nil pointer check for metadata read
No idea if this is needed or not.
2022-02-11 06:00:36 -08:00
Christopher Snowhill 69c4cb3c16 Minor change to remove unnecessary mutable objects
These are no longer being manipulated, so remove their mutable state.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 05:59:44 -08:00
Christopher Snowhill e695e33537 SID Input: Bring back file hints, better this time
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>
2022-02-11 04:43:20 -08:00
Christopher Snowhill 425306129f SID Input: Clean up memory leaks
Two were potential memory leaks on file errors, one was a guaranteed
leak when reading metadata.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 04:19:27 -08:00
Christopher Snowhill b40b8521dd SID Input: Open the files for decoding regardless
No more file handle caching, this was probably a source of crashes.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 04:18:39 -08:00
Christopher Snowhill 09bf1c7ad9 libsidplayfp: Sync with upstream again
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 04:06:16 -08:00
Christopher Snowhill 4f5e5a9e4e SID Input: Synchronize cross file access
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>
2022-02-11 03:56:50 -08:00
Christopher Snowhill be6fda4663 SID Input: Don't close hinted source files
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>
2022-02-11 03:55:26 -08:00
Christopher Snowhill e7df4e529d libsidplayfp: Updated to newer version
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>
2022-02-11 03:48:10 -08:00
Christopher Snowhill 38efa7c8c5 libsidplayfp: Reorganize project file order
Sorted the file tree a bit, for more easily locating files while working
on the code.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-11 03:46:51 -08:00
Christopher Snowhill bf88c57454 Minor artwork caching changes
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>
2022-02-10 22:45:26 -08:00
Christopher Snowhill 740fdfa883 Attempt to wrangle memory usage from artwork
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>
2022-02-10 22:37:37 -08:00
Christopher Snowhill 2e52066293 Skip to next on trash, else stop playback
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 21:48:30 -08:00
Christopher Snowhill 2e1460f72d Only trash regular files
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 21:48:08 -08:00
Christopher Snowhill 5411a60ea1 Added option to remove tracks to the trash
Fixes #23

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 21:35:13 -08:00
Christopher Snowhill 68c3f3b1d8 Highly Complete: Disable USF HLE
The HLE is incomplete, and sometimes buggy. Disable it for now.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 20:57:44 -08:00
Christopher Snowhill 7d0ff8e525 Update Info.plist with new file types
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 15:40:12 -08:00
Christopher Snowhill 39dcb88728 FFmpeg input: Support reading metadata
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>
2022-02-10 15:29:13 -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 8f1143818b Replace playlist status icons with SF Symbols
On Big Sur and up only, of course.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 01:51:40 -08:00
Christopher Snowhill a4387dc6d1 Playlist now supports dragging tracks out of app
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>
2022-02-10 01:32:09 -08:00
Christopher Snowhill 421eb8ed82 Replace playback buttons with SF Symbols on 11.0+
On macOS Big Sur and newer, replace the playback buttons with system
symbols.

Should fix #96

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-10 01:18:34 -08:00
Christopher Snowhill 5330295a97 Fix array bounds issues with album shuffle builder
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>
2022-02-10 01:14:42 -08:00
Christopher Snowhill f203911bb1 FFmpeg Input: Support various DSD formats and IFF
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>
2022-02-10 00:32:24 -08:00
Christopher Snowhill f3356a821a Touched by Xcode
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>
2022-02-10 00:27:11 -08:00
Christopher Snowhill 086367f388 Add two new toolbar buttons
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>
2022-02-09 23:12:50 -08:00
Christopher Snowhill 60a7052868 Fix volume control tooltip appearance on the left
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>
2022-02-09 22:51:39 -08:00
Christopher Snowhill 085891aff1 FFmpeg Input: Retry on decode error
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>
2022-02-09 22:37:39 -08:00
Christopher Snowhill 4cdf919b45 Opus Input: Now reads ReplayGain tags
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>
2022-02-09 21:27:33 -08:00
Christopher Snowhill df63726128 Track properties take priority over metadata read from tag readers
This allows inputs to override things with self-read tags and such, such
as ReplayGain tags.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-09 21:26:17 -08:00
Christopher Snowhill 64c4aa2e25 Handle deleting the current track gracefully
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>
2022-02-09 21:04:17 -08:00
Christopher Snowhill c3cd4c34f4 MIDI Plugin: Rearrange project source files
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-09 18:43:01 -08:00
Christopher Snowhill a212c85252 MIDI Plugin: Fix stupid typo
Damn, how did I miss this one?

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-09 18:38:12 -08:00
Christopher Snowhill b03702e164 MIDI Plugin: Fix BASSMIDI driver SysEx handling
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>
2022-02-09 18:36:37 -08:00
Christopher Snowhill 808b14a358 MIDI Plugin: Vital changes for stability
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>
2022-02-09 18:29:34 -08:00
Christopher Snowhill b1a98139cb Cog Audio: Fix generic upmixer mode
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>
2022-02-09 15:16:19 -08:00
Christopher Snowhill e2e83ea760 FFmpeg/FLAC/Opus/Vorbis Inputs: Fix metadata
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>
2022-02-09 15:04:49 -08:00
Christopher Snowhill 0012d1b17e Implement dynamic metadata reading for streams
Supported by FFmpeg, FLAC, Ogg Vorbis, and Opus.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-09 13:44:50 -08:00
Christopher Snowhill cdf27e4786 CogDecoderMulti: Reset file even if not seekable
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>
2022-02-09 13:44:04 -08:00