Commit Graph

2959 Commits (8f1143818bd5ac9d1960f09f671e2814098d6d26)

Author SHA1 Message Date
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
Christopher Snowhill d77a5472f3 Only seek on restart if file is seekable
Do not restart from the last position if file isn't seekable.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-09 13:42:47 -08:00
Christopher Snowhill 69506cd1d7 HTTP Reader: Replaced implementation with libCURL
New implementation largely based on the vfs_curl module from DeaDBeeF.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-09 13:41:01 -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 7cea254f4c Implement framework for dynamic metadata updates
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-08 21:21:53 -08:00
Christopher Snowhill b927f4c02b Replace more NSDictionary use with literals
Use literals to initialize fixed NSDictionary objects in various places.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-08 19:56:04 -08:00
Christopher Snowhill 838b31a6e8 MIDI: Replaced FluidSynth with BASSMIDI again
FluidSynth is just too unstable, and also just bad in general.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-08 18:29:03 -08:00
Christopher Snowhill 52ddc26bb9 OpenMPT Legacy: Remove modifications from library
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>
2022-02-08 00:15:49 -08:00
Christopher Snowhill 0763b28f38 HRIR Filter: Replace deprecated Intel-only code
_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>
2022-02-08 00:13:41 -08:00
Christopher Snowhill f4f4f80f64 Restart playback on device or output format change
Now the output is restarted on the current file at the current position
if the output format has changed. This should resolve the issue finally.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 22:44:56 -08:00
Christopher Snowhill 728c44242c Do not reset output sample rate automatically
This was buggy as hell, and resulted in errors. Now the user should
restart playback if they change output device formats.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 22:02:17 -08:00
Christopher Snowhill 4fd24838fa FFmpeg Input: Fix format changes
Format changes should only occur on whole packet intervals.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 19:37:06 -08:00
Christopher Snowhill 90ce0e5ae4 Updated VGMStream to r1702-55-g39074f95
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 19:31:32 -08:00
Christopher Snowhill 477feaab1d Now properly supports sample format changing
Sample format can now change dynamically at play time, and the player
will resample it as necessary, extrapolating edges between changes to
reduce the potential for gaps.

Currently supported formats for this:

- FLAC
- Ogg Vorbis
- Any format supported by FFmpeg, such as MP3 or AAC

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 19:18:45 -08:00
Christopher Snowhill 0b8a659bc2 TagLib: Implement support for APE tags on TTA
TrueAudio will now read APE tags, and if I should start writing tags
some day, will prefer creating APE tags if no tags exist.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 15:33:50 -08:00
Christopher Snowhill 91da112e35 Cog Audio: Fix potential hang on stop
The ChunkList wasn't clearing the remover entered flag when the chain
was empty. Now it does, so it will shut down correctly.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 15:31:57 -08:00
Christopher Snowhill 418d03ae23 Updated VGMStream to r1702-53-g00441228
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 04:30:41 -08:00
Christopher Snowhill 08da31f96c Cog Audio: Fix generic downmix to stereo
Code ordering was wrong, it was writing the output samples repeatedly
for each input speaker, now it will only write them once.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 04:17:53 -08:00
Christopher Snowhill acb1dd75d3 Cog Audio: Fix memory leaks with new buffering
By applying copious amounts of autorelease pools, memory is freed in a
timely manner. Prior to this, buffer objects were freed, but not being
released, and thus accumulating in memory indefinitely, as the original
threads and functions had autorelease pools that scoped the entire
thread, rather than individual function blocks that utilized the new
buffering system. This fixes memory growth caused by playback.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 04:06:36 -08:00
Christopher Snowhill 6120fce40a Metadata: Fix length field on track reloading
This fixes the dynamic length field not updating correctly after a track
info reload, which breaks the seekbar when reloading the current track.

Fixes #227

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 03:03:39 -08:00
Christopher Snowhill b2177fccbc Core Audio input: Fix channel config, and a leak
Channel config should not contain duplicate channels, or unsupported
channels. Also fix a memory leak from not freeing the AudioChannelLayout
structure allocated previously.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 02:47:32 -08:00
Christopher Snowhill 22d8b8c132 Implement channel config fields for inputs
This implements channel masks for inputs where applicable, namely the
CoreAudio decoder, FFmpeg, FLAC, and WavPack. All others will still use
guessing from the channel number.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 02:06:51 -08:00
Christopher Snowhill 95fb65527f Playlist Entry / SQLite: Add channel config field
Add channel config field to PlaylistEntry and the SQLite backing store.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 01:11:30 -08:00
Christopher Snowhill 1ef8df675f Cog Audio: Implement support for channel config
This implements the basic output and mixing support for channel config
bits, optionally set by the input plugin.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-07 01:10:05 -08:00
Christopher Snowhill b0b1446aa7 HRIR Filter: Corrected scale math, fixing volume
The volume should have been twice what it was, because I got this scale
wrong. The correct scale for Accelerate inverse FFT is 1/4 per sample,
not 1/8 like I accidentally misread while rewriting a convolver for the
umpteenth time from scratch.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-06 21:53:42 -08:00
Christopher Snowhill 7bf4c4445d Remove old, now unused code 2022-02-06 21:50:23 -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 361f61618a libFLAC: One more time
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-06 03:21:47 -08:00
Christopher Snowhill b73f1f280e libFLAC: Fix so Intel compiles
Didn't do those pragmas correctly

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-06 03:14:14 -08:00
Christopher Snowhill 62edb39761 Cog Audio: Major rewrite of audio buffering
Rewrite attempt number two. Now using array lists of audio chunks, with
each chunk having its format and optionally losslessness stashed along
with it. This replaces the old virtual ring buffer method. As a result
of this, the HRIR toggle now works instantaneously.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-06 03:08:34 -08:00
Christopher Snowhill 11ecb1cd8b libFLAC: Improve decode speed on Haswell
Import a feature change that improves decoding speed on Haswell or newer
Intel processors. No effect on Apple Silicon, which doesn't support the
feature under Rosetta 2, and the ARM64 build doesn't need the changes
anyway, as the code already did the right thing.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-06 02:59:26 -08:00