{"action":"created","issue":{"url":"https://api.github.com/repos/mosra/magnum/issues/110","labels_url":"https://api.github.com/repos/mosra/magnum/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/mosra/magnum/issues/110/comments","events_url":"https://api.github.com/repos/mosra/magnum/issues/110/events","html_url":"https://github.com/mosra/magnum/pull/110","id":105567660,"number":110,"title":"[WIP] Audio features","user":{"login":"Squareys","id":1889284,"avatar_url":"https://avatars.githubusercontent.com/u/1889284?v=3","gravatar_id":"","url":"https://api.github.com/users/Squareys","html_url":"https://github.com/Squareys","followers_url":"https://api.github.com/users/Squareys/followers","following_url":"https://api.github.com/users/Squareys/following{/other_user}","gists_url":"https://api.github.com/users/Squareys/gists{/gist_id}","starred_url":"https://api.github.com/users/Squareys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Squareys/subscriptions","organizations_url":"https://api.github.com/users/Squareys/orgs","repos_url":"https://api.github.com/users/Squareys/repos","events_url":"https://api.github.com/users/Squareys/events{/privacy}","received_events_url":"https://api.github.com/users/Squareys/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mosra/magnum/labels/feature","name":"feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-09T10:19:22Z","updated_at":"2015-09-15T19:24:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mosra/magnum/pulls/110","html_url":"https://github.com/mosra/magnum/pull/110","diff_url":"https://github.com/mosra/magnum/pull/110.diff","patch_url":"https://github.com/mosra/magnum/pull/110.patch"},"body":"Hi @mosra, Hi everybody!\r\n\r\nAs discussed, here is a work-in-progress pullrequest for everything related to Audio and SceneGraph.\r\n\r\nTODOs:\r\n - [ ] PlayableGroup\r\n - [ ] Playable\r\n - [ ] Listener\r\n - [ ] Adapt audio-example\r\n\r\nGreetings, Squareys"},"comment":{"url":"https://api.github.com/repos/mosra/magnum/issues/comments/140508056","html_url":"https://github.com/mosra/magnum/pull/110#issuecomment-140508056","issue_url":"https://api.github.com/repos/mosra/magnum/issues/110","id":140508056,"user":{"login":"Squareys","id":1889284,"avatar_url":"https://avatars.githubusercontent.com/u/1889284?v=3","gravatar_id":"","url":"https://api.github.com/users/Squareys","html_url":"https://github.com/Squareys","followers_url":"https://api.github.com/users/Squareys/followers","following_url":"https://api.github.com/users/Squareys/following{/other_user}","gists_url":"https://api.github.com/users/Squareys/gists{/gist_id}","starred_url":"https://api.github.com/users/Squareys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Squareys/subscriptions","organizations_url":"https://api.github.com/users/Squareys/orgs","repos_url":"https://api.github.com/users/Squareys/repos","events_url":"https://api.github.com/users/Squareys/events{/privacy}","received_events_url":"https://api.github.com/users/Squareys/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T19:24:37Z","updated_at":"2015-09-15T19:24:37Z","body":"Wow, first of all: thank you for taking so much time to answer!\r\n\r\nI'd like to suggest one last thing:\r\n\r\n> Doing that in clean() would mean that there needs to be some sort of singleton that ensures only one of these listeners is calling functions on Audio::Renderer at a time. Ugly.\r\n\r\nI see what you mean, but I think there is a way: `Listener` could have one static pointer to a `Listener`, with the sole purpose to track the *active Listener*. It is not singleton, since it does not ensure there is only one instance. On a `setActive()` call, this pointer would be set to the Listener the method is called on and the listener is set to dirty to be updated on the next frame. This would further push\r\n\r\n> What do we want to avoid:\r\n- Doing too much stuff in one frame (i.e. bulk update of audio source positions)\r\n\r\nWould you still consider that ugly? If yes, I will implement as suggested. Since I believe that cinematics is a less common use case than just single-listener for gameplay, I'm kinda trying to avoid the (minor?) performance sacrifice for it (especially for static scenes) ;)\r\n[This function](https://github.com/kcat/openal-soft/blob/d240077bc59ea457e207418d718ebdc503a0156b/Alc/ALu.c#L276) is called after listener transformation change.\r\n\r\n> makeActive() sounds to me like it doesn't need to be called every frame.\r\n\r\nWhich would be the case for the above suggestion, but for the original idea I agree, of course. I think there is no need to comment on further implementation details, I have a pretty good idea of what this should look like now."}}