Commit Graph

283 Commits (97b8ad0949613ed40041f05490ac6c6deeb37515)

Author SHA1 Message Date
Christopher Snowhill 778ac0699e Virtual Surround: Cleanup properly
The filter wasn't properly freeing its FFT setup state, and also was
unnecessarily null checking the pointers before passing them to the
aligned free function, which already does null checking.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-25 22:06:53 -08:00
Christopher Snowhill c7c3c82c18 Core Audio output: Change end of file timing
Reduce the timing at which an end of file notification is sent to the
main thread from 16384 bytes to 8192 bytes. This may help with playback
of a lot of really small files, and skipping tracks.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-25 21:55:08 -08:00
Christopher Snowhill 708c7dc721 Headphone Virtualization: Implement customization
Implement the ability to configure and select an HRIR preset to use with
the HRIR filter, or remove the preset. It will validate the file's
usefulness before setting it for the player to use.

Also, fixed back center channel filtering for 7.0 format audio.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-25 21:30:33 -08:00
Christopher Snowhill bb029757fd
Headphone Virtualization: Fix an oops
The previous commit was not sound. Now it is.
2022-01-25 17:45:32 -08:00
Christopher Snowhill e53144acfa Headphone Virtualization: Implement 7ch impulses
This is needed for HeSuVi no-echo impulses, which are only one channel
per input channel, and mapping uses symmetrical mirroring of the input
set to create the surround effect, since there's no side-to-side delay
in these impulses.
2022-01-25 17:23:34 -08:00
Christopher Snowhill e7b78085ca New feature: Implemented headphone virtualization
This new virtualizer uses the Accelerate framework to process samples.
I've bundled a HeSuVi impulse for now, and will add an option to select
an impulse in the future. It will validate the selection before sending
it to the actual filter, which outright fails if it receives invalid
input. Impulses will be supported in any arbitrary format that Cog
supports, but let's not go too hog wild, it requires HeSuVi 14 channel
presets.
2022-01-25 16:50:42 -08:00
Christopher Snowhill ec7009f3fc Equalizer: Instances of GraphicEQ AU are now relinquished to the main thread for destruction instead of being destroyed by the Core Audio Output shutdown 2022-01-24 19:49:43 -08:00
Christopher Snowhill 51caf3f4e3 Cog Audio: Don't overfill the output buffer when asked to reset the buffers 2022-01-23 19:53:50 -08:00
Christopher Snowhill d364d48944 Cog Audio: Change for recursive lock, fixing a deadlock on buffer resets 2022-01-23 19:50:01 -08:00
Christopher Snowhill 494ad84ea7 Cog Audio: Made ring buffer locking mechanism more secure and/or smarter 2022-01-23 19:36:33 -08:00
Christopher Snowhill 502e52d699 Core Audio output: Hopefully stop buffer looping on device stop 2022-01-22 14:37:37 -08:00
Christopher Snowhill 6011982a63 Equalizer: Correctly activate the equalizer when starting playback 2022-01-22 12:59:59 -08:00
Christopher Snowhill 9d1fd08574 HDCD Decoder: Only process lossless tracks 2022-01-21 22:47:11 -08:00
Christopher Snowhill 26e0e0cead HDCD Decoding: Add HDCD indicator 2022-01-20 23:53:45 -08:00
Christopher Snowhill 178b32cbdf Core Audio output: Remove all delayed track end events when buffer reset 2022-01-19 14:54:04 -08:00
Christopher Snowhill 576f1a702a Core Audio output: Hopefully really fix deadlock issue 2022-01-19 14:50:48 -08:00
Christopher Snowhill 16a58e87a0 Core Audio output: Attempt to fix deadlock near track transitions when buffer resets occur 2022-01-19 14:38:48 -08:00
Christopher Snowhill 6f0a737123 Cog Audio: Implement HDCD decoding 2022-01-19 02:08:57 -08:00
Christopher Snowhill f2feb3bcd7 Equalizer: Fix applying equalizer presets on automatic track change 2022-01-19 01:23:59 -08:00
Christopher Snowhill 31e5cd9337 Core Audio output: Add debugging code for logging output to disk, only enabled at compile time as necessary 2022-01-19 00:41:42 -08:00
Christopher Snowhill de193b70e2 Converter: Improve extrapolation for resampler, and also pad decimated DSD, even if not resampling it 2022-01-19 00:40:40 -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 f9ace87319 Add static container types to Info.plist generator stub 2022-01-18 16:58:31 -08:00
Christopher Snowhill 9085cf18df Core Audio output: Fix crash on playback reaching the end of the playlist 2022-01-18 16:48:37 -08:00
Christopher Snowhill 5c0a510848 Core Audio output: Add various minor changes 2022-01-18 16:43:58 -08:00
Christopher Snowhill c4c29be35a Output converter: Limit extrapolation to only be trained on twice as many samples as the extrapolation order 2022-01-18 16:43:10 -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 7a0c1d230e Volume control: Make preamp optional, defaulting to a limit of 100% volume 2022-01-17 22:41:26 -08:00
Christopher Snowhill 83ad969d9b Equalizer: Add option for presets to track the music genre tags 2022-01-17 20:43:08 -08:00
Christopher Snowhill 87c771c67c Equalizer: Add option to toggle the equalizer on or off 2022-01-17 01:22:15 -08:00
Christopher Snowhill c8057e1037 Fix bug in new Core Audio output code 2022-01-16 14:08:17 -08:00
Christopher Snowhill 71b2f7a4f2 Implement graphic equalizer 2022-01-16 07:32:47 -08:00
Christopher Snowhill c640481c25 Add SIMD optimized volume scaling 2022-01-16 00:46:21 -08:00
Christopher Snowhill 72453ba05a Cog Audio: Converter now rounds up sample counts affected by resamlping ratio 2022-01-15 23:41:31 -08:00
Christopher Snowhill 8eb2b4c4a3 Cog Audio: Finally fix track glitching on lots of tiny tracks 2022-01-15 02:52:35 -08:00
Christopher Snowhill fbef034903 Cog Audio: Further overhaul output buffering and track queue code 2022-01-15 02:09:26 -08:00
Christopher Snowhill 5ab728b205 Cog Audio: Overhaul output buffering yet again, adding an extra buffer stage between the converter and the output thread 2022-01-14 22:46:41 -08:00
Christopher Snowhill ccbfc6ec4b Semaphore: Change timedWait to wait in microseconds 2022-01-14 22:43:46 -08:00
Christopher Snowhill d24a01a637 Implemented basic embedded CueSheet support 2022-01-14 16:46:35 -08:00
Christopher Snowhill 6315377eaf Cog Audio: Fix extrapolator to use signed type for sample delta 2022-01-14 11:37:52 -08:00
Christopher Snowhill af6677cf34 Cog Audio: Keep track of last resampler quality used so we don't reinitialize when not necessary, and also keep track of DSD decimated sample rate separately, so the input format remains unmodified 2022-01-14 11:18:50 -08:00
Christopher Snowhill 2e164d3fc8 Cog Audio: Reduce glitching on track change by invoking a delegate method that occurs when the track finishes outputting without waiting for it 2022-01-14 11:16:35 -08:00
Christopher Snowhill 3cc5b46a0e Cog Audio: Improve end of track handling 2022-01-14 10:17:41 -08:00
Christopher Snowhill cb3782d0b1 Cog Audio: Improve ring buffer 2022-01-14 10:17:08 -08:00
Christopher Snowhill 3ce3edde88 Cog Audio: Fix track end extrapolator used by resampler 2022-01-14 07:39:55 -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 903b457a28 Cog Audio: Make it possible to play obscene sample rate files without major failures 2022-01-14 02:00:32 -08:00
Christopher Snowhill 5aa3f7dd0a Cog Audio: Properly support seeking within the file that appears to be playing, even if it has already finished decoding 2022-01-14 00:29:02 -08:00
Christopher Snowhill 083dbbf18b Cog Audio: Also commit synchronization delay on new track playback 2022-01-13 23:54:16 -08:00
Christopher Snowhill c8d2864862 Cog Audio: Enhance playback queue handler, so it always halts buffering when there are at least 30 seconds worth of buffers filled, possibly spanning multiple files. Also improve the chain reset function so that playlist changes and playback order control reset the queue properly when the queue refill function is currently entered in another thread. 2022-01-13 23:05:32 -08:00