Commit Graph

783 Commits

Author SHA1 Message Date
casey langen
d472b56ca3 Another dangerous low-level change: updated the way LayoutBase::Layout()
works to be similar to Window::Redraw(). The default implementation now
does bounds checking and calls through to OnLayout() instead. Doing this
ensures we don't spend time laying out views that are not visible. Also
removed a bunch of extraneous Layout() calls.
2016-12-07 00:26:06 -08:00
casey langen
95f383221c Super dangerous low-level changes to cursespp to fix some fundamental
issues:

- Added OnRedraw() template method that should be used instead of Redraw()
  for the normal case. Redraw() will do some visibility and bounds
  checking on behalf of the caller.
- Added IWindow::OnParentVisibilityChanged() that is used by sub-views to
  know when their parent changes. This is so Windows can hide themselves
  while retaining their internal visibility flags.
- A couple bounds checking and corner case fixes in Window.

In the end this gives us:

- Fewer unnecessary redraws (in theory)
- The ability to set sub-view visibility indepdent of parent view, without
  the need to call Layout::AddWindow and Layout::RemoveWindow
2016-12-06 23:59:03 -08:00
casey langen
fe55c92a12 Added OnRedraw() template method for Window subclasses. Redraw() will
check visibility before requesting a repaint.
2016-12-06 20:33:51 -08:00
casey langen
f56ffb0bcf Added new Redraw() base class method, and renamed Repaint() to
Invalidate(). Also renamed Window::Invalidate to Window::InvalidateScreen
2016-12-06 19:16:26 -08:00
casey langen
68f574235b Fixed search results -> browse category title bug. 2016-12-06 01:00:08 -08:00
casey langen
1017d46016 Improved header layout in settings, and dynamically add heads in
BrowseLayout based on screen size.
2016-12-06 00:44:59 -08:00
casey langen
05b62839b0 Added speaker channel constants. 2016-12-06 00:44:30 -08:00
casey langen
94aef06a7d Hush some unnecessary logging in PulseOut.cpp 2016-12-05 20:23:10 -08:00
casey langen
98c11a9706 Fixed volume initialization in PulseOut 2016-12-05 20:21:26 -08:00
casey langen
da6e635bd3 Fixed compile on Linux and macOS. 2016-12-05 20:20:02 -08:00
casey langen
ae88f6ee31 Added the ability for the user to select their preferred output plugin! 2016-12-05 20:17:58 -08:00
Casey Langen
3e6f66d986 Added a PulseAudio output plugin for Linux. 2016-12-05 17:00:13 -08:00
casey langen
487502fd1f Modified IOutput interface to supply an optional latency. Updated
WasapiOut to send the proper latency.
2016-12-04 23:45:07 -08:00
casey langen
a797d4db9d Added an initial WASAPI output plugin implementation. Down with waveout!
(maybe).
2016-12-04 18:43:26 -08:00
Casey Langen
25506a009d Version bump to 0.5. 2016-12-04 12:35:40 -08:00
casey langen
a3b7a541cc Removed some unused #includes from LocalFileStream. This should also clean
up some compile warnings on non Windows platforms.
2016-12-04 12:16:58 -08:00
casey langen
d8685e314c Fixed #pragma once compile warning. 2016-12-04 11:47:38 -08:00
casey langen
a26fc53353 Ramped the default Stream buffer size from 1024 -> 2048 samples per
channel. This further reduces CPU usage.
2016-12-03 21:30:15 -08:00
casey langen
0e6fbb8e3d - Improved Stream class by preallocating all required buffers using a
single contiguous float array for all samples.
- Fixed WaveOut to reuse WaveOutBuffer instances so we aren't constantly
  reallocating them.
