1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 01:18:38 -05:00

libfreedv: fix some inconsistent use of complex, C99, and C++11

done by @guruofquality
thanks a lot!
This commit is contained in:
Davide Gerhard 2019-04-15 10:54:27 +02:00
parent 190fe374f2
commit 21add46422
No known key found for this signature in database
GPG Key ID: 7CBEFA144857DC97
5 changed files with 13 additions and 3 deletions

View File

@ -54,6 +54,13 @@ endif()
set(QT_USE_QTOPENGL TRUE)
set(CMAKE_AUTOMOC ON)
if(APPLE AND EXISTS /usr/local/opt/qt5)
# Homebrew installs Qt5 (up to at least 5.9.1) in
# /usr/local/qt5, ensure it can be found by CMake since
# it is not in the default /usr/local prefix.
list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
endif()
#find_package(Qt4 REQUIRED)
find_package(Qt5Core 5.0 REQUIRED)
find_package(Qt5Widgets 5.0 REQUIRED)

View File

@ -1,5 +1,7 @@
project(freedv)
set(CMAKE_CXX_STANDARD 11)
set(freedv_SOURCES
codec2_fft.cpp
cohpsk.cpp
@ -80,4 +82,4 @@ target_link_libraries(freedv
${CODEC2_LIBRARIES}
)
install(TARGETS freedv DESTINATION lib)
install(TARGETS freedv DESTINATION lib)

View File

@ -25,7 +25,7 @@
#include "fdv_arm_math.h"
#define cmplx(value) (std::complex<float>{cosf(value), sinf(value)})
#define cmplx(value) (COSF(value) + SINF(value) * std::complex<float>(0.0f, 1.0f))
namespace FreeDV
{

View File

@ -36,6 +36,7 @@
#ifndef _FREEDV_VHF_FRAMING_H
#define _FREEDV_VHF_FRAMING_H
#include <cstddef>
#include "freedv_data_channel.h"
/* Standard frame type */

View File

@ -41,7 +41,7 @@
#endif
#define TAU (2.0f * M_PI)
#define ROT45 (M_PI / 4.0f)
#define ROT45 float(M_PI / 4.0f)
#define cmplx(value) (std::complex<float>{cosf(value), sinf(value)})
#define cmplxconj(value) (std::complex<float>{cosf(value), -sinf(value)})