Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TPF
jacktrip
Commits
0185410d
Commit
0185410d
authored
Apr 07, 2008
by
jcaceres
Browse files
add qt3 branch
parent
8a5575f0
Changes
51
Hide whitespace changes
Inline
Side-by-side
jacktrip/
.tm_project.cache
→
.tm_project.cache
View file @
0185410d
File moved
jacktrip/
COPYING.GPL.txt
→
COPYING.GPL.txt
View file @
0185410d
File moved
jacktrip/
README
→
README
View file @
0185410d
File moved
jacktrip/
TODO.txt
→
TODO.txt
View file @
0185410d
File moved
jacktrip/
installRun-FC4.txt
→
installRun-FC4.txt
View file @
0185410d
File moved
jacktrip/
installRun-FC5-updatedJuanPa.txt
→
installRun-FC5-updatedJuanPa.txt
View file @
0185410d
File moved
jacktrip/
installRun-FC5.txt
→
installRun-FC5.txt
View file @
0185410d
File moved
jacktrip/src/portinglog.txt
deleted
100644 → 0
View file @
8a5575f0
Log for qt3to4 on Thu Mar 27 14:52:37 2008. Number of log entries: 44
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/audio_input.cpp
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/audio_output.cpp
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/audioDevice.cpp
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/audioInfo.cpp
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/circularbuffer.cpp
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/JackClient.cpp at line 14 column 21: qtextstream.h -> q3textstream.h
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/main.cpp at line 38 column 21: qtextstream.h -> q3textstream.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/MainDialog.cpp
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/networkInfo.cpp
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/stream.cpp
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/StreamBD.cpp
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/udp_input.cpp at line 19 column 25: QSocketDevice -> Q3SocketDevice
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/udp_input.cpp at line 19 column 40: QSocketDevice -> Q3SocketDevice
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/udp_output.cpp at line 17 column 25: QSocketDevice -> Q3SocketDevice
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/udp_output.cpp at line 17 column 40: QSocketDevice -> Q3SocketDevice
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/audio_input.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/audio_output.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/audioConsts.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/audioDevice.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/audioInfo.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/circularbuffer.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/Documentation.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/input_plugin.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/JackClient.h
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/MainDialog.h at line 10 column 21: qptrlist.h -> q3ptrlist.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/networkInfo.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/output_plugin.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/plugin.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/process_plugin.h
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/stk_process.h
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/stream.h at line 11 column 23: qptrvector.h -> q3ptrvector.h
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/stream.h at line 22 column 14: QPtrVector -> Q3PtrVector
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/stream.h at line 24 column 14: QPtrVector -> Q3PtrVector
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/stream.h at line 26 column 14: QPtrVector -> Q3PtrVector
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/stream.h at line 28 column 13: QPtrVector -> Q3PtrVector
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/stream.h at line 30 column 14: QPtrVector -> Q3PtrVector
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/StreamBD.h
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/ThreadCommEvent.h: Added the following include directives:
#include <QEvent> #include <QCustomEvent>
No changes made to file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/udp.h
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/udp_input.h at line 8 column 23: qsocketdevice.h -> q3socketdevice.h
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/udp_input.h at line 20 column 14: QSocketDevice -> Q3SocketDevice
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/udp_output.h at line 4 column 23: qsocketdevice.h -> q3socketdevice.h
In file /user/j/jcaceres/svn-jacktrip/trunk/jacktrip/src/udp_output.h at line 19 column 14: QSocketDevice -> Q3SocketDevice
In file jacktrip.pro: Added entry QT += network qt3support
jacktrip/src/udp_input.cpp
deleted
100644 → 0
View file @
8a5575f0
#include
"udp_input.h"
#include
"networkInfo.h"
#include
"stream.h"
#include
"unistd.h"
#include
<stdlib.h>
#include
<stdio.h>
#include
<iostream.h>
#include
<QHostInfo>
//***JPC Port to qt4*****************
extern
QString
*
IPv4Addr
(
char
*
namebuf
);
extern
int
set_fifo_priority
(
bool
half
);
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
UDPInput
::
UDPInput
(
NetworkInfoT
netInfo
,
AudioInfoT
audInfo
)
:
InputPlugin
(
"UDP Input"
),
netInfo
(
netInfo
),
audInfo
(
audInfo
)
{
bpp
=
netInfo
->
getDataBytesPerPacket
();
cout
<<
"bpp = "
<<
bpp
<<
endl
;
char
localhostbuf
[
100
];
has_peer
=
false
;
_rcvr
=
NULL
;
//sock = new Q3SocketDevice (Q3SocketDevice::Datagram); // for an unreliable UDP socket//***JPC Port to qt4*****************
//sock->setAddressReusable(true);//***JPC Port to qt4*****************
sock
=
new
QUdpSocket
;
//***JPC Port to qt4*****************
peerAddress
=
new
QHostAddress
;
if
(
gethostname
(
localhostbuf
,
99
))
{
perror
(
"gethostname"
);
exit
();
}
cout
<<
"Local Host Name: "
<<
QString
(
QHostInfo
::
localHostName
()).
latin1
()
<<
endl
;
//***JPC Port to qt4*****************
//cout << "Rx buff = " << sock->receiveBufferSize () << endl;//***JPC Port to qt4*****************
QHostAddress
*
ha
=
new
QHostAddress
();
//***JPC Port to qt4*****************
QString
*
s
=
IPv4Addr
(
localhostbuf
);
// dotted integer from name//***JPC Port to qt4*****************
ha
->
setAddress
(
*
s
);
//***JPC Port to qt4*****************
cout
<<
"INPUT PORT: "
<<
netInfo
->
getInPort
()
<<
endl
;
//if (!(sock->bind (*ha, netInfo->getInPort ())))//***JPC Port to qt4*****************
if
(
!
(
sock
->
bind
(
*
ha
,
netInfo
->
getInPort
(),
QUdpSocket
::
ShareAddress
)
)
)
//***JPC Port to qt4*****************
{
perror
(
"bind
\n
"
);
exit
();
}
if
(
!
sock
->
isValid
())
{
cout
<<
"socket creation error "
<<
endl
;
}
packetIndex
=
0
;
wholeSize
=
sizeof
(
nsHeader
)
+
(
netInfo
->
getChunksPerPacket
()
*
bpp
)
+
1
;
packetData
=
new
char
[
wholeSize
];
memset
(
packetData
,
0
,
wholeSize
);
numRedundantBuffers
=
netInfo
->
getChunksPerPacket
()
-
1
;
maxPacketIndex
=
netInfo
->
getMaxSeq
();
cout
<<
endl
<<
"UDPInput binding to "
<<
localhostbuf
<<
" port "
<<
netInfo
->
getInPort
()
<<
endl
;
}
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
UDPInput
::~
UDPInput
()
{
delete
sock
;
delete
peerAddress
;
}
//-------------------------------------------------------------------------------
/*! cout that the UDPInput thread has started
*
*/
//-------------------------------------------------------------------------------
void
UDPInput
::
Initial
()
{
cout
<<
"Started UDPInput thread"
<<
endl
;
}
//-------------------------------------------------------------------------------
/* Receive a buffer from the UDPSocket.
* @param buf is the location at which to store the buffer.
* @param le is the size of the buffer to be received.
*/
//-------------------------------------------------------------------------------
int
UDPInput
::
rcv
(
char
*
buf
)
{
//int rv = sock->readBlock (packetData, wholeSize);//***JPC Port to qt4*****************
//cout << "###############################################" << endl;
int
rv
=
sock
->
readDatagram
(
packetData
,
wholeSize
,
peerAddress
);
//***JPC Port to qt4*****************
//cout << "###############################################" << rv << endl;
//cout << "***Packet Size***: " << rv << endl;//***JPC Port to qt4*****************
char
*
datapart
;
packetIndex
=
((
nsHeader
*
)
packetData
)
->
i_seq
;
datapart
=
packetData
+
sizeof
(
nsHeader
)
+
((
packetIndex
%
((
nsHeader
*
)
packetData
)
->
i_copies
)
*
bpp
);
memcpy
(
buf
,
datapart
,
bpp
);
/*
((nsHeader *) packetData)->i_type = 0;
((nsHeader *) packetData)->i_nframes = 1;
((nsHeader *) packetData)->i_nchans = 2;
((nsHeader *) packetData)->i_copies = n;
((nsHeader *) packetData)->i_cksum = 4;
((nsHeader *) packetData)->i_seq = packetIndex;
((nsHeader *) packetData)->i_rtnseq = 6;
((nsHeader *) packetData)->i_rtt = 7;
*/
if
(
rv
<
0
)
{
cerr
<<
"bad read..."
<<
endl
;
}
return
packetIndex
;
}
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
int
UDPInput
::
rcvz1
(
char
*
bufz1
,
int
z
)
{
char
*
datapart
;
packetIndex
=
((
nsHeader
*
)
packetData
)
->
i_seq
-
z
;
if
(
packetIndex
<
0
)
{
packetIndex
+=
maxPacketIndex
;
// cout << "backed below 0 (a good thing)" << endl;
}
datapart
=
packetData
+
sizeof
(
nsHeader
)
+
((
packetIndex
%
((
nsHeader
*
)
packetData
)
->
i_copies
)
*
bpp
);
memcpy
(
bufz1
,
datapart
,
bpp
);
return
packetIndex
;
}
//-------------------------------------------------------------------------------
/* The main run loop. Calls waitForConnection(). Once connected,
* while running is true, it checks if the socket has a new buffer.
* If it does, it writes the buffer to the stream.
*/
//-------------------------------------------------------------------------------
void
UDPInput
::
stop
()
{
_running
=
false
;
}
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
void
UDPInput
::
run
()
{
_running
=
true
;
int
seq
;
char
*
buf
=
(
char
*
)
new
char
[
bpp
];
char
*
bufz1
=
(
char
*
)
new
char
[
bpp
];
cout
<<
"UDP Input waiting for peer."
<<
endl
;
while
(
has_peer
==
false
)
{
//cout << "pendingDatagramSize!!!!!!" << sock->pendingDatagramSize () << endl;//***JPC Port to qt4*****************
//cout << "hasPendingDatagrams!!!!!!" << sock->hasPendingDatagrams () << endl;//***JPC Port to qt4*****************
//}
//if (sock->bytesAvailable () >= wholeSize) // not an error//***JPC Port to qt4*****************
if
(
sock
->
pendingDatagramSize
()
>=
wholeSize
)
// not an error//***JPC Port to qt4*****************
{
//cout <<"wholeSize = " << wholeSize << " " <<sock->bytesAvailable ()<< endl;// not an error//***JPC Port to qt4*****************
cout
<<
"wholeSize = "
<<
wholeSize
<<
" "
<<
sock
->
pendingDatagramSize
()
<<
endl
;
// not an error//***JPC Port to qt4*****************
//sock->readBlock (buf, wholeSize);
this
->
rcv
(
buf
);
has_peer
=
true
;
// really rcvd something
cout
<<
"UDP Input Connected!"
<<
endl
;
}
else
msleep
(
100
);
}
msleep
(
10
);
cout
<<
"Started UDP Input Run"
<<
endl
;
set_fifo_priority
(
false
);
bool
timeout
;
int
ret
;
unsigned
long
now
=
0
;
unsigned
long
lastTickTime
=
usecTime
();
int
ctr
=
0
;
double
max
=
0.0
;
int
gap
;
double
gapAvg
=
0.0
;
while
(
_running
)
{
// If timeout is non-null and no error occurred
// (i.e. it does not return -1): this function sets *timeout to TRUE,
// if the reason for returning was that the timeout was reached;
// otherwise it sets *timeout to FALSE. This is useful to find out
// if the peer closed the connection.
//ret = (sock->waitForMore (30, &timeout));//***JPC Port to qt4*****************
timeout
=
sock
->
waitForReadyRead
(
30
);
//***JPC Port to qt4*****************
//if (ret == -1)//***JPC Port to qt4*****************
//cerr << "udp in sock problems..." << endl;//***JPC Port to qt4*****************
//else if (timeout)//***JPC Port to qt4*****************
if
(
!
timeout
)
//***JPC Port to qt4*****************
cerr
<<
"udp in waited too long (more than 30ms)..."
<<
endl
;
else
{
seq
=
this
->
rcv
(
buf
);
if
(
stream
==
NULL
)
{
cerr
<<
"ERROR: UDPInput has no sream to write to!"
<<
endl
;
}
int
z
=
numRedundantBuffers
;
while
(
z
)
{
int
zseq
=
this
->
rcvz1
(
bufz1
,
z
);
stream
->
writeRedundant
(
bufz1
,
key
,
z
,
zseq
);
z
--
;
}
gap
=
stream
->
writeRedundant
(
buf
,
key
,
0
,
seq
);
// cout << "writePosition " << gap <<"\t\t";
/*
now = usecTime ();
ctr++;
if (ctr == 40)
{
ctr = 0;
gapAvg = gapAvg / 40.0;
// plotVal (gapAvg);
// plotVal (max);
gapAvg = 0.0;
max = 0.0;
} else {
double xxx = (((double)now - (double)lastTickTime)/1000000.0);
// if (xxx>max) max = xxx;
max += xxx;
gapAvg += ((double)gap);
}
lastTickTime = now;
*/
// stream->write (buf, key);
}
}
cout
<<
"UDP Input stop"
<<
endl
;
}
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
void
UDPInput
::
plotVal
(
double
v
)
{
/*
if(_rcvr!=NULL)
{
ThreadCommEvent *e = new ThreadCommEvent (-1.0, v, 0.0);
QApplication::postEvent (_rcvr, e); // to app event loop
}
*/
}
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
bool
UDPInput
::
hasPeer
()
{
return
has_peer
;
}
//-------------------------------------------------------------------------------
/* Returns the address of the peer to which the socket is connected
*
*/
//-------------------------------------------------------------------------------
QHostAddress
UDPInput
::
peer
()
{
cout
<<
"#################RETURNING PEEEEERRRRRRRRR#############################"
<<
endl
;
sock
->
readDatagram
(
packetData
,
wholeSize
,
peerAddress
);
//***JPC Port to qt4*****************
cout
<<
(
*
peerAddress
).
toString
().
latin1
()
<<
endl
;
//cout << sock->state() << endl;
//cout << sock->peerName().latin1() << endl;
//cout << "RETURNING 23232323**************** *********" << endl;
//return sock->peerAddress ();
return
(
*
peerAddress
);
}
jacktrip/src/udp_input.h
deleted
100644 → 0
View file @
8a5575f0
#ifndef _UDP_INPUT_H
#define _UDP_INPUT_H
#include
"input_plugin.h"
#include
"udp.h"
#include
"networkInfo.h"
#include
"audioInfo.h"
//#include <q3socketdevice.h> //***JPC Port to qt4*****************
#include
<QUdpSocket>
//***JPC Port to qt4*****************
#include
<qobject.h>
/**
* @brief Sends buffers received from a UDP input stream into
* a Stream.
*/
class
UDPInput
:
public
InputPlugin
{
private:
NetworkInfoT
netInfo
;
AudioInfoT
audInfo
;
//Q3SocketDevice *sock;//***JPC Port to qt4*****************
QUdpSocket
*
sock
;
//***JPC Port to qt4*****************
bool
_running
;
bool
has_peer
;
int
packetIndex
;
//used for netdebug, checking order of incoming packets
int
maxPacketIndex
;
char
*
packetData
;
void
setPacketSize
(
int
size
);
QHostAddress
*
peerAddress
;
//***JPC Port to qt4*****************
public:
UDPInput
(
NetworkInfoT
netInfo
,
AudioInfoT
audInfo
);
virtual
~
UDPInput
();
int
rcvz1
(
char
*
bufz1
,
int
z
);
int
rcv
(
char
*
buf
);
bool
hasPeer
();
QHostAddress
peer
();
void
Initial
();
void
run
();
void
stop
();
int
bpp
;
int
wholeSize
;
int
numRedundantBuffers
;
void
plotVal
(
double
v
);
};
#endif
jacktrip/
qtk.prj
→
qtk.prj
View file @
0185410d
File moved
jacktrip/
qtk.pws
→
qtk.pws
View file @
0185410d
File moved
jacktrip/
src/.qmake.internal.cache
→
src/.qmake.internal.cache
View file @
0185410d
File moved
jacktrip/
src/Documentation.h
→
src/Documentation.h
View file @
0185410d
File moved
jacktrip/
src/JackClient.cpp
→
src/JackClient.cpp
View file @
0185410d
...
...
@@ -11,7 +11,7 @@
#include
"string.h"
#include
"audioDevice.h"
#include
"qstring.h"
#include
<q
3
textstream.h>
#include
<qtextstream.h>
jack_port_t
**
input_port
;
jack_port_t
**
output_port
;
jack_default_audio_sample_t
**
inBufPtr
;
...
...
jacktrip/
src/JackClient.h
→
src/JackClient.h
View file @
0185410d
...
...
@@ -11,8 +11,7 @@
#include
"Stk.h"
#include
"stdio.h"
#include
"stdlib.h"
//#include "qstring.h"
#include
<qstring.h>
#include
"qstring.h"
class
AudioDevice
;
class
JackClient
:
public
Stk
...
...
jacktrip/
src/MainDialog.cpp
→
src/MainDialog.cpp
View file @
0185410d
...
...
@@ -14,63 +14,54 @@
#include
<qlayout.h>
//#include <qwt_slider.h>
MainDialog
::
MainDialog
(
QWidget
*
parent
,
const
char
*
name
)
//
:
//
MainWindow (parent, name) // generated by designer
MainDialog
::
MainDialog
(
QWidget
*
parent
,
const
char
*
name
)
:
MainWindow
(
parent
,
name
)
// generated by designer
{
// plot = new StripChart (plotFrame);
// plot->setAxisScale(0,0.0,0.1);
// plot->setAxisScale(1,0.0,0.1);
//plot->resize (300, 300);
//*********************************************
//Coment out to remove dependency of widget
/*
connect
((
QObject
*
)
goButton
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
goThreads
(
bool
)));
goButton
->
setChecked
(
false
);
*/
//*********************************************
}
void
MainDialog
::
init
(
StreamBD
*
s
)
{
//*********************************************
//Coment out to remove dependency of widget
QString
tmp
;
QTextOStream
(
&
tmp
)
<<
"sampleRate "
<<
s
->
args
->
sampleRate
;
//
sampleRateTextLabel->setText (tmp); tmp = "";
sampleRateTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"netHarpStrings "
<<
s
->
args
->
netHarpStrings
;
//
netHarpStringsTextLabel->setText (tmp); tmp = "";
netHarpStringsTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"audioChannels "
<<
s
->
args
->
audioChannels
;
//
audioChannelsTextLabel->setText (tmp); tmp = "";
audioChannelsTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"runFifo "
<<
s
->
args
->
runFifo
;
//
runFifoTextLabel->setText (tmp); tmp = "";
runFifoTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"audioDeviceID "
<<
s
->
args
->
audioDeviceID
;
//
audioDeviceIDTextLabel->setText (tmp); tmp = "";
audioDeviceIDTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"netInQInPackets "
<<
s
->
args
->
networkInputQueueLengthInPackets
;
//
netInQInPacketsTextLabel->setText (tmp); tmp = "";
netInQInPacketsTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"redundancy "
<<
s
->
args
->
redundancy
;
//
redundancyTextLabel->setText (tmp); tmp = "";
redundancyTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"audioInQInAudioBufs "
<<
s
->
args
->
audioInputQueueLengthInAudioBuffers
;
//
audioInQInAudioBufsTextLabel->setText (tmp); tmp = "";
audioInQInAudioBufsTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"framesPerAudioBuffer "
<<
s
->
args
->
framesPerAudioBuffer
;
//
framesPerAudioBufferTextLabel->setText (tmp); tmp = "";
framesPerAudioBufferTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"networkPortOffset "
<<
s
->
args
->
networkPortOffset
;
//
networkPortOffsetTextLabel->setText (tmp); tmp = "";
networkPortOffsetTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"runMode "
<<
s
->
args
->
runMode
;
//
runModeTextLabel->setText (tmp); tmp = "";
runModeTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"secondsBetweenPlucks "
<<
s
->
args
->
secondsBetweenPlucks
;
//
secondsBetweenPlucksTextLabel->setText (tmp); tmp = "";
secondsBetweenPlucksTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"lowPassFilterCoeff "
<<
s
->
args
->
lowPassFilterCoeff
;
//
lowPassFilterCoeffTextLabel->setText (tmp); tmp = "";
lowPassFilterCoeffTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"delayIncBtwnStrings "
<<
s
->
args
->
delayIncrementBetweenStrings
;
//
delayIncBtwnStringsTextLabel->setText (tmp); tmp = "";
delayIncBtwnStringsTextLabel
->
setText
(
tmp
);
tmp
=
""
;
QTextOStream
(
&
tmp
)
<<
"jack "
<<
s
->
args
->
jack
;
//jackTextLabel->setText (tmp);
//*********************************************
jackTextLabel
->
setText
(
tmp
);
/* audioChannels
runFifo
...
...
@@ -94,8 +85,6 @@ MainDialog::~MainDialog ()
{
}
//********JPC Coment out*************************************
/*
void
MainDialog
::
goThreads
(
bool
go
)
{
...
...
@@ -110,21 +99,16 @@ MainDialog::goThreads (bool go)
}
}
void
MainDialog
::
addThread
(
QObject
*
t
)
/
/
append thread to mythreads list
/
*
append thread to mythreads list
*/
{
mythreads
.
append
(
t
);
//*********************************************
//Coment out to remove dependency of widget
//connect (this, SIGNAL (startThread ()), t, SLOT (go ()));
//connect (this, SIGNAL (stopThread ()), t, SLOT (stop ()));
//connect (this, SIGNAL (joinThread ()), t, SLOT (join ()));
//*********************************************
connect
(
this
,
SIGNAL
(
startThread
()),
t
,
SLOT
(
go
()));
connect
(
this
,
SIGNAL
(
stopThread
()),
t
,
SLOT
(
stop
()));
connect
(
this
,
SIGNAL
(
joinThread
()),
t
,
SLOT
(
join
()));
}
void
MainDialog
::
closeEvent
(
QCloseEvent
*
e
)
{
...
...
@@ -138,7 +122,7 @@ MainDialog::closeEvent (QCloseEvent * e)
void
MainDialog
::
customEvent
(
QCustomEvent
*
e
)
{
if (e->type () == QEvent::User + 117)
if
(
e
->
type
()
==
QEvent
::
User
+
117
)
{
ThreadCommEvent
*
ce
=
(
ThreadCommEvent
*
)
e
;
//if (ce->val0 () > 0.0) plot->setV1 (ce->val0 ());
...
...
@@ -146,4 +130,3 @@ MainDialog::customEvent (QCustomEvent * e)
//if (ce->val1 () > 0.0) plot->setV2 (ce->val1 ());
}
}
*/
jacktrip/
src/MainDialog.h
→
src/MainDialog.h
View file @
0185410d
...
...
@@ -6,35 +6,29 @@
#ifndef _MAINDIALOG_H_
#define _MAINDIALOG_H_
//
#include "../src/ui/MainWindow.h"
#include
"q
3
ptrlist.h"
#include
"../src/ui/MainWindow.h"
#include
"qptrlist.h"
#include
"qthread.h"
//#include "qstring.h"
#include
<qstring.h>
#include
"qstring.h"
#include
"qtimer.h"
#include
"StreamBD.h"
//#include "StripChart.h"
class
MainDialog
//
:public MainWindow
class
MainDialog
:
public
MainWindow
{
//Q_OBJECT public://********JPC Coment out*************************************
public:
Q_OBJECT
public
:
MainDialog
(
QWidget
*
parent
=
0
,
const
char
*
name
=
0
);
virtual
~
MainDialog
();
void
init
(
StreamBD
*
s
);
//StripChart *plot;
//virtual void closeEvent (QCloseEvent * e);//********JPC Coment out*************************************
//void customEvent (QCustomEvent * e);//********JPC Coment out*************************************
//********JPC Coment out*************************************
/*
virtual
void
closeEvent
(
QCloseEvent
*
e
);
void
customEvent
(
QCustomEvent
*
e
);
void
addThread
(
QObject
*
t
);
QPtrList
<
QObject
>
mythreads
;
public
slots
:
void
goThreads
(
bool
);
signals:
void
startThread
();
void
stopThread
();
void
joinThread
();
*/
};
...
...
jacktrip/
src/StreamBD.cpp
→
src/StreamBD.cpp
View file @
0185410d
...
...
@@ -205,9 +205,9 @@ StreamBD::cmd (MainDialog *eventThread)
audioDevice
->
setThreads
(
t
);
t
.
netin
=
new
UDPInput
(
netInfo
,
audioInfo
);
t
.
netin
->
setGUI
((
QObject
*
)
eventThread
);
t
.
netin
->
setGUI
((
QObject
*
)
eventThread
);
t
.
netout
=
new
UDPOutput
(
netInfo
,
audioInfo
);
t
.
netout
->
setGUI
((
QObject
*
)
eventThread
);
t
.
netout
->
setGUI
((
QObject
*
)
eventThread
);
ConnectPlugins
(
t
.
audioin
,
t
.
netout
,
t
.
streamout
);
ConnectPlugins
(
t
.
netin
,
t
.
audioout
,
t
.
streamin
);
...
...
@@ -579,12 +579,8 @@ StreamBD::EstablishConnection (runModeT runMode, char *hostname, UDPOutput * net
usleep
(
10000
);
// cout << ".";
}