mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-06 10:47:34 +01:00
Bugfix + linux support
This commit is contained in:
parent
43f6802199
commit
379d6f8101
@ -7,7 +7,21 @@ if (MSVC)
|
||||
include_directories(sdrpp "C:/Program Files/PothosSDR/include/volk/")
|
||||
include_directories(sdrpp "C:/Program Files/PothosSDR/include/")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "-O3 -std=c++17")
|
||||
set(CMAKE_CXX_FLAGS "-O3 -std=c++17 -fsanitize=address")
|
||||
include_directories(sdrpp "/usr/include/volk")
|
||||
link_libraries(pthread)
|
||||
link_libraries(GL)
|
||||
link_libraries(GLEW)
|
||||
|
||||
# GLFW3
|
||||
link_libraries(glfw)
|
||||
|
||||
# FFTW3
|
||||
link_libraries(fftw3)
|
||||
link_libraries(fftw3f)
|
||||
|
||||
# PortAudio
|
||||
link_libraries(portaudio)
|
||||
endif (MSVC)
|
||||
|
||||
link_libraries(volk)
|
||||
@ -38,19 +52,6 @@ if (MSVC)
|
||||
# PortAudio
|
||||
find_package(portaudio CONFIG REQUIRED)
|
||||
target_link_libraries(sdrpp PRIVATE portaudio portaudio_static)
|
||||
else()
|
||||
# Glew
|
||||
link_libraries(glew)
|
||||
|
||||
# GLFW3
|
||||
link_libraries(glfw)
|
||||
|
||||
# FFTW3
|
||||
link_libraries(fftw)
|
||||
link_libraries(fftwf)
|
||||
|
||||
# PortAudio
|
||||
link_libraries(portaudio)
|
||||
endif (MSVC)
|
||||
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <condition_variable>
|
||||
#include <algorithm>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#define STREAM_BUF_SZ 1000000
|
||||
|
||||
|
@ -388,6 +388,8 @@ namespace ImGui {
|
||||
for (int i = 0; i < WATERFALL_RESOLUTION; i++) {
|
||||
int lowerId = floorf(((float)i / (float)WATERFALL_RESOLUTION) * colorCount);
|
||||
int upperId = ceilf(((float)i / (float)WATERFALL_RESOLUTION) * colorCount);
|
||||
lowerId = std::clamp<int>(lowerId, 0, colorCount - 1);
|
||||
upperId = std::clamp<int>(upperId, 0, colorCount - 1);
|
||||
float ratio = (((float)i / (float)WATERFALL_RESOLUTION) * colorCount) - lowerId;
|
||||
float r = (colors[lowerId][0] * (1.0f - ratio)) + (colors[upperId][0] * (ratio));
|
||||
float g = (colors[lowerId][1] * (1.0f - ratio)) + (colors[upperId][1] * (ratio));
|
||||
|
Loading…
Reference in New Issue
Block a user