jacktrip win32

23 views
Skip to first unread message

tim blechmann

unread,
Feb 9, 2011, 1:01:53 PM2/9/11
to jacktrip-users
hi,

i am looking for a cross-platform way to do a multichannel (~64)
connection from one computer (any os) to a linux computer.

two questions:
- afaik, jacktrip does not support ppc. is this still correct? any
idea, what is the reason for it? if it is just an endianness issue, it
shouldn't be too difficult to solve
- does it support win32? preferably binaries?

thanks, tim

Juan-Pablo Caceres

unread,
Feb 10, 2011, 8:09:28 AM2/10/11
to jacktri...@googlegroups.com
Hi,

On 2/9/11 3:01 PM, tim blechmann wrote:
> hi,
>
> i am looking for a cross-platform way to do a multichannel (~64)
> connection from one computer (any os) to a linux computer.
>
> two questions:
> - afaik, jacktrip does not support ppc. is this still correct? any
> idea, what is the reason for it? if it is just an endianness issue, it
> shouldn't be too difficult to solve

It probably is just that, but since I don't have access to a PPC, I
cannot test and fix it. If anyone with access to that platform can look
at that issue, I can include the patch in the trunk.


> - does it support win32? preferably binaries?

Yes, but it's fairly untested, so use at your own risk. You can find the
binaries here (install instructions included):
https://ccrma.stanford.edu/~jcaceres/tmp/jacktrip-windows/

Best!
JPC


IOhannes m zmoelnig

unread,
Feb 10, 2011, 8:10:26 AM2/10/11
to jacktri...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hallo tim,

On 2011-02-09 19:01, tim blechmann wrote:
> hi,
>
> i am looking for a cross-platform way to do a multichannel (~64)
> connection from one computer (any os) to a linux computer.

i'm no jacktrip dev, so consider these answers as DAU.


>
> two questions:
> - afaik, jacktrip does not support ppc. is this still correct? any
> idea, what is the reason for it? if it is just an endianness issue, it
> shouldn't be too difficult to solve

i totally agree.
looking at the code, however, it seems that right now the
(endian-dependent) payload is simply cast'ed to uchar*, so expect
troubles :-)


fgmasdr
IOhannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1T48IACgkQkX2Xpv6ydvTrQACgnJu2dZ40wUcAqt/55CHPv+Wb
3/gAmgIKPt6AXb+ohsfGmJReepvMglNX
=WbXx
-----END PGP SIGNATURE-----

tim blechmann

unread,
Feb 12, 2011, 5:46:02 AM2/12/11
to jacktrip-users
thanks juan-pablo and iohannes,

will see, if i can make it ppc aware ...

btw, is there a way to use this list without gmail? if so the
subscription instructions are very well hidden..

cheers, tim

tim blechmann

unread,
Feb 12, 2011, 7:24:25 AM2/12/11
to jacktrip-users
> > two questions:
> > - afaik, jacktrip does not support ppc. is this still correct? any
> > idea, what is the reason for it? if it is just an endianness issue, it
> > shouldn't be too difficult to solve
>
> It probably is just that, but since I don't have access to a PPC, I
> cannot test and fix it. If anyone with access to that platform can look
> at that issue, I can include the patch in the trunk.

possible (untested as i don't have access to a PPC atm) fix:
diff --git a/jacktrip/src/PacketHeader.h b/jacktrip/src/PacketHeader.h
index 8a9b3f0..7ab7b63 100644
--- a/jacktrip/src/PacketHeader.h
+++ b/jacktrip/src/PacketHeader.h
@@ -62,7 +62,7 @@ public:
uint8_t BitResolution; ///< Audio Bit Resolution
uint8_t NumInChannels; ///< Number of Input Channels
uint8_t NumOutChannels; ///< Number of Output Channels
- //uint8_t Dummy; ///< Dummy value to byte padding alignment
+ uint8_t Dummy; ///< Dummy value to byte padding alignment
};

//---------------------------------------------------------
diff --git a/jacktrip/src/UdpDataProtocol.cpp b/jacktrip/src/
UdpDataProtocol.cpp
index 9abdecd..ad9bd64 100644
--- a/jacktrip/src/UdpDataProtocol.cpp
+++ b/jacktrip/src/UdpDataProtocol.cpp
@@ -43,6 +43,8 @@
#include <iostream>
#include <cstdlib>
#include <cerrno>
+#include <QtEndian>
+#include <cassert>


using std::cout; using std::endl;
@@ -123,14 +125,29 @@ int UdpDataProtocol::receivePacket(QUdpSocket&
UdpSocket, char* buf, const size_
// Block until There's something to read
while (UdpSocket.pendingDatagramSize() < n )
{ QThread::msleep(1); }
int n_bytes = UdpSocket.readDatagram(buf, n);
+
+ size_t units = n_bytes/4;
+ assert( (n_bytes&3) == 0);
+ int* intBuf = reinterpret_cast<int*>(buf);
+
+ for (size_t i = 0; i != units; ++i)
+ intBuf[i] = qFromLittleEndian(intBuf[i]);
+
return n_bytes;
}


