Commit Graph

707 Commits (f7dc6beda191dcf7d919cb218e40dca3ccde46cb)

Author SHA1 Message Date
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 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 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 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 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 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 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 b85fef5c16 MIDI Input: Fix seeking code
This fixes a possible crash with seeking operations, especially with
Audio Unit plugins. Fix implemented in foo_midi and imported here.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-05 05:01:31 -08:00
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 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 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 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 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 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 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 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 2e41e7c525 FFmpeg Input: Enable networking and HLS support...
... also disable use of AudioToolbox codecs, and use only bundled codecs
and libfdk-aac for AAC input. This is required for HLS at least, as
Apple's system codecs didn't really like the network streams that were
provided by HLS streaming stations.

Also reshuffle the input priorities between Core Audio input and FFmpeg
input, so that they were the way they were before I messed with things a
while back. This puts FFmpeg back at the top, using bundled codecs where
supported.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 00:11:14 -08:00
Christopher Snowhill 547de6cf08 M3U Playlist container input: Disable for HLS
The built-in M3U container parser should not be used for HLS playlists,
so they should end up in the playlist as-is, so that inputs can parse
them in real time.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 00:11:14 -08:00
Christopher Snowhill 3c35cf1037 MIDI Input: Fall back to system DLS Synth
If there's no configured SoundFont bank, or if the selected bank has
gone missing, and the user has configured the player to use the
FluidSynth driver, fall back to the system DLS Synthesizer, which has
its own Roland bank to fall back on if unconfigured.

Also, whether falling back, or already on an AU synthesizer, don't fail
if there's no bank configured or found. DLS doesn't explicitly require a
bank, and most other synthesizers of interest would not require a bank
either.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 00:09:40 -08:00
Christopher Snowhill b53567edc5 Fix VGMStream so it handles EOF properly
The file prober in FFmpeg expects that when the read function reaches
end of file, it returns AVERROR_EOF, not zero. Otherwise, it will loop
endlessly until the process is terminated.

