From 58f86f029bed3096ba5b2f3178a69b50cc81f871 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Sat, 14 Jan 2023 00:17:53 +0000 Subject: [PATCH] Fix for mac compile --- audiodevices.h | 3 +-- audiohandler.h | 3 ++- pahandler.h | 2 +- rigcommander.cpp | 2 +- rthandler.h | 2 +- usbcontroller.h | 4 ++-- wfmain.cpp | 2 +- wfview.pro | 10 +++++----- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/audiodevices.h b/audiodevices.h index 96f206a..ead71a8 100644 --- a/audiodevices.h +++ b/audiodevices.h @@ -14,7 +14,6 @@ #include #ifndef Q_OS_LINUX -#include "RtAudio.h" #else #include "rtaudio/RtAudio.h" #endif @@ -103,4 +102,4 @@ private: }; -#endif \ No newline at end of file +#endif diff --git a/audiohandler.h b/audiohandler.h index 1d0641f..c59b719 100644 --- a/audiohandler.h +++ b/audiohandler.h @@ -70,11 +70,12 @@ public slots: virtual void incomingAudio(const audioPacket data); virtual void convertedInput(audioPacket audio); virtual void convertedOutput(audioPacket audio); + virtual void getNextAudioChunk(); private slots: virtual void stateChanged(QAudio::State state); virtual void clearUnderrun(); - virtual void getNextAudioChunk(); + signals: void audioMessage(QString message); diff --git a/pahandler.h b/pahandler.h index fcf0df9..4277e71 100644 --- a/pahandler.h +++ b/pahandler.h @@ -36,7 +36,7 @@ public: int getLatency(); - + using audioHandler::getNextAudioChunk; void getNextAudioChunk(QByteArray& data); quint16 getAmplitude(); diff --git a/rigcommander.cpp b/rigcommander.cpp index d6c4d59..bb3bbdc 100644 --- a/rigcommander.cpp +++ b/rigcommander.cpp @@ -889,7 +889,7 @@ void rigCommander::setPassband(quint16 pass) calc = quint16((pass / 200) - 1); } - else if (pass >= 600 || pass <=3600) // SSB/CW/PSK 10-40 (10-31 for RTTY) + else if (pass >= 600 && pass <=3600) // SSB/CW/PSK 10-40 (10-31 for RTTY) { calc = quint16((pass / 100) + 4); } diff --git a/rthandler.h b/rthandler.h index 376dada..03071b6 100644 --- a/rthandler.h +++ b/rthandler.h @@ -42,7 +42,7 @@ public: int getLatency(); - + using audioHandler::getNextAudioChunk; void getNextAudioChunk(QByteArray& data); quint16 getAmplitude(); diff --git a/usbcontroller.h b/usbcontroller.h index 54dff57..80f0c68 100644 --- a/usbcontroller.h +++ b/usbcontroller.h @@ -37,13 +37,13 @@ using namespace std; #define HIDDATALENGTH 64 #define MAX_STR 255 -enum commandType {normal,bandswitch,modeswitch}; +enum commandType {normalCommand,bandswitch,modeswitch}; struct COMMAND { COMMAND() {} COMMAND(int index, QString text, int command, char suffix) : - index(index), text(text), command(command), suffix(suffix), type(normal){} + index(index), text(text), command(command), suffix(suffix), type(normalCommand){} COMMAND(int index, QString text, int command, bandType band) : index(index), text(text), command(command), band(band), type(bandswitch) {} COMMAND(int index, QString text, int command, mode_kind mode) : diff --git a/wfmain.cpp b/wfmain.cpp index a57af48..1cd6317 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -1507,7 +1507,7 @@ void wfmain::doShuttle(bool up, unsigned char level) void wfmain::buttonControl(const COMMAND* cmd) { - if (cmd->type==normal) { + if (cmd->type==normalCommand) { //qDebug() << "Other command"; issueCmdUniquePriority((cmds)cmd->command, cmd->suffix); } diff --git a/wfview.pro b/wfview.pro index c1938ef..d8628f7 100644 --- a/wfview.pro +++ b/wfview.pro @@ -134,8 +134,8 @@ INSTALLS += stylesheets # CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT CONFIG(debug, release|debug) { - linux: QCPLIB = qcustomplotd - !linux: QCPLIB = qcustomplotd2 + !win32: QCPLIB = qcustomplotd + win32: QCPLIB = qcustomplotd2 win32 { contains(QMAKE_TARGET.arch, x86_64) { LIBS += -L../opus/win32/VS2015/x64/Debug/ @@ -152,8 +152,8 @@ CONFIG(debug, release|debug) { } } } else { - linux: QCPLIB = qcustomplot - !linux: QCPLIB = qcustomplot2 + !win32: QCPLIB = qcustomplot + win32: QCPLIB = qcustomplot2 win32 { contains(QMAKE_TARGET.arch, x86_64) { LIBS += -L../opus/win32/VS2015/x64/Release/ @@ -173,7 +173,7 @@ CONFIG(debug, release|debug) { linux:LIBS += -L./ -l$$QCPLIB -lopus !linux:LIBS += -l$$QCPLIB -lopus -macx:LIBS += -framework CoreAudio -framework CoreFoundation -lpthread -lopus +macx:LIBS += -framework CoreAudio -framework CoreFoundation -lpthread -lopus -lqcustomplot contains(DEFINES,USB_CONTROLLER){ linux:LIBS += -L./ -l$$QCPLIB -lhidapi-libusb