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

Golang port/interface? #30

Open
ethindp opened this issue Apr 7, 2019 · 6 comments
Open

Golang port/interface? #30

ethindp opened this issue Apr 7, 2019 · 6 comments

Comments

@ethindp
Copy link

ethindp commented Apr 7, 2019

Would it be possible to make a golang port or interface for Alure? It would be incredibly nice since golang has once again interested me and I can't, for the life of me, find any good, high-quality audio libraries that provide 3D, HRTF, and so on, and I don't want to manually interface with a library like FMOD or BASS. (That would just be painful.) Though golang makes interfaing with libraries relatively painless, or as painless as you can make callouts to other libraries not writen in Go, it still would be painful. So are their any plans in the works for such a port or interface?

@Cazadorro
Copy link
Contributor

I don't necessarily want to speak for kcat, but the short answer is probably no. There's currently one major maintainer on this project, kcat, they also happen to manage most of the work being done on OpenAL soft, of which Alure is essentially a wrapper for. Feel free to implement your own wrapper however. Kcat is pretty responsive to pull requests, so if you created an interface for go with this, I'm sure they'd be willing to hold a link to it in the readme. I believe pretty much everything you'll need to wrap over for basic functionality is just in https://github.com/kcat/alure/blob/master/include/AL/alure2.h, but if I understand the code correctly it is not using C linkage, so you'll either need to create C interface, just use openal soft api, or use some other tool like SWIG (ex found here https://stackoverflow.com/questions/1713214/how-to-use-c-in-go)

@kcat
Copy link
Owner

kcat commented Apr 10, 2019

Unless there's a way for Golang to work with C++, it's unlikely that an interface wrapper is easily possible. While you could probably make C (and thus Golang or whatever else) wrappers for the calls themselves, Alure uses the STL (or something STL-compatible) for things like vector, string, unique_ptr, shared_ptr, and shared_future. It might be possible, but I don't imagine it'll be easy for someone not familiar with both Golang and C++.

@ethindp
Copy link
Author

ethindp commented Apr 10, 2019 via email

@LAGonauta
Copy link
Contributor

Not sure if it is going to help, however I am in the process in making a C interface for use with C#:
https://github.com/LAGonauta/Alure-C-Interface

As Go can pass pointers around it can probably be used without any problem.
It is still rough, however, and probably lots of things could be better. One can already use it with C#, though: (no futures support yet, not sure if they will ever be possible)
https://github.com/LAGonauta/Alure-CSharp-Wrapper

@McSinyx
Copy link
Contributor

McSinyx commented Apr 1, 2020

Not entirely related, but our Python interface has just got its first official release! I don't know where I should announce such information but thank you @kcat for your help during the implementation process of the wrapper. Palace is not yet stable, but functionality-wise it covers almost all what alure can do (but slower 😄).

@SeanTolstoyevski
Copy link

Currently the best OpenAL wrapper for Golang is g3n.
https://github.com/g3n/engine/tree/master/audio/al

We can improve this. I don't think there's anything we can do for Alure2.

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

6 participants