Commit Graph

3154 Commits (6179b304d04935435afe05872bf4238bfb040fec)

Author SHA1 Message Date
Christopher Snowhill e0e7274339 HTTP Reader: Fix opening really tiny files
Tiny files complete fetching within the scope of the open function, so
the URL session task would have completed already. Now the function will
accept the data, and allow reading it.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-04 22:03:22 -08:00
Christopher Snowhill 3069a81d85 HDCD Decoder: Adjust gain stepping algorithm
This is a fixed point implementation identical to Microsoft's original
algorithm. Or at least I assume it's Microsoft's. It was actually
adapted from hdcd_decode.exe, which was adapted from somewhere else.
It's entirely in fixed point math now, so it's fairly deterministic.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-04 21:52:20 -08:00
Christopher Snowhill 6d9f1be7ea Playlist Controller: Stop when deleting current
When deleting the currently playing track, stop playback, because the
player engine doesn't like dealing with the current playing track not
actually having a playlist reference to go with it. Better stop playback
instead, as a safety check.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-04 19:54:43 -08:00
Christopher Snowhill 39cc33cac4 Converter: Remove no longer necessary includes
These were only needed when I wasn't using Accelerate framework.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-04 19:53:17 -08:00
Christopher Snowhill ac0058ad1a Preferences: Fix MIDI synthesizer setting
This fixes the ability to configure the MIDI synthesizer properly, after
commit 7e5107d431 was applied.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-03 14:26:51 -08:00
Christopher Snowhill bf6627aa73 MIDI input: Fix general pacing issues with AU
The timing of block based mode was kind of off. Now it should be just
fine. Thanks to testing on Windows in foo_midi.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-03 13:50:25 -08:00
Christopher Snowhill e820e2bbd6 Update libvgm again
No appreciable changes, as I don't implement tempo control. (yet?)

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-02 18:03:18 -08:00
Christopher Snowhill b5eb31dabf Updated libvgm
But nothing I updated affects playback currently.
2022-02-02 17:22:57 -08:00
Christopher Snowhill 71d7697788 Updated patrons header file 2022-02-02 17:22:24 -08:00
Christopher Snowhill 0b243158a0 Cue Sheet input: Fix files with no length
This bug prevented zero length or unknown length files, such as FLAC
files with no sample count in the header, or audio streams, from playing
properly, and clipped their output to the 0 samples indicated by the
field. Now it will simply allow wrapped files to decode until they stop
producing output.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-01 23:54:54 -08:00
Christopher Snowhill d6760c823a HRIR Filter: Change resampler to use soxr oneshot
This should use the oneshot method, which takes care of flushing for us.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-01 22:54:27 -08:00
Christopher Snowhill 002be384ff Cog Audio: Terminate queueing when stopping
The end of input queueing, which can go nuts when there are a lot of
short files, should be terminated when the user asks the player to stop.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-01 22:48:25 -08:00
Christopher Snowhill 074e4115dd sox resampler: Perform post file flush
Flush the resampler when the source file terminates, so that it outputs
delayed samples properly. This fixes gapless decoding of resampled
files.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-01 22:47:11 -08:00
Christopher Snowhill 587be93f21 Cog Audio: Fix runpath search path for libsoxr
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-01 19:44:48 -08:00
Christopher Snowhill 0e6350116b libsoxr: Fix import path
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-01 19:28:28 -08:00
Christopher Snowhill b40d5eecc5 GME: Play SPC and SFM files at 32 kHz
And let the player itself resample them, as necessary.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-01 19:04:06 -08:00
Christopher Snowhill d4990de7f3 Adopt the sox resampler instead of RetroArch
Removing RetroArch code from my project.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-01 18:55:39 -08:00
Christopher Snowhill 78e960a9e4 Revert "Ring Buffer: Replace virtual buffers"
This reverts commit 476c88973b.
2022-02-01 18:45:12 -08:00
Christopher Snowhill 641f6390c5 HRIR Filter: Quality of life improvements
The memory allocation is now nicer, and only allocates what is needed.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-01 15:28:24 -08:00
Christopher Snowhill 61a30c959c Bundled resources: Use NSBundle interface
These methods should use NSBundle, rather than CF* C functions

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-01 14:40:02 -08:00
Christopher Snowhill f3ddd69f63 libOpenMPT: Updated to version 0.6.1
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-30 15:19:56 -08:00
Christopher Snowhill ebb9c5b4f1 libOpenMPT Legacy: Updated to version 0.5.16
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-30 15:19:36 -08:00
Christopher Snowhill 9e42182928 Update Code of Conduct, remove placeholder
Oops, I should have scanned it for placeholders before uploading.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-30 14:38:49 -08:00
Christopher Snowhill 54ccad7c5d Volume Slider: Fix appearance of tooltip
Tooltip should appear on the left side when the volume bar is close to
the right side of the screen.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-30 14:05:12 -08:00
Christopher Snowhill fe67d1a6ea Adopt Contributor Covenant as code of conduct
From now on, all contributions, and all issues and pull requests posted,
must adhere to this document. I would like people to remain civil on my
project, if they possibly can. If they cannot, they will be ejected.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-30 13:47:30 -08:00
Christopher Snowhill 808710b881 Volume Control: Fix linear 100% range control
Range is now linear on 100%, like it should be.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-30 00:18:07 -08:00
Christopher Snowhill 476c88973b Ring Buffer: Replace virtual buffers
Replace individual virtual buffers with large _mm_malloc blocks at a
time, then dole out chunks of those buffers as the nodes need them.
Should reduce memory contention a little bit.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 21:32:59 -08:00
Christopher Snowhill 9e5a70c9ae Cog Audio: Dealt with a major retain cycle leak
This seals up a major memory leak of the playback state whenever a chain
is released on stop or on manual track change. CogAudioMulti was
retaining the input node due to its listeners, and InputNode was not
releasing the listeners when asked to stop running. This is fixed now.

