mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
libfreedv: fix some inconsistent use of complex, C99, and C++11
done by @guruofquality thanks a lot!
This commit is contained in:
parent
190fe374f2
commit
21add46422
@ -54,6 +54,13 @@ endif()
|
|||||||
set(QT_USE_QTOPENGL TRUE)
|
set(QT_USE_QTOPENGL TRUE)
|
||||||
set(CMAKE_AUTOMOC ON)
|
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(Qt4 REQUIRED)
|
||||||
find_package(Qt5Core 5.0 REQUIRED)
|
find_package(Qt5Core 5.0 REQUIRED)
|
||||||
find_package(Qt5Widgets 5.0 REQUIRED)
|
find_package(Qt5Widgets 5.0 REQUIRED)
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
project(freedv)
|
project(freedv)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
set(freedv_SOURCES
|
set(freedv_SOURCES
|
||||||
codec2_fft.cpp
|
codec2_fft.cpp
|
||||||
cohpsk.cpp
|
cohpsk.cpp
|
||||||
@ -80,4 +82,4 @@ target_link_libraries(freedv
|
|||||||
${CODEC2_LIBRARIES}
|
${CODEC2_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS freedv DESTINATION lib)
|
install(TARGETS freedv DESTINATION lib)
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "fdv_arm_math.h"
|
#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
|
namespace FreeDV
|
||||||
{
|
{
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#ifndef _FREEDV_VHF_FRAMING_H
|
#ifndef _FREEDV_VHF_FRAMING_H
|
||||||
#define _FREEDV_VHF_FRAMING_H
|
#define _FREEDV_VHF_FRAMING_H
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
#include "freedv_data_channel.h"
|
#include "freedv_data_channel.h"
|
||||||
|
|
||||||
/* Standard frame type */
|
/* Standard frame type */
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TAU (2.0f * M_PI)
|
#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 cmplx(value) (std::complex<float>{cosf(value), sinf(value)})
|
||||||
#define cmplxconj(value) (std::complex<float>{cosf(value), -sinf(value)})
|
#define cmplxconj(value) (std::complex<float>{cosf(value), -sinf(value)})
|
||||||
|
Loading…
Reference in New Issue
Block a user