Problem with buffer size and "clicking"

80 views
Skip to first unread message

David Lake

unread,
Jan 17, 2021, 4:55:13 AM1/17/21
to jacktrip-users

Hi

Re-sending as I don't think this made it out...

 

I’ve built a Raspberry PI with a HiFiBerry DAC+/ADC and I’m running my own Linode server as a hub.


To test loopback, I do this:

 

./jacktrip -S -p1

 

If the client is set to a sample size of 1024, that works.

 

If the client is set to a sample size of 128 the server gives me the error below.  How do I set the jacktrip hub to accept a sample size of 128?

 

Also, when I am connected in loopback I have an intermittent clicking noise on the audio.   I’ve spun-up a test server to compare and I don’t get the same issue so it is specific to my server.

 

Thanks

 

David

 

root@jitsimeet:~/jacktrip/builddir# ./jacktrip -S -p1

mThreadPool default maxThreadCount = 2

mThreadPool maxThreadCount set to 32

JackTrip HUB SERVER: UDP Base Port set to 61002

JackTrip HUB SERVER: TCP Server Listening in Port = 4464

JackTrip HUB SERVER: Waiting for client connections...

JackTrip HUB SERVER: Hub auto audio patch setting = 1

=======================================================

JackTrip HUB SERVER: Client Connection Received!

JackTrip HUB SERVER: Client Connect Received from Address : 2a00:23c4:3d04:da01:8db4:33f0:a316:dde6

JackTrip HUB SERVER: Reading UDP port from Client...

JackTrip HUB SERVER: Client UDP Port is = 4464

JackTrip HUB SERVER: Sending Final UDP Port to Client: 61002

JackTrip HUB SERVER: Client TCP Connection Closed!

JackTrip HUB SERVER: Spawning JackTripWorker...

JackTrip HUB SERVER: Starting JackTripWorker...

--->JackTripWorker: PeerNumChannels = 2

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

jackdmp 1.9.12

Copyright 2001-2005 Paul Davis and others.

Copyright 2004-2016 Grame.

Copyright 2016-2017 Filipe Coelho.

jackdmp comes with ABSOLUTELY NO WARRANTY

This is free software, and you are welcome to redistribute it

under certain conditions; see the file COPYING for details

JACK server starting in realtime mode with priority 10

self-connect-mode is "Don't restrict self connect requests"

audio_reservation_init

Acquire audio card Audio0

creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit

configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods

ALSA: final selected sample format for capture: 16bit little-endian

ALSA: use 2 periods for capture

ALSA: final selected sample format for playback: 16bit little-endian

ALSA: use 2 periods for playback

JACK server started

Setting JACK Process Callback...

SUCCESS

---------------------------------------------------------

The Sampling Rate is: 48000

---------------------------------------------------------

The Audio Buffer Size is: 1024 samples

                      or: 4096 bytes

---------------------------------------------------------

The Number of Channels is: 2

---------------------------------------------------------

The RTAudio device ID is: 255

---------------------------------------------------------

Using UDP Protocol

---------------------------------------------------------

UDP Socket Receiving in Port: 61002

---------------------------------------------------------

Waiting for Peer...

JackTrip HUB SERVER: Total Running Threads:  1

===============================================================

ERROR: Peer Buffer Size is  : 128

       Local Buffer Size is : 1024

Make sure both machines use same buffer size

---------------------------------------------------------

Received Connection from Peer!

Stopping JackTrip...

spawning jacktripWorker so change patch

JackTemporaryException : now quits...

Jack main caught signal 2

JackTrip Processes STOPPED!

---------------------------------------------------------

releasing jacktripWorker so change patch

Released audio card Audio0

audio_reservation_finish

Cannot read socket fd = 9 err = Success

CheckRes error

JackSocketClientChannel read fail

Cannot connect to server socket err = No such file or directory

Cannot connect to server socket

Cannot connect to the server

JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock

jack_client_open() failed, status = 0x%2.0x

33

QMutex: destroying locked mutex

root@jitsimeet:~/jacktrip/builddir#

Chris Chafe

unread,
Jan 17, 2021, 1:01:07 PM1/17/21
to jacktri...@googlegroups.com
Before starting jacktrip on the server be sure to get jack running at the desired FPP setting (e.g., 128).

The session below shows the server spawning a connection but because it can't access an already running jackd process (either because it's not running or perms are wrong), jack tries to autostart using a default value (1024). That's a mismatch with the incoming client stream at 128, so jacktrip disconnected.

Chris
--
You received this message because you are subscribed to the Google Groups "jacktrip-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacktrip-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacktrip-users/6be76137-56cb-447b-bc3a-b64b758152f9n%40googlegroups.com.

david...@oca.ac.uk

unread,
Jan 17, 2021, 5:50:26 PM1/17/21
to jacktri...@googlegroups.com

Thank you!

 

I created and /etc/jackdrc and put “/usr/bin/jackd -d dummy --rate 48000 --period 128” in it.
 
The difference is amazing – the latency to my server is about 7ms and with the session running in loopback there is virtually NO discernible delay at all.

David
Reply all
Reply to author
Forward
0 new messages