Fixes #217.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 00:09:40 -08:00
Christopher Snowhill ee7b7dad5f VGMStream: Add a bodge for PSF files
For some incredibly dumb reason, PSF files get into FFmpeg 5.0, then
just sit there and lock up, reading them forever and ever, doing nothing
useful. Add a bodge to detect PSF files by signature and ignore them in
the VGMStream container parser, and all other parts of VGMStream in Cog.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-26 15:40:44 -08:00
Christopher Snowhill fee7fcdb21 FFmpeg: Handle preroll skip manually 2022-01-24 06:07:09 -08:00
Christopher Snowhill d771a58e69 FFmpeg: Update to version 5.0, and add another patch for iTunes MP3 gapless info 2022-01-24 04:41:27 -08:00
Christopher Snowhill 6b8d300384 Opus input: Support switching gain modes based on player settings, since the Opus tag reader doesn't support Opus gain tags yet 2022-01-22 21:03:52 -08:00
Christopher Snowhill 72f1168498 TagLib: Support reading Apple SoundCheck tags from ID3v2 and MP4 2022-01-22 20:20:24 -08:00
Christopher Snowhill 058614b6a0 Core Audio / FFmpeg inputs: Change to correctly discern most lossy/lossless codecs 2022-01-21 23:09:35 -08:00
Christopher Snowhill 0c4d5002f6 Metadata: Now supports storing cuesheet tags and encoding quality status properties 2022-01-21 22:38:54 -08:00
Christopher Snowhill 2165d37144 Metadata: Now supports disc number field where possible 2022-01-21 21:49:17 -08:00
Christopher Snowhill 698798a6f4 CUE Sheet input: Seek function now returns correct time offset 2022-01-19 22:09:29 -08:00
Christopher Snowhill 244f896318 CUE Sheet input: Fix for regular cue sheets, and for existing URLs for embed supported tracks 2022-01-19 22:06:36 -08:00
Christopher Snowhill 684951bdc0 Change a bunch of NSArray declarations to const collection literals 2022-01-18 18:12:57 -08:00
Christopher Snowhill ba0fedf151 Add stub function to Silence Decoder 2022-01-18 17:30:07 -08:00
Christopher Snowhill 1540b84b09 Clean up association names 2022-01-18 03:20:07 -08:00
Christopher Snowhill 39a5ee8ab7 Utility: Add stubs to regenerate Info.plist with file type associations 2022-01-18 03:07:32 -08:00
Christopher Snowhill 6684a8280f AdPlug: Plugin now loads its AdPlug database on startup 2022-01-17 21:48:35 -08:00
Christopher Snowhill a1522aeb6e CueSheet parser: Support quirky FLAC generated CueSheets that contain sample counts instead of frames 2022-01-14 22:45:45 -08:00
Christopher Snowhill 33f3b4f5a0 CueSheet processor: Support timestamps with one or two fields, as well as the standard three fields 2022-01-14 19:05:48 -08:00
Christopher Snowhill dac1dfee47 CueSheet input: Implement support for ReplayGain tags 2022-01-14 18:51:44 -08:00
Christopher Snowhill 2d32381bc1 Cue Sheet: Fix decoder priority level 2022-01-14 17:45:10 -08:00
Christopher Snowhill d24a01a637 Implemented basic embedded CueSheet support 2022-01-14 16:46:35 -08:00
Christopher Snowhill 748891f285 Cog Audio / WavPack input: Add DSD decimation to converter, and change WavPack input to emit only raw DSD 2022-01-14 06:26:09 -08:00
Christopher Snowhill ec0b343596 WavPack input: Decode DSD without letting WavPack library decimate it. The supplied filter was rather noisy. 2022-01-14 02:11:46 -08:00
Christopher Snowhill ca4a2efea1 FFmpeg input: Disable peak limiting for libfdk-aac decoder 2022-01-13 16:14:04 -08:00
Christopher Snowhill bfa178f4e2 FFmpeg input: Add support for libfdk-aac, which will be used to support USAC and AAC on 10.14.x and older 2022-01-13 04:13:58 -08:00
Christopher Snowhill e3df82cf70 VGMStream input: Improve file interface, to handle duplicate file requests in the same thread, and to handle archive paths 2022-01-12 16:45:50 -08:00
Christopher Snowhill c8301a9868 CoreAudio input takes priority over FFmpeg on 10.14.x and older 2022-01-09 17:05:10 -08:00
Christopher Snowhill a1a85c502e FFmpeg input: Check for seeking errors and stop decoding when they happen 2022-01-09 03:37:45 -08:00
Christopher Snowhill b35d405e20 libvgm input: Correctly declare logging formatting strings 2022-01-07 19:07:46 -08:00
Christopher Snowhill 614517f813 FFmpeg input: Disable AudioToolbox codecs on macOS 10.14.x and older 2022-01-07 19:07:07 -08:00
Christopher Snowhill 7ee76f914a OpenMPT legacy: Correct header import paths so that the correct version of OpenMPT framework headers are used 2022-01-06 23:53:39 -08:00
Christopher Snowhill 1eb2270049 VGMStream: Rewrite file interface based on the VGMStream stdio interface, only using CogSource files 2022-01-06 22:12:34 -08:00
Christopher Snowhill 0e8f417e67 libvgm Player: Correctly report version number in codec field 2022-01-05 02:37:39 -08:00
Christopher Snowhill 888ee2fb38 Implemented new libvgm-based VGM, S98, DRO, and GYM player 2022-01-03 01:55:48 -08:00
Christopher Snowhill 8ad7e086a8 Update copyright year 2022-01-02 23:34:29 -08:00
Christopher Snowhill df9743c821 Consolidated Vorbis framework usage 2021-12-31 01:35:08 -08:00
Christopher Snowhill 98ead66851 Consolidate File_Extractor framework usage 2021-12-31 01:16:44 -08:00
Christopher Snowhill 2e76c56ba7 Switch FFmpeg libraries to dynamic builds, consolidate to a single copy in the main application framework folder 2021-12-31 01:07:05 -08:00
Christopher Snowhill 112a20132b OpenMPT: Add format info as codec string 2021-12-30 00:07:32 -08:00
Christopher Snowhill e4cbdb07f8 FFmpeg Decoder: Remove spurious debug logging 2021-12-29 22:56:53 -08:00
Christopher Snowhill fa20465271 FFmpeg Decoder: Fix seeking in files with preroll that happens to make the decoder return EAGAIN error, so they don't inadvertently skip actual audio data unnecessarily. Fixes seeking to the start of USAC files with preroll packets. 2021-12-29 22:55:31 -08:00
Christopher Snowhill cd8b728ca6 Removed plugin 2021-12-29 15:24:23 -08:00
Christopher Snowhill 27dbd609c9 OpenMPT: Change decode call slightly 2021-12-28 15:38:57 -08:00
Christopher Snowhill 73a356ad1d Ogg Vorbis/Opus: Use correct channel output order for surround files 2021-12-28 00:54:28 -08:00
Christopher Snowhill 120daf291a OpenMPT legacy: No longer need to reduce its priority level, since it's OS version gated to not load on OSes that support the newer plugin 2021-12-27 17:47:57 -08:00
Christopher Snowhill e2bca8f93b OpenMPT: Correctly OS version gate the OpenMPT plugins, and add an interface for any other plugin to use, should it ever become necessary 2021-12-27 17:46:09 -08:00
Christopher Snowhill 106eb587b4 Updated libopenmpt to version 0.6.0, with major new changes. This new version requires macOS 10.15 to work, due to libc++ features required. A compatibility plugin has been duplicated from the existing plugin, which will now load libopenmpt 0.5.14, or whatever newer version may come out that still supports as old as macOS 10.12. 2021-12-26 03:29:43 -08:00
Christopher Snowhill fd75e1b260 HTTP source: Fix API abuse by calling completion handler as requested 2021-12-22 16:27:41 -08:00
Christopher Snowhill e207cdc022 Opus/FFmpeg: Add more streaming types to handle, now supports working Ogg Vorbis, Opus, and FLAC streaming 2021-12-22 16:23:54 -08:00
Christopher Snowhill 9566a36815 Error handler: Better handle errors and increase silence generator to 10 seconds at a time 2021-12-22 16:22:05 -08:00
Christopher Snowhill c2585f5567 FFMPEG input: Add more formats, reduce buffering so streams start faster, and fix seeking calculation so streams seek properly 2021-12-22 00:17:59 -08:00
Christopher Snowhill c47bd96d65 FFMPEG / vgmstream: Update dependencies for newer Matroska support 2021-12-22 00:15:19 -08:00
Christopher Snowhill 45ee8b01df HTTP reader: Keep track of task suspend/resume so we don't stall trying to resume an already running stream 2021-12-22 00:14:19 -08:00
Christopher Snowhill bb1f9dcb33 CoreAudio / FFmpeg: Swap decoder priorities so FFmpeg takes priority over Core Audio 2021-12-21 22:26:50 -08:00
Christopher Snowhill caf4855b4e Syntrax/Jaytrax: Replace existing reverse engineered implementation with a different one that handles more songs correctly 2021-12-15 16:47:36 -08:00
Christopher Snowhill 00f1e0957c FLAC: Move libFLAC decoder to higher priority than any potential system decoder, support arbitrary sample bit depths 2021-12-11 00:22:19 -08:00
Christopher Snowhill 5772662984 Cuesheet: Read and merge metadata from referenced audio files, no matter their format 2021-11-21 00:16:16 -08:00
Christopher Snowhill bce21b44d4 MIDI: Overhaul player completely, now Audio Unit support works properly, and the Sound Canvas VA hack is no longer needed. Now System Exclusive messages may be filtered for all plugins. 2021-11-02 19:52:12 -07:00
Christopher Snowhill ee6faec757 VGMStream: oops, coding error 2021-10-02 18:49:00 -07:00
Christopher Snowhill 6c8c807781 VGMStream: Clear sample buffer, just in case 2021-10-02 18:47:04 -07:00
Christopher Snowhill cbf20dab08 VGMStream: Correctly implement mixing support and output channel reporting for downmixes 2021-10-02 18:38:23 -07:00
Christopher Snowhill 0ec1ae4c47 Core Audio input: Added Codec info reporting 2021-10-01 20:22:26 -07:00
Christopher Snowhill cb70b066d7 Updated VGMStream to r1640-85-gfe316bb2 2021-10-01 20:21:50 -07:00
Christopher Snowhill fdae7eec21 File info: Implemented support for Album Artist and Codec fields 2021-10-01 19:18:42 -07:00
Christopher Snowhill cfeadad97f Reduce minimum OS to macOS 10.12 2021-09-18 01:08:49 -07:00
Christopher Snowhill 42a6738e8f Updated VGMStream to r1640-11-gdfa3779a 2021-09-06 09:28:26 -07:00
Christopher Snowhill 6395684001 CoreAudio input: Fixed new case where lossy inputs report file bit depth as unsupported field, causing some or possibly all lossy files to fail to decode 2021-08-25 01:57:59 -07:00
Christopher Snowhill 5b73336cb0 CoreAudio input: Optimized file size reporting to cache the file size on open, so file input isn't seeking as much 2021-08-25 01:57:05 -07:00
Christopher Snowhill 3f6cb1bc1c VGMStream: Fix .txtp with option fragments in the filename 2021-08-11 17:33:02 -07:00
Christopher Snowhill 0891a20bba MIDI: Detect presence and compatibility of Sound Canvas VA before attempting to import it later. It currently does not work with arm64, only x86_64 native or Rosetta 2. 2021-08-10 17:35:15 -07:00
Christopher Snowhill 59a5a7687e MIDI: Fix Sound Canvas VA duplication function to support the 32 signed instances current versions ship 2021-08-10 17:35:14 -07:00
Christopher Snowhill 510c762921 TagLib plugin: Implement FLAC embedded art reading 2021-07-03 15:31:26 -07:00
Christopher Snowhill 75a4f1e722 VGMStream: Fix one shot files actually decoding to completion instead of getting stuck forever 2021-06-15 01:34:01 -07:00
Christopher Snowhill 668475c43a VGMStream: Correctly report ReplayGain tags from external M3U tags 2021-05-30 14:47:21 -07:00