{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/9328","labels_url":"https://api.github.com/repos/golang/go/issues/9328/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/9328/comments","events_url":"https://api.github.com/repos/golang/go/issues/9328/events","html_url":"https://github.com/golang/go/issues/9328","id":52030029,"number":9328,"title":"mobile/audio: OpenAL bindings","user":{"login":"crawshaw","id":161319,"avatar_url":"https://avatars.githubusercontent.com/u/161319?v=3","gravatar_id":"","url":"https://api.github.com/users/crawshaw","html_url":"https://github.com/crawshaw","followers_url":"https://api.github.com/users/crawshaw/followers","following_url":"https://api.github.com/users/crawshaw/following{/other_user}","gists_url":"https://api.github.com/users/crawshaw/gists{/gist_id}","starred_url":"https://api.github.com/users/crawshaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawshaw/subscriptions","organizations_url":"https://api.github.com/users/crawshaw/orgs","repos_url":"https://api.github.com/users/crawshaw/repos","events_url":"https://api.github.com/users/crawshaw/events{/privacy}","received_events_url":"https://api.github.com/users/crawshaw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/release-none","name":"release-none","color":"ededed"},{"url":"https://api.github.com/repos/golang/go/labels/repo-mobile","name":"repo-mobile","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"rakyll","id":108380,"avatar_url":"https://avatars.githubusercontent.com/u/108380?v=3","gravatar_id":"","url":"https://api.github.com/users/rakyll","html_url":"https://github.com/rakyll","followers_url":"https://api.github.com/users/rakyll/followers","following_url":"https://api.github.com/users/rakyll/following{/other_user}","gists_url":"https://api.github.com/users/rakyll/gists{/gist_id}","starred_url":"https://api.github.com/users/rakyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakyll/subscriptions","organizations_url":"https://api.github.com/users/rakyll/orgs","repos_url":"https://api.github.com/users/rakyll/repos","events_url":"https://api.github.com/users/rakyll/events{/privacy}","received_events_url":"https://api.github.com/users/rakyll/received_events","type":"User","site_admin":false},"milestone":null,"comments":31,"created_at":"2014-12-15T19:47:49Z","updated_at":"2015-02-26T19:51:30Z","closed_at":null,"body":"OpenAL is a common subset of both the audio systems on Android and iOS, so it serves as a good place to get audio support for all-Go mobile apps.\r\n\r\nWe should start with a very thin cgo wrapper, in the style of the gl package. Probably called golang.org/x/mobile/audio.\r\n\r\nAs the API is significantly smaller than OpenGL, it may be possible to build one canonical, pleasant Go library on top of it. In which case we may want to have the cgo library in x/mobile/audio/al and keep x/mobile/audio for the user-friendly library. But it is still an open question if one nice Go library is possible."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/76255343","html_url":"https://github.com/golang/go/issues/9328#issuecomment-76255343","issue_url":"https://api.github.com/repos/golang/go/issues/9328","id":76255343,"user":{"login":"rakyll","id":108380,"avatar_url":"https://avatars.githubusercontent.com/u/108380?v=3","gravatar_id":"","url":"https://api.github.com/users/rakyll","html_url":"https://github.com/rakyll","followers_url":"https://api.github.com/users/rakyll/followers","following_url":"https://api.github.com/users/rakyll/following{/other_user}","gists_url":"https://api.github.com/users/rakyll/gists{/gist_id}","starred_url":"https://api.github.com/users/rakyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakyll/subscriptions","organizations_url":"https://api.github.com/users/rakyll/orgs","repos_url":"https://api.github.com/users/rakyll/repos","events_url":"https://api.github.com/users/rakyll/events{/privacy}","received_events_url":"https://api.github.com/users/rakyll/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T19:51:30Z","updated_at":"2015-02-26T19:51:30Z","body":"My reasoning on dynamic libraries was related to user packages rather than\nwhat we will provide in the mobile repo. But the users can always depend on\nthe NDK toolchain and System.loadLibrary if they have additional external\ndependencies and they are only targeting Android -- it should be case if\nyou're loading a dynamic lib.\n\nSo, fine. We should move on, I'll dlsym. If we don't like it, we can\nrethink and reimplement.\n\nOn Thu, Feb 26, 2015 at 7:19 AM, David Crawshaw <notifications@github.com>\nwrote:\n\n> My current reasoning on dynamic libraries:\n>\n>    1. Every API we build in the mobile repository is for both Android and\n>    iOS.\n>    2. We cannot load dynamic libraries on iOS.\n>    3. We can statically link on Android, except where licenses prohibit\n>    it. License prohibitions on Android apply to iOS too.\n>    4. We strongly prefer working in Go and minimizing C. (If everything\n>    we needed from Android and iOS was available as a syscall, I would make\n>    this work with CGO_ENABLED=0.)\n>\n> So for us to need a dynamic library: it must be necessary for implementing\n> an API on Android that is available on iOS some other way, and licensing\n> must prohibit static linking. I'm amazed we found even one example.\n>\n> It may be expedient to implement your audio package directly on OpenSL and\n> you can if you like, but I think it would be of great value to game\n> developers to have the full OpenAL available. So it would be nice to solve\n> this, even if it means writing a script to generate a bunch of dlsym-based\n> function bindings.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/golang/go/issues/9328#issuecomment-76195694>.\n>\n"}}