1
0
mirror of https://github.com/JvanKatwijk/qt-dab.git synced 2025-10-06 00:02:40 +02:00

almost there

This commit is contained in:
Jan
2024-12-20 15:58:42 +01:00
parent 9f925796f9
commit 783049cdf1
13 changed files with 107 additions and 112 deletions

View File

@@ -27,33 +27,38 @@ scopes and displays.
Unfortunately, AppImages require "old" library versions to be used.
The AppImage is built on Ubuntu 20 (which is indeed rather old), but
for building AppImages, Ubuntu 22 is "too new".
So, while Qt-DAB is still compiled on the old U20 system, Ubuntu 20 does
not support Qt6 (unless one compiles the libraries etc from source),
so for the AppImage Qt5 is still needed.
While it is possible to install a Qt 6 version on U20, and to build
a qet library for it, the appimage builder does not build the right appImage.
So, for now, we need a sourcetree that can be compiled with Qt5 as well as
So, while Qt-DAB is still compiled on the old U20 system,
for the AppImage Qt5 is still needed.
Another issue - still to be solved = is that there are still problems
with the Qt Audio from Qt6 on Windows, so the Windows versions will
be precompiled using Qt5 as well.
We need a sourcetree that can be compiled with Qt5 as well as
with Qt6, and indeed, the current sourcetree can be compiled with either.
Anyway, while preparing the sources for Qt6, some more changes were made, so
the version number was increased and is 6.9.
Apart from the modifications required for Qt6 - mosty the Qt_audio soundhandler that is still troublesome for windows using Qt6 - some more modifications were made, most of them on my "todo" list. Some of them are clearly visible, others are "under the hood"
* the spectrum widget is slightly enlarged, to get a better view on the different "scopes". Additionally, the NULL scope has a marker, telling here the software "thinks" the first datablock in the input samplestream starts (ideally this is sample 504). Furthermore, as an experiment, the largest peaks in the correlation scope are matched to TII data.
* the spectrum widget is slightly enlarged, to get a better view on the different "scopes". Additionally, the NULL scope has a marker, telling here the software "thinks" the first datablock in the input samplestream starts (ideally this is sample 504). Furthermore, on the correlation scope, the software will also show a (rough) estimate of which peak in the correlation matches with which
mainId subId combination. The scope widget jas a button to select or de-select that feature.
* the audio strength meter and the "mot" indicator are placed on the main widget, which seems to make more sense
* the Spectrum widget has a "BER" indicator for the FIC segments, this indicator shows the ratio between bits that are modified in the Viterbi decoder, vs the total amount of bits. As such this indicator gives a good idea on the real quality of the decoded samples, the picture below show a value of 0.015, indicating that (on average) 15 input bits per 1000 needed correction when decoding the FIC data.
* the Spectrum widget has a "BER" (Bit Error Rate) indicator for the FIC segments, this indicator shows the ratio between bits that are modified in the Viterbi decoder, vs the total amount of bits. As such this indicator gives a good idea on the real quality of the decoded samples, the picture below show a value of 0.015, indicating that (on average) 15 input bits per 1000 needed correction when decoding the FIC data.
* the Quality indicator on the spectrum widget shows now the Modulation quality as defined in ETSI TR 101 290 V1.3.1.
* having the "BER" as measure for the quality of the decoding, some more experiments with decoders (i.e. the mapping from the result of the DPSK in the carriers in the FFT bins to bits). Three of them are based on work of others (see the tooltip).
* There were questions why not to restrict the visible services in the list to audioservices only. The configuration and control widget has a selector for that.
* There were questions why not to restrict the visible services in the list to audioservices only. The configuration and control widget has a selector for that. (There is a small problem that is still to be addressed: skipping through the list, with the "+" and "-" buttons does not exclude the data services).
* Since there was an additional selector on the configuration and control widget, the layout of the widget changed a little.
* Some selectors were removed from the configuration and control widget.
* the dxDisplay now shows more data on the transmitters that are identified in the current channel.
* the dxDisplay now shows more data on the transmitters that are identified in the current channel. The "etsi" label tells whether ot not the encoding of the TII data is done correct or not (some older transmitters use an incorrect encoding scheme that makes it more complex to estimate the delay in the arrival of the data)
![6.9](/res/read_me/new-dxDisplay.png?raw=true)

View File

@@ -93,7 +93,7 @@ typedef struct {
int subId;
float phase;
bool norm;
float strength;
float strength;
QString Name;
} corrElement;

View File

@@ -49,8 +49,8 @@ public:
private:
RingBuffer<char> *Buffer;
int totalBytes;
int missedBytes;
int totalBytes_l;
int missedBytes_l;
std::atomic<bool> running;
};

View File

@@ -114,12 +114,23 @@ int sliderValue;
"channelSlider", 20);
channelSlider -> setValue (sliderValue);
setMarkers = value_i (dabSettings_p,
DISPLAY_WIDGET_SETTINGS,
"setMarkers", 0) != 0;
show_marksButton -> setStyleSheet ("color:cyan");
if (setMarkers)
show_marksButton -> setText ("no markers");
else
show_marksButton -> setText ("set markers");
connect (tabWidget, SIGNAL (currentChanged (int)),
this, SLOT (switch_tab (int)));
connect (IQDisplay_p, SIGNAL (rightMouseClick ()),
this, SLOT (rightMouseClick ()));
connect (ncpScope_checkBox, SIGNAL (stateChanged (int)),
this, SLOT (handle_ncpScope_checkBox (int)));
connect (show_marksButton, &QPushButton::clicked,
this, &displayWidget::handle_marksButton);
}
displayWidget::~displayWidget () {
@@ -226,7 +237,7 @@ std::vector<corrElement> showData;
t. strength = theTransm. theTransmitter. strength;
t. norm = theTransm. theTransmitter. norm;
showData. push_back (t);
showData. push_back (t);
}
float max = 0;
int maxInd = -1;
@@ -245,8 +256,7 @@ std::vector<corrElement> showData;
" " + QString::number (subId) + ") " + name;
correlationsVector -> setText (ss);
}
if (value_i (dabSettings_p, CONFIG_HANDLER, "show_lines", 0) == 0)
if (!setMarkers)
showData. resize (0);
correlationScope_p -> display (v, T_g,
correlationLength -> value (),
@@ -552,3 +562,12 @@ void displayWidget::setSilent () {
devScope_p -> clean ();
}
void displayWidget::handle_marksButton () {
setMarkers = !setMarkers;
if (setMarkers)
show_marksButton -> setText ("no markers");
else
show_marksButton -> setText ("set markers");
store (dabSettings_p, DISPLAY_WIDGET_SETTINGS,
"setMarkers", setMarkers ? 1 : 0);
}

View File

@@ -105,10 +105,12 @@ private:
int currentTab;
int ncpScope;
bool setMarkers;
private slots:
void switch_tab (int);
void rightMouseClick ();
void handle_ncpScope_checkBox (int);
void handle_marksButton ();
signals:
void mouseClick ();
void frameClosed ();

View File

@@ -146,6 +146,10 @@ void IQDisplay::displayIQ (const std::vector<Complex> &z, float scale) {
setPoint (x, y, 1000);
Points. push_back (std::complex<int32_t> (xx, yy));
setPoint (xx, yy, 1000);
Points. push_back (std::complex<int32_t> (xx, y));
setPoint (xx, y, 1000);
Points. push_back (std::complex<int32_t> (x, yy));
setPoint (x, yy, 1000);
}
memcpy (plotDataDrawBuffer. data (),

View File

@@ -36,7 +36,7 @@
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The tabwidget here contains the tabs for the different scopes, supported by this Qt-DAB implementation&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="currentIndex">
<number>4</number>
<number>1</number>
</property>
<widget class="QWidget" name="spectr">
<attribute name="title">
@@ -93,6 +93,16 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="show_marksButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The encoding of the TII data (if any) can be used to get an estimate of the delay of the signal. This estimate (not always very accurate) then can be used to label the peaks in the correlation scope (these peaks can also be used to compute a delay in the arrival of the signal of a particular transmitter) label the peaks in the correlation scope with the TII numbers.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>show marks</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="correlationsVector">
<property name="toolTip">

View File

@@ -1318,7 +1318,7 @@ void RadioInterface::updateTimeDisplay() {
// that it rings when there is no processor running
if (theOFDMHandler == nullptr)
return;
if (!techWindow_p -> isHidden ()) {
if (!techWindow_p -> isHidden () && soundOut_p -> hasMissed ()) {
int totalSamples = 0;
int totalMissed = 0;
soundOut_p -> samplesMissed (totalSamples, totalMissed);

View File

@@ -37,26 +37,28 @@
myWidget -> resize (220, 400);
myWidget -> setWidgetResizable(true);
tableWidget = new QTableWidget (0, 12);
tableWidget = new QTableWidget (0, 13);
tableWidget -> setColumnWidth (0, 30);
tableWidget -> setColumnWidth (1, 70);
tableWidget -> setColumnWidth (2, 70);
tableWidget -> setColumnWidth (3, 100);
tableWidget -> setColumnWidth (3, 50);
tableWidget -> setColumnWidth (4, 100);
tableWidget -> setColumnWidth (5, 200);
tableWidget -> setColumnWidth (6, 70);
tableWidget -> setColumnWidth (5, 100);
tableWidget -> setColumnWidth (6, 200);
tableWidget -> setColumnWidth (7, 70);
tableWidget -> setColumnWidth (8, 70);
tableWidget -> setColumnWidth (9, 70);
tableWidget -> setColumnWidth (10, 70);
tableWidget -> setColumnWidth (11, 70);
tableWidget -> setColumnWidth (12, 70);
QHeaderView *headerView = tableWidget -> horizontalHeader ();
headerView -> setSectionResizeMode (1, QHeaderView::Stretch);
// headerView -> resizeSection (0, 50);
tableWidget -> setHorizontalHeaderLabels (
QStringList () << tr ("x") << tr ("mainId") <<
tr ("subId") << tr ("channel") <<tr ("ensemble") <<
tr ("transmiiter") << tr ("dist") <<
tr ("subId") << "etsi" <<
tr ("channel") <<tr ("ensemble") <<
tr ("transmitter") << tr ("dist") <<
tr ("azimuth") << tr ("power") <<
tr ("alt") << tr ("height") << tr ("direction"));
@@ -124,6 +126,7 @@ int16_t row = tableWidget -> rowCount ();
const QString &transmitterName = theTransmitter -> transmitterName;
int mainId = theTransmitter -> mainId;
int subId = theTransmitter -> subId;
bool etsi = theTransmitter -> norm;
float distance = theTransmitter -> distance;
float azimuth = theTransmitter -> azimuth;
// float strength = theTransmitter -> strength;
@@ -133,67 +136,72 @@ int16_t row = tableWidget -> rowCount ();
const QString &dir = theTransmitter -> direction;
bool b = isStrongest;
tableWidget -> insertRow (row);
tableWidget -> insertRow (row); // the mark
QTableWidgetItem *item0 = new QTableWidgetItem;
item0 -> setTextAlignment (Qt::AlignRight |Qt::AlignVCenter);
tableWidget -> setItem (row, 0, item0);
QTableWidgetItem *item1 = new QTableWidgetItem;
QTableWidgetItem *item1 = new QTableWidgetItem; // mainId
item1 -> setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
tableWidget -> setItem (row, 1, item1);
QTableWidgetItem *item2 = new QTableWidgetItem;
QTableWidgetItem *item2 = new QTableWidgetItem; // subId
item2 -> setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
tableWidget -> setItem (row, 2, item2);
QTableWidgetItem *item3 = new QTableWidgetItem;
QTableWidgetItem *item3 = new QTableWidgetItem; // etsi
item3 -> setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
tableWidget -> setItem (row, 3, item3);
QTableWidgetItem *item4 = new QTableWidgetItem;
QTableWidgetItem *item4 = new QTableWidgetItem; // channel
item4 -> setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
tableWidget -> setItem (row, 4, item4);
QTableWidgetItem *item5 = new QTableWidgetItem;
QTableWidgetItem *item5 = new QTableWidgetItem; // ensemble
item5 -> setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
tableWidget -> setItem (row, 5, item5);
QTableWidgetItem *item6 = new QTableWidgetItem;
QTableWidgetItem *item6 = new QTableWidgetItem; // transmitter
item6 -> setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
tableWidget -> setItem (row, 6, item6);
QTableWidgetItem *item7 = new QTableWidgetItem;
QTableWidgetItem *item7 = new QTableWidgetItem; // dist
item7 -> setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
tableWidget -> setItem (row, 7, item7);
QTableWidgetItem *item8 = new QTableWidgetItem;
QTableWidgetItem *item8 = new QTableWidgetItem; // azimuth
item8 -> setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
tableWidget -> setItem (row, 8, item8);
QTableWidgetItem *item9 = new QTableWidgetItem;
QTableWidgetItem *item9 = new QTableWidgetItem; // power
item9 -> setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
tableWidget -> setItem (row, 9, item9);
QTableWidgetItem *item10 = new QTableWidgetItem;
QTableWidgetItem *item10 = new QTableWidgetItem; // alt
item10 -> setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
tableWidget -> setItem (row, 10, item10);
QTableWidgetItem *item11 = new QTableWidgetItem;
QTableWidgetItem *item11 = new QTableWidgetItem; // height
item11 -> setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
tableWidget -> setItem (row, 11, item11);
QTableWidgetItem *item12 = new QTableWidgetItem; // direction
item12 -> setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
tableWidget -> setItem (row, 12, item12);
tableWidget -> setCurrentItem (item0);
tableWidget -> item (row, 1) -> setText (QString::number (mainId));
tableWidget -> item (row, 2) -> setText (QString::number (subId));
tableWidget -> item (row, 3) -> setText (channel);
tableWidget -> item (row, 4) -> setText (ensemble);
tableWidget -> item (row, 5) -> setText (transmitterName);
tableWidget -> item (row, 6) -> setText (QString::number (distance, 'f', 1) + " km");
tableWidget -> item (row, 7) -> setText (QString::number (azimuth, 'f', 1) + QString::fromLatin1 (" \xb0 "));
tableWidget -> item (row, 8) -> setText (QString::number (power, 'f', 1) + " KW ");
tableWidget -> item (row, 9) -> setText (QString::number (altitude) + " m");
tableWidget -> item (row, 10) -> setText (QString::number (height) + " m");
tableWidget -> item (row, 11) -> setText (dir);
tableWidget -> item (row, 3) -> setText (etsi ? "*" : " ");
tableWidget -> item (row, 4) -> setText (channel);
tableWidget -> item (row, 5) -> setText (ensemble);
tableWidget -> item (row, 6) -> setText (transmitterName);
tableWidget -> item (row, 7) -> setText (QString::number (distance, 'f', 1) + " km");
tableWidget -> item (row, 8) -> setText (QString::number (azimuth, 'f', 1) + QString::fromLatin1 (" \xb0 "));
tableWidget -> item (row, 9) -> setText (QString::number (power, 'f', 1) + " KW ");
tableWidget -> item (row, 10) -> setText (QString::number (altitude) + " m");
tableWidget -> item (row, 11) -> setText (QString::number (height) + " m");
tableWidget -> item (row, 12) -> setText (dir);
tableWidget -> item (row, 0) -> setText (b ? "***" : "");
if (b)
theDial -> setValue (azimuth);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 834 KiB

After

Width:  |  Height:  |  Size: 793 KiB

View File

@@ -20,7 +20,9 @@
* along with Qt-DAB; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//
// This implementation of the TII decoder is taken from
// Rolf Zerr's (aka old-dab) implemementation as done in DABstar.
#include "tii-detector.h"
#define NUM_GROUPS 8
#define GROUPSIZE 24
@@ -101,57 +103,6 @@ static const uint8_t table[] = {
0xf0 // 1 1 1 1 0 0 0 0 69
};
static const int8_t Reftable[] = {
2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1,
0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2,
-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1,
2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1,
0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2,
-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1,
2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1,
0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2,
-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1,
2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1,
0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2,
-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1,
2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1,
0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2,
-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1,
2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1,
0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2,
-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1,
2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1,
0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2,
1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1,
2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1,
0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2,
1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1,
2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1,
0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2,
1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1,
2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1,
0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2,
1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1,
2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1,
0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2,
1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1,
2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0,
-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1,
0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2,
1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1
};
static bool collisions = false;
static int selected_subId = 99;
@@ -267,8 +218,6 @@ Complex buffer [carriers / 2];
for (int j = 0; j < 4; j++) {
Complex x = buffer [i + j * 192];
etsiVec [i] += x;
// nonetsiVec [i] += std::polar ((DABFLOAT)abs (x),
// (DABFLOAT)(arg (x)-(float)Reftable[i+j*192]*M_PI_2));
nonetsiVec [i] += x * conj (table_2 [i + j * 192]);
}
}
@@ -345,7 +294,6 @@ float threshold = pow (10, (float)threshold_db / 10); // threshold above noise
bool norm = false;
Complex *cmplx_ptr = nullptr;;
float *float_ptr = nullptr;
// The number of times the limit is reached in the group is counted
for (int i = 0; i < NUM_GROUPS; i++) {
if (etsi_floatTable [subId + i * GROUPSIZE] >
@@ -453,7 +401,8 @@ float threshold = pow (10, (float)threshold_db / 10); // threshold above noise
}
}
// fprintf(stderr, "max =%.0f, noise = %.1fdB\n", max, 10 * log10(noise/max));
if (max > 4000000)
if (max > 4000)
// if (max > 4000000)
for (int i = 0; i < carriers / 2; i++)
decodedBuffer [i] *= 0.9;
resetBuffer();

View File

@@ -36,8 +36,8 @@ Qt_AudioDevice::Qt_AudioDevice (RadioInterface *mr,
: QIODevice (parent),
Buffer (Buffer_i) {
totalBytes = 0;
missedBytes = 0;
totalBytes_l = 0;
missedBytes_l = 0;
start ();
}
@@ -52,13 +52,11 @@ void Qt_AudioDevice::stop () {
Buffer -> FlushRingBuffer();
close ();
}
void Qt_AudioDevice::samplesMissed (int &total, int &too_short) {
total = totalBytes / (2 * sizeof (float));
too_short = missedBytes / (2 * sizeof (float));
totalBytes = 0;
missedBytes = 0;
total = totalBytes_l / (2 * sizeof (float));
too_short = missedBytes_l / (2 * sizeof (float));
totalBytes_l = 0;
missedBytes_l = 0;
}
//
@@ -75,8 +73,8 @@ qint64 amount = 0;
buffer [i] = 0;
}
totalBytes += amount;
missedBytes += maxSize - amount;
totalBytes_l += amount;
missedBytes_l += maxSize - amount;
return maxSize;
}
//