GitHub PullRequestReviewCommentEvent at 2014-01-25 10:09:46
Repository: emscripten
Actor: juj
Payload: {"comment":{"url":"https://api.github.com/repos/kripken/emscripten/pulls/comments/9170869","id":9170869,"diff_hunk":"@@ -838,6 +893,91 @@ var LibraryOpenAL = {\n     }\n   },\n \n+  alGetListenerf: function(pname, values) {\n+    if (!AL.currentContext) {\n+#if OPENAL_DEBUG\n+      console.error(\"alGetListenerf called without a valid context\");\n+#endif\n+      return;\n+    }\n+    switch (pname) {\n+    case 0x100A /* AL_GAIN */:\n+      {{{ makeSetValue('value', '0', 'AL.currentContext.gain.gain', 'float') }}}\n+      break;\n+    default:\n+      AL.currentContext.err = 0xA002 /* AL_INVALID_ENUM */;\n+      break;\n+    }\n+\n+  },\n+\n+  alGetListenerfv: function(pname, values) {\n+    if (!AL.currentContext) {\n+#if OPENAL_DEBUG\n+      console.error(\"alGetListenerfv called without a valid context\");\n+#endif\n+      return;\n+    }\n+    switch (pname) {\n+    case 0x1004 /* AL_POSITION */:\n+      var position = AL.currentContext.ctx.listener._position || [0,0,0];\n+      {{{ makeSetValue('values', '0', 'position[0]', 'float') }}}\n+      {{{ makeSetValue('values', '4', 'position[1]', 'float') }}}\n+      {{{ makeSetValue('values', '8', 'position[2]', 'float') }}}\n+      break;\n+    case 0x1006 /* AL_VELOCITY */:\n+      var velocity = AL.currentContext.ctx.listener._velocity || [0,0,0];\n+      {{{ makeSetValue('values', '0', 'velocity[0]', 'float') }}}\n+      {{{ makeSetValue('values', '4', 'velocity[1]', 'float') }}}\n+      {{{ makeSetValue('values', '8', 'velocity[2]', 'float') }}}\n+      break;\n+    case 0x100F /* AL_ORIENTATION */:\n+      var orientation = AL.currentContext.ctx.listener._orientation || [0,0,0,0,0,0];\n+      {{{ makeSetValue('values', '0', 'orientation[0]', 'float') }}}\n+      {{{ makeSetValue('values', '4', 'orientation[1]', 'float') }}}\n+      {{{ makeSetValue('values', '8', 'orientation[2]', 'float') }}}\n+      {{{ makeSetValue('values', '12', 'orientation[3]', 'float') }}}\n+      {{{ makeSetValue('values', '16', 'orientation[4]', 'float') }}}\n+      {{{ makeSetValue('values', '20', 'orientation[5]', 'float') }}}\n+      break;\n+    default:\n+#if OPENAL_DEBUG\n+      console.log(\"alGetListenerfv with param \" + param + \" not implemented yet\");\n+#endif\n+      AL.currentContext.err = 0xA002 /* AL_INVALID_ENUM */;\n+      break;\n+    }\n+  },\n+\n+  alGetListeneri: function(pname, values) {\n+  },\n+\n+  alListenerf: function(param, value) {\n+    if (!AL.currentContext) {\n+#if OPENAL_DEBUG\n+      console.error(\"alListenerf called without a valid context\");\n+#endif\n+      return;\n+    }\n+    switch (param) {\n+    case 0x100A /* AL_GAIN */:\n+      AL.currentContext.gain.value = value;\n+      break;\n+    default:\n+#if OPENAL_DEBUG\n+      console.log(\"alListenerf with param \" + param + \" not implemented yet\");\n+#endif\n+      AL.currentContext.err = 0xA002 /* AL_INVALID_ENUM */;\n+      break;\n+    }\n+  },\n+\n+  alEnable: function(param) {\n+  },\n+\n+  alDisable: function(param) {","path":"src/library_openal.js","position":178,"original_position":178,"commit_id":"473b4ea5423b35ab98c742d14c88f8ea240066ec","original_commit_id":"473b4ea5423b35ab98c742d14c88f8ea240066ec","user":{"login":"juj","id":225351,"avatar_url":"https://gravatar.com/avatar/6e5c7ba24b50106c443ffdc1886d3641?d=https%3A%2F%2Fidenticons.github.com%2F4b86072d2b0bfa2a018f94bcd306db8e.png&r=x","gravatar_id":"6e5c7ba24b50106c443ffdc1886d3641","url":"https://api.github.com/users/juj","html_url":"https://github.com/juj","followers_url":"https://api.github.com/users/juj/followers","following_url":"https://api.github.com/users/juj/following{/other_user}","gists_url":"https://api.github.com/users/juj/gists{/gist_id}","starred_url":"https://api.github.com/users/juj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juj/subscriptions","organizations_url":"https://api.github.com/users/juj/orgs","repos_url":"https://api.github.com/users/juj/repos","events_url":"https://api.github.com/users/juj/events{/privacy}","received_events_url":"https://api.github.com/users/juj/received_events","type":"User","site_admin":false},"body":"Runtime.warnOnces?","created_at":"2014-01-25T10:09:46Z","updated_at":"2014-01-25T10:09:46Z","html_url":"https://github.com/kripken/emscripten/pull/2056#discussion_r9170869","pull_request_url":"https://api.github.com/repos/kripken/emscripten/pulls/2056","_links":{"self":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/comments/9170869"},"html":{"href":"https://github.com/kripken/emscripten/pull/2056#discussion_r9170869"},"pull_request":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/2056"}}}}