mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 08:55:43 +08:00
Issue #100 Seperate COM1/2 output volumes
This commit is contained in:
committed by
Mat Sutcliffe
parent
577431ae49
commit
c1b75f7532
@@ -89,6 +89,9 @@ namespace BlackCore
|
||||
//! Get frequency in Hz
|
||||
uint getFrequencyHz() const;
|
||||
|
||||
//! Set gain ratio
|
||||
bool setGainRatio(double gainRatio) { return m_volume->setGainRatio(gainRatio); }
|
||||
|
||||
//! Log all inputs
|
||||
//! \private DEBUG only
|
||||
void logVoiceInputs(const QString &prefix = {}, qint64 timeCheckOffsetMs = -1);
|
||||
|
||||
@@ -187,6 +187,17 @@ namespace BlackCore
|
||||
return m_receiverInputs.at(transceiverID)->getReceivingCallsignsString();
|
||||
}
|
||||
|
||||
bool CSoundcardSampleProvider::setGainRatioForTransceiver(quint16 transceiverID, double gainRatio)
|
||||
{
|
||||
auto receiverInput = std::find_if(m_receiverInputs.begin(), m_receiverInputs.end(),
|
||||
[&](const auto receiver)
|
||||
{
|
||||
return receiver->getId() == transceiverID;
|
||||
});
|
||||
if (receiverInput == m_receiverInputs.end()) { return false; }
|
||||
return (*receiverInput)->setGainRatio(gainRatio);
|
||||
}
|
||||
|
||||
BlackMisc::Aviation::CCallsignSet CSoundcardSampleProvider::getReceivingCallsigns(quint16 transceiverID) const
|
||||
{
|
||||
return m_receiverInputs.at(transceiverID)->getReceivingCallsigns();
|
||||
|
||||
@@ -58,6 +58,9 @@ namespace BlackCore
|
||||
//! Receiving callsign as single string
|
||||
BlackMisc::Aviation::CCallsignSet getReceivingCallsigns(quint16 transceiverID) const;
|
||||
|
||||
//! Setting gain for specified receiver
|
||||
bool setGainRatioForTransceiver(quint16 transceiverID, double gainRatio);
|
||||
|
||||
signals:
|
||||
//! Changed callsigns
|
||||
void receivingCallsignsChanged(const TransceiverReceivingCallsignsChangedArgs &args);
|
||||
|
||||
Reference in New Issue
Block a user