kopia lustrzana https://gitlab.com/eliggett/wfview
Fix errors identified by clang scan-build
rodzic
54b00b9022
commit
7df55bc41f
|
@ -113,13 +113,7 @@ bool audioConverter::convert(audioPacket audio)
|
|||
QByteArray outPacket(nSamples * sizeof(float) * inFormat.channelCount(), (char)0xff); // Preset the output buffer size.
|
||||
float* out = (float*)outPacket.data();
|
||||
|
||||
//if (audio.seq > lastAudioSequence + 1) {
|
||||
// nSamples = opus_decode_float(opusDecoder, Q_NULLPTR, 0, out, nSamples, 1);
|
||||
//}
|
||||
//else {
|
||||
nSamples = opus_decode_float(opusDecoder, in, audio.data.size(), out, nSamples, 0);
|
||||
//}
|
||||
//lastAudioSequence = audio.seq;
|
||||
opus_decode_float(opusDecoder, in, audio.data.size(), out, nSamples, 0);
|
||||
audio.data.clear();
|
||||
audio.data = outPacket; // Replace incoming data with converted.
|
||||
}
|
||||
|
|
|
@ -493,7 +493,7 @@ void meter::drawScalePo(QPainter *qp)
|
|||
|
||||
// Here, P is now 60 watts:
|
||||
// Higher scale:
|
||||
i = i - (int)(10*dnPerWatt); // back one tick first. Otherwise i starts at 178.
|
||||
//i = i - (int)(10*dnPerWatt); // back one tick first. Otherwise i starts at 178. **Not used?**
|
||||
//qDebug() << "meter i: " << i;
|
||||
dnPerWatt = (213-143.0f) / 50.0f; // 1.4 dn per watt
|
||||
// P=5 here.
|
||||
|
|
|
@ -688,6 +688,7 @@ void repeaterSetup::on_splitPlusButton_clicked()
|
|||
txfreqhz = currentMainFrequency.Hz + hzOffset;
|
||||
f.Hz = txfreqhz;
|
||||
f.VFO = inactiveVFO;
|
||||
f.MHzDouble = f.Hz/1E6;
|
||||
txString = QString::number(f.Hz / double(1E6), 'f', 6);
|
||||
ui->splitTransmitFreqEdit->setText(txString);
|
||||
usedPlusSplit = true;
|
||||
|
@ -707,6 +708,7 @@ void repeaterSetup::on_splitMinusBtn_clicked()
|
|||
txfreqhz = currentMainFrequency.Hz - hzOffset;
|
||||
f.Hz = txfreqhz;
|
||||
f.VFO = inactiveVFO;
|
||||
f.MHzDouble = f.Hz/1E6;
|
||||
txString = QString::number(f.Hz / double(1E6), 'f', 6);
|
||||
ui->splitTransmitFreqEdit->setText(txString);
|
||||
usedPlusSplit = false;
|
||||
|
@ -723,6 +725,7 @@ void repeaterSetup::on_splitTxFreqSetBtn_clicked()
|
|||
{
|
||||
f.Hz = fHz;
|
||||
f.VFO = inactiveVFO;
|
||||
f.MHzDouble = f.Hz/1E6;
|
||||
emit setTransmitFrequency(f);
|
||||
emit setTransmitMode(modeTransmitVFO);
|
||||
}
|
||||
|
@ -812,6 +815,8 @@ void repeaterSetup::on_rptrOffsetSetBtn_clicked()
|
|||
{
|
||||
freqt f;
|
||||
f.Hz = getFreqHzFromMHzString(ui->rptrOffsetEdit->text());
|
||||
f.MHzDouble = f.Hz/1E6;
|
||||
f.VFO=activeVFO;
|
||||
if(f.Hz != 0)
|
||||
{
|
||||
emit setRptDuplexOffset(f);
|
||||
|
|
|
@ -710,7 +710,7 @@ static int update_filter(SpeexResamplerState* st)
|
|||
/* Adding buffer_size to filt_len won't overflow here because filt_len
|
||||
could be multiplied by sizeof(spx_word16_t) above. */
|
||||
min_alloc_size = st->filt_len - 1 + st->buffer_size;
|
||||
if (min_alloc_size > st->mem_alloc_size)
|
||||
if (min_alloc_size > st->mem_alloc_size && st->nb_channels>0)
|
||||
{
|
||||
spx_word16_t* mem;
|
||||
if (INT_MAX / sizeof(spx_word16_t) / st->nb_channels < min_alloc_size)
|
||||
|
|
|
@ -4773,6 +4773,8 @@ freqt rigCommander::parseFrequencyRptOffset(QByteArray data)
|
|||
f.Hz += (data[1] & 0x0f) * 100; // 100 Hz
|
||||
f.Hz += ((data[1] & 0xf0) >> 4) * 1000; // 1 KHz
|
||||
|
||||
f.MHzDouble=f.Hz/1E6;
|
||||
f.VFO = activeVFO;
|
||||
return f;
|
||||
}
|
||||
|
||||
|
|
|
@ -382,7 +382,8 @@ void udpServer::controlReceived()
|
|||
qCritical(logAudio()) << "Unsupported Transmit Audio Handler selected!";
|
||||
}
|
||||
|
||||
//radio->txaudio = new audioHandler();
|
||||
|
||||
if (radio->txaudio != Q_NULLPTR) {
|
||||
radio->txAudioThread = new QThread(this);
|
||||
radio->txAudioThread->setObjectName("txAudio()");
|
||||
|
||||
|
@ -406,7 +407,7 @@ void udpServer::controlReceived()
|
|||
hasTxAudio = datagram.senderAddress();
|
||||
|
||||
connect(this, SIGNAL(haveAudioData(audioPacket)), radio->txaudio, SLOT(incomingAudio(audioPacket)));
|
||||
|
||||
}
|
||||
}
|
||||
if ((!memcmp(radio->guid, current->guid, GUIDLEN) || config->rigs.size() == 1) && radio->rxaudio == Q_NULLPTR && !config->lan)
|
||||
{
|
||||
|
@ -431,6 +432,8 @@ void udpServer::controlReceived()
|
|||
qCritical(logAudio()) << "Unsupported Receive Audio Handler selected!";
|
||||
}
|
||||
|
||||
if (radio->rxaudio != Q_NULLPTR)
|
||||
{
|
||||
|
||||
radio->rxAudioThread = new QThread(this);
|
||||
radio->rxAudioThread->setObjectName("rxAudio()");
|
||||
|
@ -453,6 +456,7 @@ void udpServer::controlReceived()
|
|||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -7245,7 +7245,7 @@ void wfmain::receiveModInput(rigInput input, bool dataOn)
|
|||
{
|
||||
QComboBox *box;
|
||||
QString inputName;
|
||||
bool found;
|
||||
bool found=false;
|
||||
bool foundCurrent = false;
|
||||
|
||||
if(dataOn)
|
||||
|
|
Ładowanie…
Reference in New Issue