Skip to content

Commit

Permalink
added tpeg-client
Browse files Browse the repository at this point in the history
  • Loading branch information
JvanKatwijk committed Mar 21, 2024
1 parent 760ab3f commit 1619930
Show file tree
Hide file tree
Showing 35 changed files with 1,058 additions and 58 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@
Recent changes
------------------------------------------------------------------------

The version Qt-DAB6.5Beta has undergone some more minor modifications
and is believed to be sufficiently stable to have the "Beta" removed.
In the current version - 6.X - has two (sub)systems for the sound handling are
included and can be selected. Next to the portaudio interface that
was the default, the sound interface provides by Qt is rewritten and
made into the default. A selection will be applied in the
next program invocation.
If the Qt-audio interface is selected, a volume slider is shown on
the mai widget.

------------------------------------------------------------------------
About Qt-DAB-6.5
Expand Down
Binary file added client.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion ofdm-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Jan van Katwijk ([email protected])
* Lazy Chair Computing
*
* This file is part of the Qt-DAB program
* This file is part of Qt-DAB
*
* Qt-DAB is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion ofdm-handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Jan van Katwijk ([email protected])
* Lazy Chair Computing
*
* This file is part of the Qt-DAB program
* This file is part of Qt-DAB
*
* Qt-DAB is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
6 changes: 3 additions & 3 deletions qt-dab-RC/qt-dab-RC.pro
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,10 @@ CONFIG += spyServer-8
#CONFIG += elad-device
#CONFIG += faad
CONFIG += fdk-aac
CONFIG += preCompiled
#CONFIG += tiiLib
#CONFIG += preCompiled
CONFIG += tiiLib
#very experimental, simple server for connecting to a tdc handler
#CONFIG += datastreamer
CONFIG += datastreamer
#to handle output of embedded an IP data stream, uncomment
#CONFIG += send_datagram

