kopia lustrzana https://gitlab.com/eliggett/wfview
Fix linux compile
rodzic
83c494ecc1
commit
5c2d6e57b2
|
@ -92,8 +92,6 @@ bool audioHandler::init(audioSetup setupIn)
|
||||||
", uLaw" << setup.ulaw;
|
", uLaw" << setup.ulaw;
|
||||||
|
|
||||||
|
|
||||||
ringBuf = new wilt::Ring<audioPacket>(setup.latency + 1); // Should be customizable.
|
|
||||||
|
|
||||||
tempBuf.sent = 0;
|
tempBuf.sent = 0;
|
||||||
|
|
||||||
if(!setup.isinput)
|
if(!setup.isinput)
|
||||||
|
|
|
@ -45,7 +45,11 @@ typedef signed short MY_TYPE;
|
||||||
#endif
|
#endif
|
||||||
#include "audiotaper.h"
|
#include "audiotaper.h"
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
#include <eigen3/Eigen/Eigen>
|
||||||
|
#else
|
||||||
#include <Eigen/Eigen>
|
#include <Eigen/Eigen>
|
||||||
|
#endif
|
||||||
|
|
||||||
//#include <r8bbase.h>
|
//#include <r8bbase.h>
|
||||||
//#include <CDSPResampler.h>
|
//#include <CDSPResampler.h>
|
||||||
|
@ -165,7 +169,12 @@ private:
|
||||||
|
|
||||||
static inline qint64 getAudioSize(qint64 timeInMs, const QAudioFormat& format)
|
static inline qint64 getAudioSize(qint64 timeInMs, const QAudioFormat& format)
|
||||||
{
|
{
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
qint64 value = qint64(qCeil(format.channelCount() * (format.sampleSize() / 8) * format.sampleRate() / qreal(1000) * timeInMs));
|
||||||
|
#else
|
||||||
qint64 value = qint64(qCeil(format.channelCount() * (format.sampleSize() / 8) * format.sampleRate() / qreal(10000) * timeInMs));
|
qint64 value = qint64(qCeil(format.channelCount() * (format.sampleSize() / 8) * format.sampleRate() / qreal(10000) * timeInMs));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if (value % (format.channelCount() * (format.sampleSize() / 8)) != 0)
|
if (value % (format.channelCount() * (format.sampleSize() / 8)) != 0)
|
||||||
value += (format.channelCount() * (format.sampleSize() / 8) - value % (format.channelCount() * (format.sampleSize() / 8)));
|
value += (format.channelCount() * (format.sampleSize() / 8) - value % (format.channelCount() * (format.sampleSize() / 8)));
|
||||||
|
|
|
@ -206,7 +206,6 @@ HEADERS += wfmain.h \
|
||||||
audiotaper.h \
|
audiotaper.h \
|
||||||
selectradio.h \
|
selectradio.h \
|
||||||
tcpserver.h \
|
tcpserver.h \
|
||||||
audiocommon.h \
|
|
||||||
aboutbox.h
|
aboutbox.h
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue