Closed vrslev closed 2 years ago
What command line are you using to run this ?
@benroeder
uv -r coreaudio 127.0.0.1 --audio-channel-map 2:0,3:1,1:1
,
uv -s coreaudio:60 127.0.0.1 --audio-capture-format channels=16
.
I play audio Logic to BlackHole virtual audio interface, send the sound with UltraGrid, receive it on the same machine in speakers.
Logic -> BlackHole, BlackHole -> UltraGrid, UltraGrid -> speakers
Tested on M1 Mac locally and M1 Mac -> Intel Mac.
I see you experience similar issue (#213)?
Yes that why I was asking, have you tried recording the output, would be interested to see what the "glitches" look like and how long you ran the test for ?
I didn’t yet, I will
Hi @vrslev,
what is the point of capturing (and thus sending and processing) 16 channels whilst using just 4? The point is that the issue could be either performance or network problem. Would it be possible to:
Setting the network buffers is described here. Anyways, it shouldn't play a role for audio and generally low-bandwidth flow. If UltraGrid doesn't report lost packets (as should be obvious from the receiver output), it is not needed.
@MartinPulec
paste the terminal output of the receiver, at least tens of second from the beginning until some steady behavior
Sure, I’ll do that and report back.
if only 4 channels are needed, try to send just those 4
I’m just testing at home, that’s why there’s only 4 channels used. In production I have mixer with 32 ins and 32 outs 😃
I’m just testing at home, that’s why there’s only 4 channels used. In production I have mixer with 32 ins and 32 outs
Sure, understood. Anyways, I'd check whether it can be due to performance first.
Just FYI, I've just fixed an error causing a crash with your channel map configuration, I'd advise to upgrade to current continuous build (or it will later land to 1.7.3 update).
@MartinPulec
Here are logs. Sometimes (after two minutes or so) underflow still occurs.
Just FYI, I've just fixed an error causing a crash with your channel map configuration, I'd advise to upgrade to current continuous build (or it will later land to 1.7.3 update).
I have noticed some crashes (including segmentation faults) when was playing with audio channel mapping, but I think the problem is irrelevant :) Thanks anyway!
@vrslev thanks for the data. I've tested with your setup on 2 computers - both using 16 channel BlackHole. First was very old Mac Pro (Early 2008), the second recent M1 Macbook.
The Macbook was without a problem. Mac Pro was more problematic, I make it work in the end by using --param audio-buffer-len=300
for the receiver and -m 9000
(Jumbo frames on sender), although still the underflow occurs from times to times. It is definitely a performance issue there because the (per-thread load was peaking up to 100% as per top(1)).
Can you check if top isn't also peaking to 100%? On the M1 notebook, the maximal load peaked to something like one third.
@MartinPulec CPU load is 17-23% on one core both for sender and receiver on M1 MacBook. After setting options you suggested it became 21-28%.
Hi @vrslev, thanks for the info. That is quite interesting, setting Jumbo frames should definitely decrease the load on both sides, not increase. Anyway, the difference doesn't seem to be significant. I've just pushed change (built in the continuous), that displays how much samples was skipped.
Anyways, can you confirm that the problem is really audible? I was thinking that even though not all requested samples are written to the API, it can deal with lower amount (either resampling or requesting samples earlier) and thus it can be false positive.
@MartinPulec Here are logs on fresh build:
Yes, I can here interrupts :(
My interest is much lower not because I decided to use JACK and JackTrip in my project. But I'm happy to continue testing for you guys if you need help 🙏
I've looked into the logs and the receiver one was a bit confusing to me at first. If you look at it more closely, there isn't underflow anymore but overflows all the time. I realized that I've met this when UltraGrid is run headlessly - CoreAudio doesn't play the output at all. However it suffices to interrupt the screensaver (either physically or with remote desktop) - would it be possible to rerun it and post the logs? I am afraid that I don't know if it helps, it depends :)
@MartinPulec I don't really understand what should I test. Same setup with latest build?
I meant the lines: Warning: ring buffer overflow!!!
means that nothing is played, perhaps Mac is sleeping, so the logs are not helpful. But don't worry, if you do not need this to be resolved, we can postpone it for now.
☺️👌
Hi there! Yesterday found this project and I think it can help me to save a lot of headache 😍
I'm developing wrapper around JACK and JackTrip for local audio networking. Basically, the job can be done almost out-of-the-box using UltraGrid. But there's one thing: audio underflow. UltraGrid logs Core Audio underflows even when I test on one Mac locally. Same thing happens when I add second Mac. Here's what I tried:
audio-disable-adaptive-buffer
param,audio-buffer-len
to different values, doesn't work properly even on 9999 (it is limit),audio-scale
tonone
. And all of that 🙄 in different combinations. Still no luck.Is there a way to increase network buffer (?) so underflow won't reached? What would be the best way to solve the problem?