Klaus Basan
b632232566
Ref T730, fixed from "normalized value calculation"
2019-10-11 19:00:51 +01:00
Klaus Basan
966b261c0d
[AFV] Ref T730, reverted fix NOT to start in function CAfvClient::restartWithNewDevices
2019-10-11 19:00:50 +01:00
Klaus Basan
ef9e7b0bf1
Ref T730, Ref T739 update from own aircraft in one step
...
* update all values from own aircraft in "one step"
* rational: avoid "single property" updates and numerous round trips (signals, transceiver updates)
* also allow updates of not yet connect, as "a kind of preset"
* do NOT send to network if not authenticated
2019-10-11 19:00:49 +01:00
Klaus Basan
caa78395a9
Ref T730, allow to init TxTransceiverDto from TransceiverDto
2019-10-11 19:00:49 +01:00
Klaus Basan
f81a9e8447
Ref T730, Ref T739, make sure transmitting receivers are correct
...
* deferred init, make sure values from context are used (if possible)
* only use 1 transmitting transceiver
2019-10-11 19:00:48 +01:00
Roland Rossgotterer
3792c4fa76
[AFV] Do not restart audio if it was not started yet
2019-10-11 19:00:47 +01:00
Roland Rossgotterer
4827c0e4ab
[AFV] Request permission to access microphone on MacOS
2019-10-11 19:00:47 +01:00
Roland Rossgotterer
4d3da8450f
Fix namespace in template function
2019-10-11 19:00:46 +01:00
Klaus Basan
e485824bfc
Ref T730, allow to update voice server URL
2019-10-11 19:00:45 +01:00
Klaus Basan
c842820267
Ref T730, consider settings for clikc/block sounds and log categories
2019-10-11 19:00:45 +01:00
Klaus Basan
ca90a225e1
Ref T730, removed unused timer code in input
2019-10-11 19:00:45 +01:00
Klaus Basan
713d2ee626
Ref T730, Ref T739 avoid timer stopping issue during shutdown
...
* use timer with parent
* avoid QObject::~QObject: Timers cannot be stopped from another thread
* see https://discordapp.com/channels/539048679160676382/623947987822837779/630521007056224286
2019-10-11 19:00:44 +01:00
Klaus Basan
b0f1f5fae4
Ref T730, use physical unit
2019-10-11 19:00:44 +01:00
Klaus Basan
857e3581b0
Ref T730, style
...
* set object name
* use m_XYZ member name
2019-10-11 19:00:43 +01:00
Klaus Basan
c604ced11c
[AFV] Ref T730, improved "locking"
...
* use more fine granular locks
* do NOT lock signals (when emit is used)
2019-10-11 19:00:43 +01:00
Klaus Basan
b802933422
Ref T730, use an event loop with parent "this"
...
* central function to get QEventLoop (this can also be used to set a timeout)
* do NOT use sApp as parent -> parent must be in same thread
2019-10-11 19:00:43 +01:00
Klaus Basan
401c89aa63
Ref T730, style and log messages
2019-10-11 19:00:42 +01:00
Klaus Basan
e30b690191
Ref T730, use Pointer<QEventLoop> loop to avoid issue with deleted references
2019-10-11 19:00:42 +01:00
Roland Rossgotterer
b8661918d7
[AFV] Finalize blocking tone
...
Blocking tone is emitted if more than one station is received
in parallel.
2019-10-11 19:00:40 +01:00
Mat Sutcliffe
b90855d393
[AFV] Fixed GCC and Clang errors
2019-10-11 19:00:40 +01:00
Roland Rossgotterer
d3a1eb1d60
[AFV] First version of threaded CAfvClient
2019-10-11 19:00:38 +01:00
Klaus Basan
d1006160f8
Ref T730, style
2019-10-11 19:00:37 +01:00
Klaus Basan
4c170e0ac4
Ref T730, reply in CAfvClient can be nullptr when called from another thread
...
* nullptr is a normal condition
* see https://discordapp.com/channels/539048679160676382/623947987822837779/629780397986676766
2019-10-11 19:00:34 +01:00
Klaus Basan
226b601565
Ref T730, log category
2019-10-11 19:00:34 +01:00
Klaus Basan
27fedad3fd
Ref T730, renamed to CApiServerConnection
2019-10-11 19:00:34 +01:00
Klaus Basan
61d82ab780
Ref T570, prepared ApiServerConnection for "threaded AFV client"
...
* use get/post/deleteFromNetwork function in sApp (calling QAM in coorect thread)
* removed timer, use QDateTime::currentMSecsSinceEpoch - one member less causing issues in threaded environment
* using CLogMessage instead of qDebug/qWarning
* unified log messages
2019-10-11 19:00:34 +01:00
Klaus Basan
6e9fa0b2ad
Ref T730, style
2019-10-11 19:00:33 +01:00
Roland Rossgotterer
90e87835fc
[AFV] Select audio device based on situational need
...
For AFV itself, a low latency device is required (which on Windows most likely will pick WASAPI).
For notifications and effects, the most compatible device is required (which on Windows will most likely fall back to QWindowsAudio).
2019-10-11 19:00:32 +01:00
Roland Rossgotterer
a2e3700739
Replace QAudioDeviceInfo with CAudioDeviceInfo where possible
...
QAudioDeviceInfo is a low level technical class, which shouldn't be used in higher level code. Remove it from all APIs
where possible and just create it in order to interface with QAudio
2019-10-11 19:00:31 +01:00
Roland Rossgotterer
8d84dcbe08
[AFV] Make sure all QObjects below AfvClient have a parent
2019-10-11 19:00:30 +01:00
Roland Rossgotterer
240df93406
[AFV] Change output format and processing to 32 bit float
...
32 bit float is what is used in C# reference and has a much higher
dynamic range. 16 bit integer was clipping very often with all the VHF
simulation applied.
2019-10-11 19:00:29 +01:00
Roland Rossgotterer
fbb126370c
[AFV] Use distance ratio 1.0 in loopback mode
...
Distance ratio 1.0 means same position as sending position, decreasing
ratio means increasing distance.
2019-10-11 19:00:29 +01:00
Roland Rossgotterer
bff4eeb416
[AFV] Update effects after adding new samples
...
This is necessary to regularly update the distance effects while moving
2019-10-11 19:00:29 +01:00
Roland Rossgotterer
574370579d
[AFV] Apply BiQuadFilters on float samples
2019-10-11 19:00:28 +01:00
Roland Rossgotterer
d757b8977f
[AFV] Reset pointer after stopping audio output
2019-10-11 19:00:27 +01:00
Roland Rossgotterer
df30a010b5
[AFV] Fix includes
2019-10-11 19:00:27 +01:00
Roland Rossgotterer
1f2d4a10b1
[AFV] Add HF simulation
2019-10-11 19:00:27 +01:00
Roland Rossgotterer
2c1067b27e
[AFV] Update CEqualizerSampleProvider to VHF 4.0
2019-10-11 19:00:24 +01:00
Klaus Basan
91b65fa2b6
Ref T730, AFV client fixes
...
* correct quint32 for frequency
* make sure frequencies are not updated twice, only update position
* re-init transceivers if stopped and started again
2019-10-11 19:00:23 +01:00
Klaus Basan
cf6434f49b
Ref T730, fixed using wrong member "m_outputVolume", added new member "m_outputVolumeDb"
2019-10-11 19:00:23 +01:00
Klaus Basan
3ddded423a
Ref T730, style
2019-10-11 19:00:22 +01:00
Klaus Basan
905c487451
Ref T737, stop output device
2019-10-11 19:00:21 +01:00
Klaus Basan
7d04ca6435
Ref T730, register metatype so struct can be used with signals
...
Remark: Unregistered it only works for direct connections
2019-10-11 19:00:21 +01:00
Klaus Basan
bde7baf84d
Ref T730, style
2019-10-11 19:00:21 +01:00
Klaus Basan
5f6aebebe8
Ref T730, replaced uint array by vector to avoid memory leak
...
* the heap array was not deleted
* using QVector<uint> now
* const correctness
2019-10-11 19:00:20 +01:00
Klaus Basan
c3684a2f8c
Ref T731, added namespace for utility functions
2019-10-11 19:00:19 +01:00
Klaus Basan
e33e06b21e
Ref T730, style
2019-10-11 19:00:15 +01:00
Klaus Basan
e560be65a6
Ref T730, stop input/output if object is destroyed
2019-10-11 19:00:14 +01:00
Klaus Basan
6a9109bf8f
Ref T730, style
2019-10-11 19:00:14 +01:00
Klaus Basan
cd58108bfe
[AFV] Ref T730, reload settings after starting audio so they are applied
2019-10-11 19:00:06 +01:00