- Removed boost dependency from WaveOut plugin
- Modified Buffer to allow creation with a managed float array
- Removed DynamicStream.h/.cpp
2016-12-03 21:16:48 -08:00
casey langen
0276b0f594 A couple more small ALSA bug fixes. 2016-12-03 17:23:51 -08:00
casey langen
e381a842f8 Tweaked AlsaOut's behavior when adding buffers in the paused state. 2016-12-03 17:10:09 -08:00
casey langen
4600b801b6 Small fix to Player's stream resolution logic -- we should also return a
DynamicStream when the visualizer is hidden.
2016-12-03 15:19:10 -08:00
Casey Langen
896f8459df Fixed a compile warning in PlaybackService.cpp. 2016-12-03 15:12:08 -08:00
casey langen
4c86164f80 Added DynamicStream back to Windows build, and fixed CddaDataStream
plugin. Also cleaned up a memory leak in GdiVis.
2016-12-03 15:08:34 -08:00
casey langen
3bb07daba4 Remember volume and repeat mode across app launches. Been meaning to do
this for a while.
2016-12-03 14:54:16 -08:00
Casey Langen
53429bdf92 Moved some stream decoder and dsp loading logic out of the actual Stream implementation, and into a helper namespace so it can be re-used. Added back DynamicStream to test on Windows. 2016-12-03 14:52:37 -08:00
casey langen
f1ffce5662 Re-enabled time smoothing. 2016-12-02 23:34:45 -08:00
casey langen
4febabe234 Removed debug info from release builds in many of the plugins to reduce
filesize.
2016-12-02 16:30:13 -08:00
casey langen
3657a995a1 Moved Player/Transport interaction to using a simple callback/listener
interface instead of events. Events were causing complications with
multi-threading, and introducing unnecessary runtime complexity.
2016-12-02 15:49:36 -08:00
casey langen
c58607f014 Just kidding about fixing the clang compile -- remove static qualifier to
hopefully fix it for real.
2016-12-02 09:42:18 -08:00
casey langen
94f0fb1653 Declare the playerThreadProc prototype -- this should fix the clang
compile.
2016-12-02 09:40:33 -08:00
casey langen
b2e90b8d72 Cleaned up some unused stuff in GdiVis and removed time smoothing for now. 2016-12-02 09:35:55 -08:00
casey langen
f672446ebf Added a Win32 GDI visualizer. 2016-12-02 01:12:49 -08:00
casey langen
02282e4991 boost -> std for threading. 2016-12-01 22:52:57 -08:00
casey langen
5e48e7cf33 Clean up Player and GaplessTransport interaction. No more goofy defers. 2016-12-01 22:14:58 -08:00
casey langen
32618f533b - The audio deinterleaving process works now
- Apply a Hamming Window to FFT input to reduce spectral leakage
- Reduced memory usage by doing FFT with real inputs
2016-11-30 00:44:02 -08:00
casey langen
793bb9102b Removed win32 debugging code. 2016-11-28 23:32:10 -08:00
casey langen
232d2c4b0d Oops, moved kiss_fft.c to the correct directory. 2016-11-28 23:30:56 -08:00
casey langen
803323678e After some testing, decided to replace the existing FFT implementation
with kiss_fft.
2016-11-28 23:28:50 -08:00
casey langen
d14fc89721 Replaced VLC/xmms FFT with the one used by Milkdrop. 2016-11-28 00:20:15 -08:00
casey langen
ed1fd578e5 Fixed an off-by-1 bug in fft.cpp where we could try to write past the end
of an array.
2016-11-27 23:45:46 -08:00
casey langen
e6d86517c9 - Adjusted default Stream buffer sizes to be more CPU friendly
- Fixed FFT buffer handling in Player
2016-11-27 23:09:31 -08:00
Casey Langen
d698ea98ac Fixed clang compile. 2016-11-27 22:46:49 -08:00
casey langen
84d5190e7c Removed bifrucated stream types, only use the new one. Also, ensure in
Windows the decoder cannot change the buffer size.
2016-11-27 22:35:31 -08:00
casey langen
debe9b491f Revert "Upgraded to VS2017 RC."
This reverts commit 5bcb794ad8.
2016-11-27 21:40:30 -08:00
casey langen
72eb1cb74d A few small bug fixes related to bad pointer arithmetic 2016-11-27 21:38:27 -08:00
casey langen
d28cfcfd52 Cleaned up FixedSizeStream to ensure the buffer size is ALWAYS the
requested buffer size, except for maybe the last buffer in the stream.
2016-11-27 15:46:54 -08:00
Casey Langen
d41f44deaf Fixed mac/nix build to exclude fftw and use VLC's fft instead. 2016-11-27 09:29:42 -08:00
casey langen
30aba00e23 Bifrucated stream functionality into DynamicStream (with buffers of
potentially dynamic/changing size), and FixedSizeStream where we try
really hard to ensure the buffers are a consistent size.
2016-11-27 09:23:11 -08:00
casey langen
08a876edb2 Use VLC's lighter weight FFT. 2016-11-27 08:32:29 -08:00