Fixes #221

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 21:31:19 -08:00
Christopher Snowhill 77a079bd53 Mini Window: Fix saving and restoring position
Fixes #212

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 18:00:34 -08:00
Christopher Snowhill 1c3419580f Templates: Touched by Xcode
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 17:59:59 -08:00
Christopher Snowhill d2a8ccb098 Toolbar: Replace Randomize Playlist button again
Now with a slightly more appropriate icon for non-retina displays. I
still want to consider what to do with this, since it still looks a bit
blurry on 1x displays.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 17:45:41 -08:00
Christopher Snowhill 66f27b4e12 Spotlight Panel: Align all controls properly
Fixes #224

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 17:28:53 -08:00
Christopher Snowhill abffadef4e Equalizer: Prevent circular application of presets
This prevents the apply presets function from resaving the preset number
and retriggering itself repeatedly, which would cause a crash.

Fixes #223

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 17:27:10 -08:00
Christopher Snowhill e695e36599 Equalizer: Store custom presets on change
Store custom presets on value changes, on half second intervals, as the
listener observes the user changing the settings.

Fixes #222

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 17:21:43 -08:00
Christopher Snowhill 5184c8e48b Sparkle: Disable automatic updates when debugging
Disable automatic update checking on startup for debug builds. Prevents
a crash from occurring when it attempts to retrieve the version number.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 17:01:51 -08:00
Christopher Snowhill 7e5107d431 User Settings: Obey standards
Replace "midi.plugin" with "midiPlugin", as per the value naming
conventions that Apple set out. Migrate the old value if found.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 16:38:53 -08:00
Christopher Snowhill 85fd3836c0 Debug logging: Added logging of playback and tags
Added a logging method that indicates starting playback of a given URL,
and added a debug build only logging of every metadata load event.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 16:34:43 -08:00
Christopher Snowhill 326e9d5970 GME: Fix music playback with no fade from crashing
Only crashed with division by zero error on Intel, not on Apple Silicon.
Funny that. Sending the fix upstream, too.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 16:26:28 -08:00
Christopher Snowhill c5f9ffe87c
Merge pull request #220 from losnoco/nevack/linear-scale-for-volume-slider
Scale VolumeSlider linearly if volume is limited.
2022-01-29 15:40:34 -08:00
Dzmitry Neviadomski 050a3d3112 Scale VolumeSlider linearly if volume is limited.
Fixes #198
2022-01-29 05:57:19 +03:00
Christopher Snowhill 7be0ade7ce Ogg Vorbis and Opus: Fix 7.1ch file remapping
File channel remapping was incorrectly only working for 1-7 channel
files, not 8 channel files. Fixed that.

PLEASE NOTE: This will be my last commit and build for over a week, I
promised myself I would stop, and this is the last straw. These are the
last two, I promise. No more bug fixes this week, until at least the 7th
of February. Please, I'm begging you.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 23:04:19 -08:00
Christopher Snowhill d239b58ab1 HRIR Filter: Fix 7.0 downmix and WAV files
7.0 downmix was passing parameters to cblas_scopy backwards, and WAV
files report "host" endian, not "native".

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 23:02:04 -08:00
Christopher Snowhill 38c7fdafd0 Delete Gitlab CI config
We're not using Gitlab's CI anyway, and they don't offer free Mac
build bots at this time, either. It just keeps spamming me with build
failure notices every time I push commits to that mirror.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 22:23:19 -08:00
Christopher Snowhill 241b7b4b34 FFmpeg patches: Updated iTunes gapless patch
The patch is now updated to exactly what I sent to the ffmpeg-devel
mailing list for hopeful inclusion in the latest release of FFmpeg.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 19:31:15 -08:00
Christopher Snowhill f807cd8169 FFmpeg Input: Just-in-case change to file reader
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 14:49:33 -08:00
Christopher Snowhill 9caf704630 Equalizer: Better handle interpolating presets
The old quadra method was broken, too. Now it uses a simple linear
difference sliding scale for the extra points, which seems to work much
better for the 20 kHz band. And the 16 kHz band doesn't get predicted to
heck any more, either.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 14:30:14 -08:00
Christopher Snowhill 7c012b2714 MainMenu template: Touched by Xcode
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 14:29:08 -08:00
Christopher Snowhill 72c18ca960 Toolbar: Try second edition Randomize button
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 14:19:58 -08:00
Christopher Snowhill efc044ae33 Toolbar / Menu adjustments for equalizer, etc.
Added a keyboard shortcut for the equalizer menu item, added a user
contributed button for an equalizer toolbar button, and replaced the
randomize playlist button with something different from the same user.

I had to redo the randomize button, because template PDFs don't support
white cutout shapes, but instead need to be formatted as hollow spaces
in the paths. Naturally, I couldn't figure out how to do this with
Inkscape the right way, so I rendered the original to a 1024x1024
bitmap, then imported that into a new document and traced it. Meh. I
need a better icon anyway, but this looks okay on the toolbar for now.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 01:31:50 -08:00
Christopher Snowhill b0fca5127f SQLite Store: Fix updating track entries
Track entries are updated when files are added and their metadata is
later loaded. The refresh cycle was failing, because dbIndex was unset
in the new tracks, for some reason. Now it will set this when updating
the track item, assuming it read from the database in the first place.

This fixes metadata being loaded properly on adding tracks to the
playlist, as well as reloading track data manually.

Fixes #218, hopefully.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 00:11:14 -08:00