Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Hardcoded 0.5 seconds of lag in ALSA backend #13

Open
danopia opened this issue Aug 6, 2013 · 3 comments
Open

Hardcoded 0.5 seconds of lag in ALSA backend #13

danopia opened this issue Aug 6, 2013 · 3 comments

Comments

@danopia
Copy link

danopia commented Aug 6, 2013

Hey, I'm using this module in a node-backed music/dj server (developing on linux) and it's been treating me pretty well so far. The only issue that I've had is that mpg123's alsa output driver contains a hardcoded #DEFINE forcing half a second of lag. I swapped this number out for 0.05 in my local copy of the module and achieved stable output with almost no noticeable control lag.

Is is possible for this #DEFINE to be made a dynamic setting, or will I need to fork node-speaker and change it in the fork?

I have not checked if any other backends have such a buffer hardcoded.

@TooTallNate
Copy link
Owner

So it would be great if this backend buffer was configurable. The coreaudio backend has a similar #DEFINE for FIFO_DURATION (0.5f). So some way to make this configurable would be great IMO. Patch welcome!

@colinbdclark
Copy link

+1 for some way to adjust this built-in latency. I understand that it's coming from mpg123 not node-speaker itself, but I have received a lot of complaints from users of Flocking (which uses node-speaker) that the lag makes it unusable for real-time performance with a MIDI or OSC controller.

@felixroos
Copy link

I also just ran into the problem of node-speaker having too much latency for a realtime setting.
might or might not be helpful for people looking into this, this commit seems to fix it directly in mpg123: 1218253 (untested)

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

No branches or pull requests

4 participants