kopia lustrzana https://gitlab.com/eliggett/wfview
Local af gain now has anti-log audio pot taper.
rodzic
e4fdf6058c
commit
e6e8a115c3
|
@ -288,7 +288,9 @@ void audioHandler::start()
|
|||
|
||||
void audioHandler::setVolume(unsigned char volume)
|
||||
{
|
||||
this->volume = (qreal)volume/255.0;
|
||||
//this->volume = (qreal)volume/255.0;
|
||||
this->volume = audiopot[volume];
|
||||
|
||||
qInfo(logAudio()) << (setup.isinput ? "Input" : "Output") << "setVolume: " << volume << "(" << this->volume << ")";
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ typedef signed short MY_TYPE;
|
|||
#include <QMap>
|
||||
#include "resampler/speex_resampler.h"
|
||||
#include "ring/ring.h"
|
||||
|
||||
#include "audiotaper.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
|
|
@ -0,0 +1,273 @@
|
|||
#ifndef AUDIOTAPER_H
|
||||
#define AUDIOTAPER_H
|
||||
#include <QtMath>
|
||||
|
||||
const qreal audiopot[256] =
|
||||
{
|
||||
0.00000,
|
||||
0.00101,
|
||||
0.00202,
|
||||
0.00305,
|
||||
0.00409,
|
||||
0.00513,
|
||||
0.00619,
|
||||
0.00725,
|
||||
0.00832,
|
||||
0.00941,
|
||||
0.01050,
|
||||
0.01160,
|
||||
0.01272,
|
||||
0.01384,
|
||||
0.01497,
|
||||
0.01612,
|
||||
0.01727,
|
||||
0.01843,
|
||||
0.01961,
|
||||
0.02080,
|
||||
0.02199,
|
||||
0.02320,
|
||||
0.02442,
|
||||
0.02565,
|
||||
0.02689,
|
||||
0.02814,
|
||||
0.02940,
|
||||
0.03068,
|
||||
0.03196,
|
||||
0.03326,
|
||||
0.03457,
|
||||
0.03589,
|
||||
0.03723,
|
||||
0.03857,
|
||||
0.03993,
|
||||
0.04130,
|
||||
0.04268,
|
||||
0.04408,
|
||||
0.04548,
|
||||
0.04690,
|
||||
0.04834,
|
||||
0.04978,
|
||||
0.05124,
|
||||
0.05272,
|
||||
0.05420,
|
||||
0.05570,
|
||||
0.05721,
|
||||
0.05874,
|
||||
0.06028,
|
||||
0.06184,
|
||||
0.06341,
|
||||
0.06499,
|
||||
0.06659,
|
||||
0.06820,
|
||||
0.06982,
|
||||
0.07146,
|
||||
0.07312,
|
||||
0.07479,
|
||||
0.07648,
|
||||
0.07818,
|
||||
0.07990,
|
||||
0.08163,
|
||||
0.08338,
|
||||
0.08514,
|
||||
0.08692,
|
||||
0.08872,
|
||||
0.09053,
|
||||
0.09236,
|
||||
0.09421,
|
||||
0.09607,
|
||||
0.09795,
|
||||
0.09984,
|
||||
0.10176,
|
||||
0.10369,
|
||||
0.10564,
|
||||
0.10760,
|
||||
0.10959,
|
||||
0.11159,
|
||||
0.11361,
|
||||
0.11565,
|
||||
0.11770,
|
||||
0.11978,
|
||||
0.12187,
|
||||
0.12399,
|
||||
0.12612,
|
||||
0.12827,
|
||||
0.13044,
|
||||
0.13263,
|
||||
0.13484,
|
||||
0.13707,
|
||||
0.13933,
|
||||
0.14160,
|
||||
0.14389,
|
||||
0.14620,
|
||||
0.14854,
|
||||
0.15089,
|
||||
0.15327,
|
||||
0.15567,
|
||||
0.15809,
|
||||
0.16053,
|
||||
0.16299,
|
||||
0.16548,
|
||||
0.16799,
|
||||
0.17052,
|
||||
0.17307,
|
||||
0.17565,
|
||||
0.17825,
|
||||
0.18088,
|
||||
0.18353,
|
||||
0.18620,
|
||||
0.18889,
|
||||
0.19162,
|
||||
0.19436,
|
||||
0.19713,
|
||||
0.19993,
|
||||
0.20275,
|
||||
0.20560,
|
||||
0.20847,
|
||||
0.21137,
|
||||
0.21429,
|
||||
0.21725,
|
||||
0.22022,
|
||||
0.22323,
|
||||
0.22626,
|
||||
0.22932,
|
||||
0.23241,
|
||||
0.23553,
|
||||
0.23867,
|
||||
0.24184,
|
||||
0.24504,
|
||||
0.24828,
|
||||
0.25153,
|
||||
0.25482,
|
||||
0.25814,
|
||||
0.26149,
|
||||
0.26487,
|
||||
0.26828,
|
||||
0.27172,
|
||||
0.27520,
|
||||
0.27870,
|
||||
0.28224,
|
||||
0.28580,
|
||||
0.28941,
|
||||
0.29304,
|
||||
0.29670,
|
||||
0.30040,
|
||||
0.30414,
|
||||
0.30790,
|
||||
0.31170,
|
||||
0.31554,
|
||||
0.31941,
|
||||
0.32331,
|
||||
0.32725,
|
||||
0.33123,
|
||||
0.33524,
|
||||
0.33929,
|
||||
0.34338,
|
||||
0.34750,
|
||||
0.35166,
|
||||
0.35586,
|
||||
0.36009,
|
||||
0.36437,
|
||||
0.36868,
|
||||
0.37303,
|
||||
0.37742,
|
||||
0.38185,
|
||||
0.38633,
|
||||
0.39084,
|
||||
0.39539,
|
||||
0.39999,
|
||||
0.40462,
|
||||
0.40930,
|
||||
0.41402,
|
||||
0.41878,
|
||||
0.42359,
|
||||
0.42844,
|
||||
0.43333,
|
||||
0.43827,
|
||||
0.44326,
|
||||
0.44828,
|
||||
0.45336,
|
||||
0.45848,
|
||||
0.46364,
|
||||
0.46886,
|
||||
0.47412,
|
||||
0.47943,
|
||||
0.48478,
|
||||
0.49019,
|
||||
0.49564,
|
||||
0.50115,
|
||||
0.50670,
|
||||
0.51230,
|
||||
0.51796,
|
||||
0.52366,
|
||||
0.52942,
|
||||
0.53523,
|
||||
0.54110,
|
||||
0.54701,
|
||||
0.55298,
|
||||
0.55900,
|
||||
0.56508,
|
||||
0.57122,
|
||||
0.57741,
|
||||
0.58365,
|
||||
0.58995,
|
||||
0.59631,
|
||||
0.60273,
|
||||
0.60920,
|
||||
0.61574,
|
||||
0.62233,
|
||||
0.62898,
|
||||
0.63570,
|
||||
0.64247,
|
||||
0.64931,
|
||||
0.65620,
|
||||
0.66316,
|
||||
0.67019,
|
||||
0.67727,
|
||||
0.68442,
|
||||
0.69164,
|
||||
0.69892,
|
||||
0.70627,
|
||||
0.71368,
|
||||
0.72116,
|
||||
0.72871,
|
||||
0.73633,
|
||||
0.74402,
|
||||
0.75178,
|
||||
0.75960,
|
||||
0.76750,
|
||||
0.77547,
|
||||
0.78351,
|
||||
0.79163,
|
||||
0.79981,
|
||||
0.80808,
|
||||
0.81641,
|
||||
0.82483,
|
||||
0.83332,
|
||||
0.84188,
|
||||
0.85053,
|
||||
0.85925,
|
||||
0.86805,
|
||||
0.87693,
|
||||
0.88590,
|
||||
0.89494,
|
||||
0.90407,
|
||||
0.91327,
|
||||
0.92257,
|
||||
0.93194,
|
||||
0.94140,
|
||||
0.95095,
|
||||
0.96058,
|
||||
0.97030,
|
||||
0.98011,
|
||||
0.99001,
|
||||
1.00000
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // AUDIOTAPER_H
|
|
@ -6,6 +6,8 @@ transceiverAdjustments::transceiverAdjustments(QWidget *parent) :
|
|||
ui(new Ui::transceiverAdjustments)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
// request level updates
|
||||
|
||||
}
|
||||
|
||||
transceiverAdjustments::~transceiverAdjustments()
|
||||
|
|
|
@ -155,7 +155,8 @@ HEADERS += wfmain.h \
|
|||
rigctld.h \
|
||||
ulaw.h \
|
||||
ring/ring.h \
|
||||
transceiveradjustments.h
|
||||
transceiveradjustments.h \
|
||||
audiotaper.h
|
||||
|
||||
|
||||
FORMS += wfmain.ui \
|
||||
|
|
Ładowanie…
Reference in New Issue