-
Notifications
You must be signed in to change notification settings - Fork 13
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
Implement convex hull for unsupported loudspeaker layouts #20
Conversation
This is great. It is exactly what I had in mind. No API change but a great improvement for the library user. You should however update the documentation. Maybe a good opportunity to fix the documentation builds? I think you can just use the |
Thanks. I'm not sure there's much to update in the documentation; the most relevant part i could find is
which is still technically true, though
would be more complete. I was thinking about moving the facets file to the tests and just using the convex hull normally. That should make the library smaller, and a bit less weird. Does that make sense? Thanks for the pointers re. docs and CI; I've got some commits to push relating to documentation, and i'll have a look at CI tomorrow. |
Yes, that's the part in the documentation I meant. Would it be possible to state the conditions a layout has to fulfil that it works? If the explanation is easy enough to understand it would be a very helpful part of the documentation. I don't really see the benefit of moving the facets file. What do you think is weird about the library? I actually think having the distinction between the officially supported layouts and the unsupported ones in the code is a good thing. |
Right, I gave the docs a go. It's not super specific, but hopefully it gets across the general idea. re. facets, keeping them is nice because it feels like it guarantees the behavior of the renderer for standard layouts, but:
I also like the idea of a distinction between the officially supported layouts and the unsupported ones, but I don't think the facets file really helps with that -- I'd much rather have an explicit check that the passed-in layouts meet bs.2051 requirements (with a warning if that fails), for example. |
Documentation looks good to me. Regarding the facets file: All three of your arguments are good reasons to move it. So let's do it. Also your proposed alternative with checking the layout requirements is a good one. Maybe that could be a two step process: first check if the layout is a bs.2051 layout and then check if it anyways meets the requirements. The result of this could also be made available to the library user. I think it could be helpful to be able to check if the renderer is running in the standardised bs.2127/bs.2051 mode or not. |
Codecov Report
@@ Coverage Diff @@
## master #20 +/- ##
==========================================
+ Coverage 85.32% 85.58% +0.26%
==========================================
Files 53 54 +1
Lines 2044 2102 +58
Branches 167 182 +15
==========================================
+ Hits 1744 1799 +55
Misses 223 223
- Partials 77 80 +3
Continue to review full report at Codecov.
|
This is motivated by testing (want to be able to test the convex hull but don't want to replicate this functionality), but it's a reasonable line to draw anyway.
c1954a7
to
f87f99a
Compare
Thanks, that all makes sense. I'll merge this (since it implements the required functionality and doesn't break anything) and add issues for the other bits mentioned. |
This is an alternative to #19
It includes a convex hull implementation; this sounds like a bad idea, but:
This algorithm is really dumb, but it seems trustworthy and completes in <200us on my machine for 9+10+3.