Commit Graph

61 Commits (71d7697788a8ac3e657f10a6be8c30ed952623b0)

Author SHA1 Message Date
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 cc2b27d43f Core Audio output: Potential shutdown fix
The thread wait on shutdown had the potential to lock up waiting for the
thread to shut down. Now it should at least spam the semaphores, so that
the thread should progress to shutdown a lot quicker.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-27 00:09:40 -08:00
Christopher Snowhill bbce6880d7 Core Audio output: Add a quick safety fix
Add a safety fix for pausing and shutting down, so that we don't call
into AUAudioUnit's stopHardware function unless the stream has already
been started by the output.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-26 15:42:28 -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 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 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 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 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 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 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 3cc5b46a0e Cog Audio: Improve end of track handling 2022-01-14 10:17:41 -08:00
Christopher Snowhill e6124335d1 Cog Audio: Change output callback to always retry reading for sample data until the requested buffer is filled, or until the playback either ends or is torn down. This prevents gaps when the preceding ring buffer wraps around. 2022-01-13 23:02:01 -08:00
Christopher Snowhill 5fef62dd03 Cog Audio: Implemented device output and input file format changing support 2022-01-12 21:31:22 -08:00
Christopher Snowhill 8664bacc60 Core Audio output: Correctly terminate output when requested to stop, preventing a case where multiple outputs were draining the playback buffer at once 2022-01-12 16:04:41 -08:00
Christopher Snowhill f8e3b0e1ee Core Audio output: Some more minor changes 2022-01-11 22:06:41 -08:00
Christopher Snowhill 557e0bd399 Core Audio output: Fix so it stops properly 2022-01-11 20:38:17 -08:00
Christopher Snowhill 7d4841b1c6 Core Audio output: Don't upmix unless output device requests it by default 2022-01-11 18:18:38 -08:00
Christopher Snowhill 4dd46a1b5b Core Audio output: Fix output stopping properly 2022-01-11 07:52:44 -08:00
Christopher Snowhill 72210c67e4 Replaced AudioQueue output with AUAudioUnit 2022-01-11 07:06:40 -08:00
Christopher Snowhill 486352ea72 Core Audio output: Enforce some minimum quality settings 2021-12-28 15:41:31 -08:00
Christopher Snowhill 8e895c88c0 Core Audio output: Properly apply or remove default device change listener when switching preferences between the 'System Default Device' setting and manually setting the device to the current default 2021-12-26 21:33:28 -08:00
Christopher Snowhill 8435416cd7 Core Audio output: Default device setting now tracks system device changes, and output assigns a speaker mapping depending on the channel count 2021-12-26 21:27:26 -08:00
Christopher Snowhill 378aaf23ae Clean up several CFStringRef leaks 2021-12-26 18:08:53 -08:00
Christopher Snowhill d2e480ace5 Core Audio output: Properly support switching output devices 2021-12-26 17:16:16 -08:00
Christopher Snowhill d22ee14a36 Audio Output: Take a more nuclear approach to output resetting when seeking 2021-12-25 23:41:45 -08:00
Christopher Snowhill 5246731189 Core Audio: Overhauled audio output to use AudioQueue instead of AudioUnit, fixed downmixing to mono, and implemented upmixing mono or other formats to more channels if the device requests them 2021-12-25 22:32:43 -08:00
Christopher Snowhill c6b112f512 CoreAudio output: Fix buffer underruns on output that could result in buffer looping in CoreAudio, by feeding silence from the callback instead of returning incomplete or possibly empty buffers 2021-12-25 19:43:10 -08:00
Christopher Snowhill 9c9d71cd9c Overhaul CoreAudio output code: Downmix properly from 8 channels, redo converter process, and no longer crash when forced to output to a low quality device. Switchover to stereo from mono isn't perfect, however. 2021-12-25 15:02:13 -08:00
Christopher Snowhill ed8a5763ab Output: Add System Default Output option, rather than adjusting the listing to display the current system default only the first time 2021-12-05 22:49:56 -08:00
Christopher Snowhill da96d2c21e Core Audio Output: Add a check that should prevent it from attempting to output data through the callback during or after destruction 2021-09-17 19:09:34 -07:00
Christopher Snowhill b7487e2ad2 Clean up audio output code just a bit 2020-03-23 01:46:41 -07:00
Jan Weiß da775ce8a6 Clean up output device code. 2020-02-17 18:20:48 +01:00
Jan Weiß b22c5964e4 Improve output handling, 2.
Fix issues with above.
2020-02-01 14:44:07 +01:00
Jan Weiß 97ed738846 Improve output handling. 2020-02-01 14:00:41 +01:00
Chris Moeller 17272ce43c Clean up lots of warnings and minor issues. 2016-06-29 22:10:29 -07:00
Chris Moeller 0e3644177e Updated everything else to ARC, and plugged a release cycle. 2016-05-05 13:05:39 -07:00
Chris Moeller 56848daad6 mamburu: Fixed crashes when seeking near the end of stream 2013-10-12 13:52:58 -07:00