Expand Down
1 change: 1 addition & 0 deletions qt-dab-RC/radio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,7 @@ uint8_t localBuffer [length + 8];
return;
}
#ifdef DATA_STREAMER
fprintf (stderr, "%d\n", length);
dataBuffer. getDataFromBuffer (&localBuffer [8], length);
localBuffer [0] = 0xFF;
localBuffer [1] = 0x00;
Expand Down
3 changes: 2 additions & 1 deletion qt-devices/airspy-handler/airspy-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ int32_t i, j;
return 0;
}
//
const char *airspyHandler::getSerial() {
const
char *airspyHandler::getSerial () {
airspy_read_partid_serialno_t read_partid_serialno;
int result = my_airspy_board_partid_serialno_read (device,
&read_partid_serialno);
Expand Down
2 changes: 1 addition & 1 deletion qt-devices/hackrf-handler/hackrf-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ int res;
// The brave old getSamples. For the hackrf, we get
// size still in I/Q pairs
int32_t hackrfHandler::getSamples (std::complex<float> *V, int32_t size) {
std::complex<int8_t> temp [size];
auto *temp = dynVec (std::complex<float>, size);
int amount = _I_Buffer. getDataFromBuffer (temp, size);
for (int i = 0; i < amount; i ++)
V [i] = std::complex<float> (real (temp [i]) / 127.0f,
Expand Down
8 changes: 4 additions & 4 deletions qt-devices/lime-handler/lime-handler.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#
/*
* Copyright (C) 2014 .. 2019
* Copyright (C) 2014 .. 2023
* Jan van Katwijk ([email protected])
* Lazy Chair Computing
*
* This file is part of the Qt-DAB program
* This file is part of Qt-DAB
*
* Qt-DAB is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -239,7 +239,7 @@ int res;
return true;
}

void limeHandler::stopReader() {
void limeHandler::stopReader () {
close_xmlDump ();
if (!isRunning())
return;
Expand All @@ -254,7 +254,7 @@ void limeHandler::stopReader() {
}

int limeHandler::getSamples (std::complex<float> *V, int32_t size) {
std::complex<int16_t> temp [size];
auto *temp = dynVec (std::complex<int16_t>, size);

int amount = _I_Buffer. getDataFromBuffer (temp, size);
if (filtering) {
Expand Down
2 changes: 1 addition & 1 deletion qt-devices/rtlsdr-handler-linux/rtlsdr-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ QString theValue = "";
void rtlsdrHandler::processBuffer (uint8_t *buf, uint32_t len) {
float sumI = 0;
float sumQ = 0;
std::complex<float> tempBuf [len / 2];
auto *tempBuf = dynVec (std::complex<float>, len / 2);
static uint8_t dumpBuffer [2 * IQ_BUFSIZE];
static int iqTeller = 0;

Expand Down
2 changes: 1 addition & 1 deletion qt-devices/rtlsdr-handler-win-v4/rtlsdr-handler-v4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ void rtlsdrHandler_v4::set_ppmCorrection (int32_t ppm) {
}

int32_t rtlsdrHandler_v4::getSamples (std::complex<float> *V, int32_t size) {
std::complex<uint8_t> temp [size];
auto *temp = dynVec (std::complex<uint8_t>, size);
int amount;
static uint8_t dumpBuffer [4096];
static int iqTeller = 0;
Expand Down
4 changes: 2 additions & 2 deletions qt-devices/sdrplay-handler-v2/sdrplay-handler-v2.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
/*
* Copyright (C) 2014 .. 2017
* Copyright (C) 2014 .. 2021
* Jan van Katwijk ([email protected])
* Lazy Chair Computing
*
Expand Down Expand Up @@ -472,7 +472,7 @@ mir_sdr_ErrT err;
// size still in I/Q pairs
int32_t sdrplayHandler_v2::
getSamples (std::complex<float> *V, int32_t size) {
std::complex<int16_t> temp [size];
auto *temp = dynVec (std::complex<int16_t>, size);
int amount = _I_Buffer. getDataFromBuffer (temp, size);
for (int i = 0; i < amount; i ++)
V [i] = std::complex<float> (real (temp [i]) / (float) denominator,
Expand Down
4 changes: 0 additions & 4 deletions qt-devices/sdrplay-handler-v3/Rsp-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ sdrplay_api_ErrT err;

connect (this, SIGNAL (set_lnabounds_signal (int, int)),
parent, SLOT (set_lnabounds (int, int)));
connect (this, SIGNAL (set_deviceName_signal (const QString &)),
parent, SLOT (set_deviceName (const QString &)));
connect (this, SIGNAL (set_nrBits_signal (int)),
parent, SLOT (set_nrBits (int)));
connect (this, SIGNAL (show_lnaGain (int)),
parent, SLOT (show_lnaGain (int)));

Expand Down
2 changes: 0 additions & 2 deletions qt-devices/sdrplay-handler-v3/Rsp-device.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ virtual bool set_amPort (int amPort);
virtual bool set_biasT (bool biasT);
signals:
void set_lnabounds_signal (int, int);
void set_deviceName_signal (const QString &);
void set_nrBits_signal (int);
void show_lnaGain (int);
};

2 changes: 0 additions & 2 deletions qt-devices/sdrplay-handler-v3/Rsp1A-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ int RSP1A_Table [4] [11] = {
this -> nrBits = 12;
this -> lna_upperBound = lnaStates (freq);
set_lnabounds_signal (0, lna_upperBound);
set_deviceName_signal (deviceModel);
set_nrBits_signal (nrBits);
if (lnaState > lna_upperBound)
this -> lnaState = lna_upperBound;
set_lna (this -> lnaState);
Expand Down
2 changes: 0 additions & 2 deletions qt-devices/sdrplay-handler-v3/RspDuo-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@
this -> lna_upperBound = 10;
this -> deviceModel = "RSP-Duo";
this -> nrBits = 14;
set_deviceName_signal (deviceModel);
set_lnabounds_signal (0, lna_upperBound);
set_nrBits_signal (nrBits);
show_lnaGain (get_lnaGain (lnaState, freq));

if (biasT)
Expand Down
19 changes: 11 additions & 8 deletions qt-devices/sdrplay-handler-v3/RspDx-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
this -> nrBits = 14;
this -> lna_upperBound = lnaStates (freq);
set_lnabounds_signal (0, lna_upperBound);
set_deviceName_signal (deviceModel);
set_nrBits_signal (nrBits);
if (lnaState > lna_upperBound)
this -> lnaState = lna_upperBound - 1;
set_lna (this -> lnaState);
Expand All @@ -54,7 +52,10 @@
}

RspDx_handler::~RspDx_handler () {}

//
// while we know that the regular frequencies for DAB reception
// are in the 60 - 250 MHz, there is always a chance that someone
// experiments with his own defined band on a different frequency
static
int RSPdx_Table [6][29] = {
{19, 0, 3, 6, 9, 12, 15, 18, 24, 27, 30, 33, 36, 39, 42,
Expand All @@ -71,15 +72,17 @@ int RSPdx_Table [6][29] = {


int16_t RspDx_handler::bankFor_rspdx (int freq) {
if (freq < MHz (12))
return 1;
if (freq < Mhz (60))
return 0;
return 2;
if (freq < MHz (250))
return 1;
return 3;
if (freq < MHz (420))
return 2;
return 4;
if (freq < MHz (1000))
return 3;
return 4;
return 5;
return 6;
}

int RspDx_handler::lnaStates (int frequency) {
Expand Down
2 changes: 0 additions & 2 deletions qt-devices/sdrplay-handler-v3/RspI-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ int RSP1_Table [3][5] = {
this -> nrBits = 12;
this -> lna_upperBound = lnaStates (freq);
set_lnabounds_signal (0, lna_upperBound);
set_deviceName_signal (deviceModel);
set_nrBits_signal (nrBits);
if (lnaState > lna_upperBound)
this -> lnaState = lna_upperBound;
set_lna (this -> lnaState);
Expand Down
2 changes: 0 additions & 2 deletions qt-devices/sdrplay-handler-v3/RspII-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
this -> lna_upperBound = 9;
this -> deviceModel = "RSP-II";
this -> nrBits = 14;
set_deviceName_signal (deviceModel);
set_nrBits_signal (nrBits);
if (freq < Mhz (420))
lna_upperBound = 9;
else
Expand Down
34 changes: 22 additions & 12 deletions qt-devices/sdrplay-handler-v3/sdrplay-handler-v3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,10 @@ stopRequest r;
}
//
int32_t sdrplayHandler_v3::getSamples (std::complex<float> *V, int32_t size) {
std::complex<int16_t> temp [size];
int i;
auto *temp = dynVec (std::complex<int16_t>, size);

int amount = _I_Buffer. getDataFromBuffer (temp, size);
for (i = 0; i < amount; i ++)
for (int i = 0; i < amount; i ++)
V [i] = std::complex<float> (real (temp [i]) / (float) denominator,
imag (temp [i]) / (float) denominator);
if (dumping. load ())
Expand Down Expand Up @@ -250,19 +249,10 @@ QString sdrplayHandler_v3::deviceName () {
// Communication with that thread is synchronous!
//

void sdrplayHandler_v3::set_nrBits (int b) {
nrBits = b;
denominator = nrBits == 12 ? 2048 : 4096;
}

void sdrplayHandler_v3::set_lnabounds(int low, int high) {
lnaGainSetting -> setRange (low, high);
}

void sdrplayHandler_v3::set_deviceName (const QString& s) {
deviceLabel -> setText (s);
}

void sdrplayHandler_v3::set_serial (const QString& s) {
serialNumber -> setText (s);
}
Expand Down Expand Up @@ -629,6 +619,9 @@ uint32_t ndev;
switch (hwVersion) {
case SDRPLAY_RSPdx_ :
antennaValue = set_antennaSelect (SDRPLAY_RSPdx_);
nrBits = 14;
denominator = 4096;
deviceModel = "RSPDx";
theRsp = new RspDx_handler (this,
chosenDevice,
inputRate,
Expand All @@ -641,6 +634,9 @@ uint32_t ndev;
break;

case SDRPLAY_RSP1_ :
nrBits = 12;
denominator = 2048;
deviceModel = "RSP1";
theRsp = new Rsp1_handler (this,
chosenDevice,
inputRate,
Expand All @@ -653,6 +649,10 @@ uint32_t ndev;

case SDRPLAY_RSP1A_ :
case SDRPLAY_RSP1B_ :
nrBits = 14;
denominator = 4096;
deviceModel = hwVersion == SDRPLAY_RSP1A_ ? "RSO-1A" :
"RSP-1B";
theRsp = new Rsp1A_handler (this,
chosenDevice,
inputRate,
Expand All @@ -665,6 +665,9 @@ uint32_t ndev;

case SDRPLAY_RSP2_ :
antennaValue = set_antennaSelect (SDRPLAY_RSP2_);
nrBits = 14;
denominator = 4096;
deviceModel = "RSP-II";
theRsp = new RspII_handler (this,
chosenDevice,
inputRate,
Expand All @@ -678,6 +681,9 @@ uint32_t ndev;

case SDRPLAY_RSPduo_ :
antennaValue = set_antennaSelect (SDRPLAY_RSPdx_);
nrBits = 14;
denominator = 4096;
deviceModel = "RSP-Duo";
theRsp = new RspDuo_handler (this,
chosenDevice,
inputRate,
Expand All @@ -690,6 +696,9 @@ uint32_t ndev;
break;

default:
nrBits = 14;
denominator = 4096;
deviceModel = "UNKNOWN";
theRsp = new Rsp_device (this,
chosenDevice,
2112000,
Expand All @@ -704,6 +713,7 @@ uint32_t ndev;
goto closeAPI;
}

deviceLabel -> setText (deviceModel);
set_serial_signal (serial);
set_apiVersion_signal (apiVersion);

Expand Down
2 changes: 0 additions & 2 deletions qt-devices/sdrplay-handler-v3/sdrplay-handler-v3.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ private slots:
void report_overload_state (bool);
public slots:
void set_lnabounds (int, int);
void set_nrBits (int);
void set_deviceName (const QString &);
void set_serial (const QString &);
void set_apiVersion (float);
void show_tunerSelector (bool);
Expand Down
2 changes: 1 addition & 1 deletion qt-devices/spy-server-8/spyserver-client-8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Jan van Katwijk ([email protected])
* Lazy Chair Computing
*
* This file is part of the Qt-DAB program
* This file is part of Qt-DAB
*
* Qt-DAB is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Binary file modified res/pauze-slide-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/pauze-slide-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion server-thread/tcp-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Jan van Katwijk ([email protected])
* Lazy Chair Computing
*
* This file is part of the Qt-DAB program
* This file is part of Qt-DAB
*
* Qt-DAB is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
7 changes: 4 additions & 3 deletions src/backend/data/tdc-datahandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* Jan van Katwijk ([email protected])
* Lazy Chair Computing
*
* This file is part of the Qt-DAB
* This file is part of Qt-DAB
*
* Qt-DAB is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
Expand Down Expand Up @@ -151,13 +152,13 @@ int llengths = length - 4;
if (getBits (data, offset + 24, 8) == 0) { // no encryption
lOffset = offset + 4 * 8;
do {
// int compInd = getBits (data, lOffset, 8);
int compInd = getBits (data, lOffset, 8);
int flength = getBits (data, lOffset + 8, 16);
// int crc = getBits (data, lOffset + 3 * 8, 8);
#if 0
fprintf (stderr, "segment %d, length %d\n",
compInd, flength);
for (i = 5; i < flength; i ++)
for (int i = 5; i < flength; i ++)
fprintf (stderr, "%c", buffer [i]);
fprintf (stderr, "\n");
#endif
Expand Down
Loading

0 comments on commit 1619930

Please sign in to comment.