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

xinsert API unreliable with realtime states #326

Open
olofson opened this issue May 11, 2017 · 3 comments
Open

xinsert API unreliable with realtime states #326

olofson opened this issue May 11, 2017 · 3 comments

Comments

@olofson
Copy link
Owner

olofson commented May 11, 2017

Calls like a2_OpenSink() and a2_OpenSource() sometimes fail, with the engine printing "Voice has no units (A2MT_ADDXIC)". Adding a substantial delay between spawning the target voice, and attaching to it, avoids the problem.

Notably, the streamstress and streamtest tests are broken, and will not work at all with some drivers. Low latency drivers, such as JACK, seem to work better, but there are still issues.

Apparently, the xinsert client setup messages arrive before the engine knows anything about the target voice. This is a solved problem (A2_TNEWVOICE; a handle that serves as a message queue until the actual voice has been created), and works for "everything" else. Did I forget something in the xinsert API when refactoring the API?

@olofson olofson added the bug label May 11, 2017
@olofson olofson added this to the v1.9.3 milestone May 11, 2017
@olofson
Copy link
Owner Author

olofson commented May 14, 2017

This probably explains it:

2064.000000:	h (0x11c1208) [ 0 ] START()
0.000000:	h (0x115e5b8) [ 1 ] Audiality 2: Incorrect timestamp for voice 0x115e5b8! (2048.000000 frames late.)
ADDXIC

@olofson
Copy link
Owner Author

olofson commented May 14, 2017

a2_add_xic() is hardwired to the pre-A2_interface timestamping and messaging methods. Trivial fix.

The more hairy part is destroying XICs. We have the same problem in some other cases as well, I think. The problem is, handles and underlying objects don't keep track of which interface they "belong" to - and even if they did, we'd have to deal with interfaces being closed before these objects are destroyed.

@olofson olofson modified the milestones: v1.9.3, v1.9.4 Oct 23, 2017
@olofson
Copy link
Owner Author

olofson commented Dec 7, 2017

See also #337.

@olofson olofson modified the milestones: v1.9.4, v1.9.5+ Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant