mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 13:35:34 +08:00
Add methods to read received callsigns from AFV
ref T729
This commit is contained in:
committed by
Mat Sutcliffe
parent
d9dcadcffa
commit
7ac962ed77
@@ -123,12 +123,13 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
m_receivingCallsigns = receivingCallsigns.join(',');
|
||||
TransceiverReceivingCallsignsChangedArgs args = { m_id, receivingCallsigns };
|
||||
emit receivingCallsignsChanged(args);
|
||||
}
|
||||
lastNumberOfInUseInputs = numberOfInUseInputs;
|
||||
|
||||
// return volume.Read(buffer, offset, count);
|
||||
// return volume.Read(buffer, offset, count);
|
||||
return m_mixer->readSamples(samples, count);
|
||||
}
|
||||
|
||||
@@ -199,6 +200,11 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
QString ReceiverSampleProvider::getReceivingCallsigns() const
|
||||
{
|
||||
return m_receivingCallsigns;
|
||||
}
|
||||
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace BlackCore
|
||||
void addSilentSamples(const IAudioDto &audioDto, uint frequency, float distanceRatio);
|
||||
|
||||
quint16 getId() const { return m_id; }
|
||||
QString getReceivingCallsigns() const;
|
||||
|
||||
signals:
|
||||
void receivingCallsignsChanged(const TransceiverReceivingCallsignsChangedArgs &args);
|
||||
@@ -69,6 +70,7 @@ namespace BlackCore
|
||||
MixingSampleProvider *m_mixer;
|
||||
// TODO SignalGenerator blockTone;
|
||||
QVector<CallsignSampleProvider *> m_voiceInputs;
|
||||
QString m_receivingCallsigns;
|
||||
|
||||
bool m_doClickWhenAppropriate = false;
|
||||
int lastNumberOfInUseInputs = 0;
|
||||
|
||||
@@ -173,6 +173,11 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
QString SoundcardSampleProvider::getReceivingCallsigns(quint16 transceiverID)
|
||||
{
|
||||
return m_receiverInputs.at(transceiverID)->getReceivingCallsigns();
|
||||
}
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace BlackCore
|
||||
virtual int readSamples(QVector<qint16> &samples, qint64 count) override;
|
||||
void addOpusSamples(const IAudioDto &audioDto, const QVector<RxTransceiverDto> &rxTransceivers);
|
||||
void updateRadioTransceivers(const QVector<TransceiverDto> &radioTransceivers);
|
||||
QString getReceivingCallsigns(quint16 transceiverID);
|
||||
|
||||
signals:
|
||||
void receivingCallsignsChanged(const TransceiverReceivingCallsignsChangedArgs &args);
|
||||
|
||||
Reference in New Issue
Block a user