Commit Graph

650 Commits (b927f4c02b544385e5d2b10fcc362b0ede8af635)

Author SHA1 Message Date
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