//
*******************************************************************************
int UdpDataProtocol::sendPacket(QUdpSocket& UdpSocket, const
QHostAddress& PeerAddress,
- const char* buf, const size_t n)
+ char* buf, const size_t n)
{
+ size_t units = n/4;
+ assert( (n&3) == 0);
+ int* intBuf = reinterpret_cast<int*>(buf);
+
+ for (size_t i = 0; i != units; ++i)
+ intBuf[i] = qToLittleEndian(intBuf[i]);
+
int n_bytes = UdpSocket.writeDatagram(buf, n, PeerAddress,
mPeerPort);
return n_bytes;
}
diff --git a/jacktrip/src/UdpDataProtocol.h b/jacktrip/src/
UdpDataProtocol.h
index 176b25e..229cc1d 100644
--- a/jacktrip/src/UdpDataProtocol.h
+++ b/jacktrip/src/UdpDataProtocol.h
@@ -88,7 +88,7 @@ public:
* \return number of bytes read, -1 on error
*/
virtual int sendPacket(QUdpSocket& UdpSocket, const QHostAddress&
PeerAddress,
- const char* buf, const size_t n);
+ char* buf, const size_t n);

/** \brief Obtains the peer address from the first UDP packet
received. This address
* is used by the SERVER mode to connect back to the client.



btw, currently the trunk does not compile (at least not against the
jack2 headers), because it tries to typedef integer types, which are
already defined.
proposal 1: use qt's int types
proposal 2: use jack/systemdeps.h if available
proposal 3: put the whole jacktrip implementation into a separate
namespace

also, to build it with a recent gcc, i need to apply this patch in
order to resolve printf and stderr:

--- a/jacktrip/src/jacktrip_globals.cpp
+++ b/jacktrip/src/jacktrip_globals.cpp
@@ -38,6 +38,8 @@
#include "jacktrip_globals.h"
#include "jacktrip_types.h"

+#include <cstdio>
+

tim

Juan-Pablo Caceres

unread,
Feb 14, 2011, 9:03:40 AM2/14/11
to jacktri...@googlegroups.com
On 2/12/11 7:46 AM, tim blechmann wrote:
> btw, is there a way to use this list without gmail? if so the
> subscription instructions are very well hidden..

Yes, you can use any account, I subscribe with this address, which is
not gmail.

JPC

Juan-Pablo Caceres

unread,
Feb 14, 2011, 9:35:56 AM2/14/11
to jacktri...@googlegroups.com
Thanks for that patch Tim. Anyone available to test it on a PPC?

Juan-Pablo Caceres

unread,
Feb 14, 2011, 9:39:44 AM2/14/11
to jacktri...@googlegroups.com
On 2/12/11 9:24 AM, tim blechmann wrote:
> btw, currently the trunk does not compile (at least not against the
> jack2 headers), because it tries to typedef integer types, which are
> already defined.
> proposal 1: use qt's int types
> proposal 2: use jack/systemdeps.h if available
> proposal 3: put the whole jacktrip implementation into a separate
> namespace
>
> also, to build it with a recent gcc, i need to apply this patch in
> order to resolve printf and stderr:
>
> --- a/jacktrip/src/jacktrip_globals.cpp
> +++ b/jacktrip/src/jacktrip_globals.cpp
> @@ -38,6 +38,8 @@
> #include "jacktrip_globals.h"
> #include "jacktrip_types.h"
>
> +#include<cstdio>
> +


Are you sure you're using the trunk? What OS version are you compiling on?

JPC

tim blechmann

unread,
Feb 14, 2011, 10:48:10 AM2/14/11
to jacktrip-users
> > btw, is there a way to use this list without gmail? if so the
> > subscription instructions are very well hidden..
>
> Yes, you can use any account, I subscribe with this address, which is
> not gmail.

how? the `join this group' link points directly to a gmail login. i
didn't find any instructions on how to join without gmail account

tim blechmann

unread,
Feb 14, 2011, 10:52:29 AM2/14/11
to jacktrip-users
> > --- a/jacktrip/src/jacktrip_globals.cpp
> > +++ b/jacktrip/src/jacktrip_globals.cpp
> > @@ -38,6 +38,8 @@
> >   #include "jacktrip_globals.h"
> >   #include "jacktrip_types.h"
>
> > +#include<cstdio>
> > +
>
> Are you sure you're using the trunk? What OS version are you compiling on?

hm ... seems that the git-svn import didn't get the whole tree ...
sry for the noise

Juan-Pablo Caceres

unread,
Feb 14, 2011, 12:08:43 PM2/14/11
to jacktri...@googlegroups.com

You're right that it's not evident. I found some info here:
http://groups.google.com/support/bin/answer.py?hl=en&answer=46606

Does it work?
JPC

Reply all
Reply to author
Forward
0 new messages