Commit Graph

12 Commits (4bed0af868a76a3d82301a1733c6e0574dd9d0d4)

Author SHA1 Message Date
Christopher Snowhill ee5231f567 Only process visualizations when visible
Stop visualization processing when the host window is completely
occluded, thus reducing background CPU usage levels significantly

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-10-15 23:19:36 -07:00
Christopher Snowhill ddbc38c7fe Move most large stack using buffers to the heap
This should solve most potential future stack overflows.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-24 18:32:47 -07:00
Christopher Snowhill d3256f3c54 Reformat spaces to tabs
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-05 12:52:53 -07:00
Dzmitry Neviadomski 0dc31808e7 Add preference to choose between SceneKit and DDB spectrum. 2022-07-05 12:49:09 -07:00
Christopher Snowhill db181bde4d [Visualization System] Change API a bit
Now the API makes both PCM and FFT data optional, and will do nothing if
neither are requested. Also, it now supports a latency offset in seconds
with floating point precision. The two built-in visualizations currently
request zero larency. Increasing the latency asks for even older samples
while specifying a negative count requests samples from the "future"
relative to what the listener is hearing.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-26 05:40:06 -07:00
Christopher Snowhill dccb7f8b47 Replace Core Audio output with Core Media runtime
The output now uses AVSampleBufferAudioRenderer to play all formats, and
uses that to resample. It also supports Spatial Audio on macOS 12.0 or
newer. Note that there are some outstanding bugs with Spatial Audio
support. Namely that it appears to be limited to only 192 kHz at mono or
stereo, or 352800 Hz at surround configurations. This breaks DSD64
playback at stereo formats, as well as possibly other things. This is
entirely an Apple bug. I have reported it to Apple with reference code
FB10441301 for reference, in case anyone else wants to complain that it
isn't fixed.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-23 23:23:13 -07:00
Christopher Snowhill 2c2a058126 Cog now requires macOS 10.13 as a minimum version
All optional fallback code for older versions has also been removed, and
everything now assumes 10.13.0 or newer. Some cases are still included
for point releases, such as 10.13.2.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-23 23:23:07 -07:00
Christopher Snowhill 071d23b1c6
[SceneKit Visualization] Refine blocklist again
* Remove exception variable setter

Remove SceneKit crash variable setting exception
handler from NSApplication delegate.

* Restrict SceneKit to 10.13, 10.14, and 11.0+

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-19 21:42:39 -07:00
Christopher Snowhill 2563125ec5 [SceneKit Visualizer] Refine blocklist
The blocklist wasn't actually blocking the requisite GPUs properly.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-19 20:03:47 -07:00
Christopher Snowhill b01924e10e [SceneKit Spectrum] Added device name to logging
Device name logging is essential in determining if crashes are on
specific device models that haven't been blocklisted.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-18 18:14:25 -07:00
Christopher Snowhill 711c18a3bd [SceneKit Spectrum] Add device block list
Currently blocking all Radeon cards up to and including Polaris cards.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 22:16:20 -07:00
Christopher Snowhill cbcbdf893d [Spectrum Visualizer] Add crash check for SceneKit
The SceneKit visualizer now has a crash check, which will trigger if an
exception is thrown by the app.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 22:15:14 -07:00