XTRX: more messages

pull/269/head
f4exb 2018-12-30 00:44:37 +01:00
rodzic 0200b51a74
commit 7d9b6f200e
1 zmienionych plików z 24 dodań i 5 usunięć

Wyświetl plik

@ -14,6 +14,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <QDebug>
#include "devicextrxshared.h" #include "devicextrxshared.h"
MESSAGE_CLASS_DEFINITION(DeviceXTRXShared::MsgReportBuddyChange, Message) MESSAGE_CLASS_DEFINITION(DeviceXTRXShared::MsgReportBuddyChange, Message)
@ -46,19 +48,36 @@ double DeviceXTRXShared::set_samplerate(double rate,
} }
} }
double actualcgen;
double actualrx;
double actualtx;
int res = xtrx_set_samplerate(m_deviceParams->getDevice(), int res = xtrx_set_samplerate(m_deviceParams->getDevice(),
m_masterRate, m_masterRate,
m_inputRate, m_inputRate,
m_outputRate, m_outputRate,
0, 0,
0, &actualcgen,
0, &actualrx,
0); &actualtx);
if (res) { if (res)
//fprintf(stderr, "Unable to set samplerate, error=%d\n", res); {
qCritical("DeviceXTRXShared::set_samplerate: Unable to set %s samplerate, m_masterRate: %f, m_inputRate: %f, m_outputRate: %f, error=%d\n",
output ? "output" : "input", m_masterRate, m_inputRate, m_outputRate, res);
return 0; return 0;
} }
else
{
qDebug() << "DeviceXTRXShared::set_samplerate: sample rate set: "
<< "output: "<< output
<< "m_masterRate: " << m_masterRate
<< "m_inputRate: " << m_inputRate
<< "m_outputRate: " << m_outputRate
<< "actualcgen: " << actualcgen
<< "actualrx: " << actualrx
<< "actualtx: " << actualtx;
}
if (output) { if (output) {
return m_outputRate; return m_outputRate;