mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 13:55:36 +08:00
Ref T730, callsign set used for received callsigns
This commit is contained in:
committed by
Mat Sutcliffe
parent
5a19bbdb5e
commit
7c89234f8c
@@ -15,6 +15,8 @@
|
||||
#include "blacksound/sampleprovider/sampleprovider.h"
|
||||
#include "blacksound/sampleprovider/mixingsampleprovider.h"
|
||||
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/audio/audiosettings.h"
|
||||
#include <QtGlobal>
|
||||
|
||||
namespace BlackCore
|
||||
@@ -40,41 +42,59 @@ namespace BlackCore
|
||||
CReceiverSampleProvider(const QAudioFormat &audioFormat, quint16 id, int voiceInputNumber, QObject *parent = nullptr);
|
||||
|
||||
void setBypassEffects(bool value);
|
||||
void setFrequency(const uint &frequency);
|
||||
void setFrequency(const uint &frequencyHz);
|
||||
|
||||
//! Number of active callsign
|
||||
int activeCallsigns() const;
|
||||
float volume() const;
|
||||
|
||||
bool getMute() const;
|
||||
//! Volume
|
||||
double volume() const { return 1.0; }
|
||||
|
||||
//! Mute @{
|
||||
bool getMute() const { return m_mute; }
|
||||
void setMute(bool value);
|
||||
//! @}
|
||||
|
||||
//! \copydoc BlackSound::SampleProvider::ISampleProvider::readSamples
|
||||
virtual int readSamples(QVector<qint16> &samples, qint64 count) override;
|
||||
|
||||
void addOpusSamples(const IAudioDto &audioDto, uint frequency, float distanceRatio);
|
||||
void addSilentSamples(const IAudioDto &audioDto, uint frequency, float distanceRatio);
|
||||
|
||||
quint16 getId() const { return m_id; }
|
||||
QString getReceivingCallsigns() const;
|
||||
|
||||
//! Receiving callsigns as string
|
||||
//! \remark those callsigns are transmitting and "I do receive them"
|
||||
const QString &getReceivingCallsignsString() const { return m_receivingCallsignsString; }
|
||||
|
||||
//! Receiving callsigns
|
||||
//! \remark those callsigns are transmitting and "I do receive them"
|
||||
const BlackMisc::Aviation::CCallsignSet &getReceivingCallsigns() { return m_receivingCallsigns; }
|
||||
|
||||
signals:
|
||||
//! Receving callsigns have changed
|
||||
void receivingCallsignsChanged(const TransceiverReceivingCallsignsChangedArgs &args);
|
||||
|
||||
private:
|
||||
uint m_frequency = 122800;
|
||||
uint m_frequencyHz = 122800000;
|
||||
bool m_mute = false;
|
||||
|
||||
const float m_clickGain = 1.0f;
|
||||
const double m_blockToneGain = 0.10f;
|
||||
const double m_clickGain = 1.0;
|
||||
const double m_blockToneGain = 0.10;
|
||||
|
||||
quint16 m_id;
|
||||
BlackMisc::CSettingReadOnly<BlackMisc::Audio::TSettings> m_audioSettings { this };
|
||||
|
||||
// TODO VolumeSampleProvider volume;
|
||||
BlackSound::SampleProvider::CMixingSampleProvider *m_mixer = nullptr;
|
||||
// TODO SignalGenerator blockTone;
|
||||
QVector<CallsignSampleProvider *> m_voiceInputs;
|
||||
QString m_receivingCallsigns;
|
||||
|
||||
QString m_receivingCallsignsString;
|
||||
BlackMisc::Aviation::CCallsignSet m_receivingCallsigns;
|
||||
|
||||
bool m_doClickWhenAppropriate = false;
|
||||
int lastNumberOfInUseInputs = 0;
|
||||
int m_lastNumberOfInUseInputs = 0;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user