File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 23
23
sudo apt-get install -y libobs-dev libfftw3-dev
24
24
25
25
- name : ' Cmake'
26
- run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/bin
26
+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DSTATIC_FFTW=ON - DCMAKE_INSTALL_PREFIX=${{github.workspace}}/bin
27
27
28
28
- name : ' Build'
29
29
working-directory : ${{github.workspace}}/build
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
18
18
endif ()
19
19
20
20
option (BUILD_SHARED_LIBS "Build shared libraries" OFF ) # static link dependencies
21
+ if (NOT MSVC )
22
+ option (STATIC_FFTW "Static link FFTW" OFF ) # allow static linking FFTW on non-windows platforms
23
+ endif ()
21
24
22
25
if (WIN32 )
23
26
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
@@ -54,7 +57,11 @@ if(MSVC)
54
57
set (FFTW_INCLUDE_DIRS "deps/fftw-3.3.10/api" )
55
58
else ()
56
59
find_path (FFTW_INCLUDE_DIRS fftw3.h )
57
- find_library (FFTW_LIBRARIES fftw3f )
60
+ if (STATIC_FFTW )
61
+ find_library (FFTW_LIBRARIES libfftw3f.a )
62
+ else ()
63
+ find_library (FFTW_LIBRARIES fftw3f )
64
+ endif ()
58
65
if (NOT FFTW_INCLUDE_DIRS )
59
66
message (FATAL_ERROR "Could not locate FFTW header." )
60
67
endif ()
Original file line number Diff line number Diff line change 21
21
### Linux (Ubuntu 20.04)
22
22
#### Prebuilt Binaries
23
23
- Extract Waveform\_ v#.#.#\_ Ubuntu\_ x64.tar.gz to your ` ~/.config/obs-studio/plugins ` folder.
24
- - Install FFTW ` sudo apt-get install libfftw3-3 `
25
24
26
25
#### Source Build
27
26
- Step-by-step instructions in the [ readme] ( https://github.com/phandasm/waveform/blob/master/README.md#linux-ubuntu-20043-lts ) .
Original file line number Diff line number Diff line change @@ -764,7 +764,7 @@ void WAVSource::render_bars([[maybe_unused]] gs_effect_t *effect)
764
764
const auto cpos = m_stereo ? center : bottom;
765
765
766
766
auto max_steps = (size_t )(cpos / step_stride);
767
- if (((int )cpos - (max_steps * step_stride)) >= m_step_width)
767
+ if (((int )cpos - (int )( max_steps * step_stride)) >= m_step_width)
768
768
++max_steps;
769
769
770
770
// vertex buffer
@@ -880,7 +880,7 @@ void WAVSource::render_bars([[maybe_unused]] gs_effect_t *effect)
880
880
881
881
if (m_display_mode == DisplayMode::STEPPED_BAR)
882
882
{
883
- for (auto j = 0 ; j < max_steps; ++j)
883
+ for (auto j = 0u ; j < max_steps; ++j)
884
884
{
885
885
auto y1 = (float )(j * step_stride);
886
886
auto y2 = y1 + m_step_width;
You can’t perform that action at this time.
0 commit comments