1
0
mirror of https://github.com/cjcliffe/CubicSDR.git synced 2025-03-31 16:48:31 -04:00

MacOS M1 (Venture) build warning fixes

Changed x64 to arm64 output architecture for Mac M1
Fixed few "warning: missing field __opaque initializer" warnings
Updated CMakeList.txt from 2.8 to 3.0 minimal to supress cmake warning
Changed LIQUID to Liquid cmake package detection
This commit is contained in:
Robert J. Gebis 2023-01-13 16:56:27 -06:00
parent e09e7e8381
commit 7625eba238
11 changed files with 12 additions and 14 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required (VERSION 3.0)
project (CubicSDR)
@ -142,7 +142,7 @@ endmacro(configure_files_recurse)
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
MESSAGE( "64 bit compiler detected" )
SET( EX_PLATFORM 64 )
SET( EX_PLATFORM_NAME "x64" )
SET( EX_PLATFORM_NAME "${CMAKE_SYSTEM_PROCESSOR}" )
else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
MESSAGE( "32 bit compiler detected" )
SET( EX_PLATFORM 32 )

View File

@ -17,6 +17,6 @@ find_library (LIQUID_LIBRARIES NAMES liquid)
# handle the QUIETLY and REQUIRED arguments and set LIQUID_FOUND to TRUE if
# all listed variables are TRUE
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (LIQUID DEFAULT_MSG LIQUID_LIBRARIES LIQUID_INCLUDES)
find_package_handle_standard_args (Liquid DEFAULT_MSG LIQUID_LIBRARIES LIQUID_INCLUDES)
#mark_as_advanced (LIQUID_LIBRARIES LIQUID_INCLUDES)

View File

@ -990,9 +990,7 @@ bool RtApiCore :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigne
AudioDeviceID id = deviceList[ device ];
// Setup for stream mode.
bool isInput = false;
if ( mode == INPUT ) {
isInput = true;
property.mScope = kAudioDevicePropertyScopeInput;
}
else

View File

@ -1631,7 +1631,6 @@ bool AppFrame::actionOnMenuAudioSampleRate(wxCommandEvent& event) {
auto outputDevices = wxGetApp().getDemodMgr().getOutputDevices();
int i = 0;
for (auto & outputDevice : outputDevices) {
int menu_id = wxID_AUDIO_BANDWIDTH_BASE + wxID_AUDIO_DEVICE_MULTIPLIER * outputDevice.first;
@ -1649,7 +1648,6 @@ bool AppFrame::actionOnMenuAudioSampleRate(wxCommandEvent& event) {
j++;
}
i++;
}
}
@ -1980,6 +1978,8 @@ bool AppFrame::actionOnMenuRig(wxCommandEvent &event) {
wxGetApp().stopRig();
wxGetApp().initRig(rigModel, rigPort, rigSerialRate);
}
#else
(void)event; // Suppres build warning
#endif
return bManaged;

View File

@ -17,7 +17,7 @@ void AudioSinkThread::run() {
#ifdef __APPLE__
pthread_t tID = pthread_self(); // ID of this thread
int priority = sched_get_priority_max(SCHED_RR) - 1;
sched_param prio = { priority }; // scheduling priority of thread
sched_param prio = { priority, {0}}; // scheduling priority of thread
pthread_setschedparam(tID, SCHED_RR, &prio);
#endif

View File

@ -472,7 +472,7 @@ void AudioThread::run() {
#ifdef __APPLE__
pthread_t tID = pthread_self(); // ID of this thread
int priority = sched_get_priority_max(SCHED_RR) - 1;
sched_param prio = { priority }; // scheduling priority of thread
sched_param prio = { priority, {0}}; // scheduling priority of thread
pthread_setschedparam(tID, SCHED_RR, &prio);
#endif

View File

@ -55,7 +55,7 @@ void DemodulatorPreThread::run() {
#ifdef __APPLE__
pthread_t tID = pthread_self(); // ID of this thread
int priority = sched_get_priority_max( SCHED_FIFO) - 1;
sched_param prio = {priority}; // scheduling priority of thread
sched_param prio = {priority, {0}}; // scheduling priority of thread
pthread_setschedparam(tID, SCHED_FIFO, &prio);
#endif

View File

@ -70,7 +70,7 @@ void DemodulatorThread::run() {
#ifdef __APPLE__
pthread_t tID = pthread_self(); // ID of this thread
int priority = sched_get_priority_max( SCHED_FIFO )-1;
sched_param prio = {priority}; // scheduling priority of thread
sched_param prio = {priority, {0}}; // scheduling priority of thread
pthread_setschedparam(tID, SCHED_FIFO, &prio);
#endif

View File

@ -153,7 +153,7 @@ void SDRPostThread::run() {
#ifdef __APPLE__
pthread_t tID = pthread_self(); // ID of this thread
int priority = sched_get_priority_max( SCHED_FIFO);
sched_param prio = {priority}; // scheduling priority of thread
sched_param prio = {priority, {0}}; // scheduling priority of thread
pthread_setschedparam(tID, SCHED_FIFO, &prio);
#endif

View File

@ -180,7 +180,7 @@ bool SpectrumCanvas::getUseDBOfs() {
return spectrumPanel.getUseDBOffset();
}
void SpectrumCanvas::setView(long long center_freq_in, int bandwidth_in) {
void SpectrumCanvas::setView(long long center_freq_in, long long bandwidth_in) {
bwChange += bandwidth_in-bandwidth;
#define BW_RESET_TH 400000
if (bwChange > BW_RESET_TH || bwChange < -BW_RESET_TH) {

View File

@ -39,7 +39,7 @@ public:
void setUseDBOfs(bool showDb);
bool getUseDBOfs();
void setView(long long center_freq_in, int bandwidth_in);
void setView(long long center_freq_in, long long bandwidth_in) override;
void disableView() override;
void setScaleFactorEnabled(bool en);