Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Choppy Sound when routing LiveInput #95

Open
MeFisto94 opened this issue Apr 17, 2019 · 1 comment
Open

Choppy Sound when routing LiveInput #95

MeFisto94 opened this issue Apr 17, 2019 · 1 comment

Comments

@MeFisto94
Copy link

Sorry for the vast description, it's hard to explain sound sometimes, but I guess you can understand what I mean, essentially it sounds like a too small buffer, but when I increase the buffer it just takes longer for the interruption to appear.

As soon as I attach an LiveInput to the AudioOutput even other UGens attached to THIS Output such as FilePlayers don't play correctly anymore. Note that a different AudioOutput is unaffected by this.
I could only guess that this is something like LiveInput running into an empty buffer and then pausing everything until there are more samples ready. Is there anything related I could try?

@ddf
Copy link
Owner

ddf commented Apr 19, 2019

Yeah I think it's possible for the input reading to block here:

line.read(bytes, 0, bytes.length);

If that happened it'd hold up the entire signal chain. The comment about that implementation being "sort of terrible" is a bit of an understatement. Probably LiveInput should be using the version of read that takes a MultiChannelBuffer. I don't think this UGen was super well tested. :-/

As far as I know, using an AudioInput with monitoring enabled works well, but then you'd need to use the deprecated AudioEffect stuff (ie addEffect on the AudioInput) to modify the input before it goes back out to the speakers.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants