{"action":"created","comment":{"url":"https://api.github.com/repos/tux3/qTox/pulls/comments/64480226","id":64480226,"diff_hunk":"@@ -251,6 +259,8 @@ bool Audio::initInput(QString inDevDescr)\n         return false;\n     }\n \n+    privateSetGain(Settings::getInstance().getInVolume());","path":"src/audio/audio.cpp","position":75,"original_position":75,"commit_id":"1f0965d9d481bfbfa23c3140bdef7454a93061cb","original_commit_id":"1f0965d9d481bfbfa23c3140bdef7454a93061cb","user":{"login":"antis81","id":440517,"avatar_url":"https://avatars.githubusercontent.com/u/440517?v=3","gravatar_id":"","url":"https://api.github.com/users/antis81","html_url":"https://github.com/antis81","followers_url":"https://api.github.com/users/antis81/followers","following_url":"https://api.github.com/users/antis81/following{/other_user}","gists_url":"https://api.github.com/users/antis81/gists{/gist_id}","starred_url":"https://api.github.com/users/antis81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antis81/subscriptions","organizations_url":"https://api.github.com/users/antis81/orgs","repos_url":"https://api.github.com/users/antis81/repos","events_url":"https://api.github.com/users/antis81/events{/privacy}","received_events_url":"https://api.github.com/users/antis81/received_events","type":"User","site_admin":false},"body":"Yes, that's totally ok. I guess it makes sense adding a (probably customizable) `minGain/maxGain` values to Audio API, defaulting to +-30dB.","created_at":"2016-05-24T21:45:00Z","updated_at":"2016-05-24T21:45:00Z","html_url":"https://github.com/tux3/qTox/pull/3311#discussion_r64480226","pull_request_url":"https://api.github.com/repos/tux3/qTox/pulls/3311","_links":{"self":{"href":"https://api.github.com/repos/tux3/qTox/pulls/comments/64480226"},"html":{"href":"https://github.com/tux3/qTox/pull/3311#discussion_r64480226"},"pull_request":{"href":"https://api.github.com/repos/tux3/qTox/pulls/3311"}}},"pull_request":{"url":"https://api.github.com/repos/tux3/qTox/pulls/3311","id":70253141,"html_url":"https://github.com/tux3/qTox/pull/3311","diff_url":"https://github.com/tux3/qTox/pull/3311.diff","patch_url":"https://github.com/tux3/qTox/pull/3311.patch","issue_url":"https://api.github.com/repos/tux3/qTox/issues/3311","number":3311,"state":"open","locked":false,"title":"feat(audio): add real gain control of the input device","user":{"login":"antis81","id":440517,"avatar_url":"https://avatars.githubusercontent.com/u/440517?v=3","gravatar_id":"","url":"https://api.github.com/users/antis81","html_url":"https://github.com/antis81","followers_url":"https://api.github.com/users/antis81/followers","following_url":"https://api.github.com/users/antis81/following{/other_user}","gists_url":"https://api.github.com/users/antis81/gists{/gist_id}","starred_url":"https://api.github.com/users/antis81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antis81/subscriptions","organizations_url":"https://api.github.com/users/antis81/orgs","repos_url":"https://api.github.com/users/antis81/repos","events_url":"https://api.github.com/users/antis81/events{/privacy}","received_events_url":"https://api.github.com/users/antis81/received_events","type":"User","site_admin":false},"body":"This PR might put a smile on some qTox user's faces as it brings into play some long awaited feature. We now have a usable and controllable **Audio Gain**, no really! :smile:\r\n\r\nThe gain is calculated with the common `10*log10()` algorithm, which is normally used for dB calculation of the electrical power level - and it gives pretty good results. Values can be set via qTox's public Audio API as percentage values (between 0 and 1).\r\n\r\nNote: This PR also brings back const-correctness to `Audio`; some minor cleanup with naming conventions also included.\r\n\r\n:warning: **Important:** As this has quite an impact on qTox's Audio experience --> Anyone who is able to compile qTox is invited to try this PR from a users view point!\r\n\r\nOn my system I'm using the following values with splendid results (checked vs. [Tox EchoBot](https://toxme.io/u/echobot)):\r\n\r\n* System settings:\r\n    * Master Volume: ~80%\r\n    * Gain: ~50% (~10dB)\r\n* qTox Audio Settings:\r\n    * Master volume: ~70-75%\r\n    * Gain: ~50-65%\r\n\r\n**TODO:**\r\n\r\n- [ ] Change label text in A/V settings to \"Input gain\" or only \"Gain\".\r\n- [ ] Add tick marker in slider at \"unity gain\" level.\r\n\r\nHave fun talking and probing this!","created_at":"2016-05-16T20:10:01Z","updated_at":"2016-05-24T21:45:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5157015e029cf0ab3566fed7984c5a40f55f72a8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tux3/qTox/pulls/3311/commits","review_comments_url":"https://api.github.com/repos/tux3/qTox/pulls/3311/comments","review_comment_url":"https://api.github.com/repos/tux3/qTox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tux3/qTox/issues/3311/comments","statuses_url":"https://api.github.com/repos/tux3/qTox/statuses/1f0965d9d481bfbfa23c3140bdef7454a93061cb","head":{"label":"antis81:audio/gain","ref":"audio/gain","sha":"1f0965d9d481bfbfa23c3140bdef7454a93061cb","user":{"login":"antis81","id":440517,"avatar_url":"https://avatars.githubusercontent.com/u/440517?v=3","gravatar_id":"","url":"https://api.github.com/users/antis81","html_url":"https://github.com/antis81","followers_url":"https://api.github.com/users/antis81/followers","following_url":"https://api.github.com/users/antis81/following{/other_user}","gists_url":"https://api.github.com/users/antis81/gists{/gist_id}","starred_url":"https://api.github.com/users/antis81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antis81/subscriptions","organizations_url":"https://api.github.com/users/antis81/orgs","repos_url":"https://api.github.com/users/antis81/repos","events_url":"https://api.github.com/users/antis81/events{/privacy}","received_events_url":"https://api.github.com/users/antis81/received_events","type":"User","site_admin":false},"repo":{"id":40208997,"name":"qTox","full_name":"antis81/qTox","owner":{"login":"antis81","id":440517,"avatar_url":"https://avatars.githubusercontent.com/u/440517?v=3","gravatar_id":"","url":"https://api.github.com/users/antis81","html_url":"https://github.com/antis81","followers_url":"https://api.github.com/users/antis81/followers","following_url":"https://api.github.com/users/antis81/following{/other_user}","gists_url":"https://api.github.com/users/antis81/gists{/gist_id}","starred_url":"https://api.github.com/users/antis81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antis81/subscriptions","organizations_url":"https://api.github.com/users/antis81/orgs","repos_url":"https://api.github.com/users/antis81/repos","events_url":"https://api.github.com/users/antis81/events{/privacy}","received_events_url":"https://api.github.com/users/antis81/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antis81/qTox","description":"Powerful Tox client that follows the Tox design guidelines.","fork":true,"url":"https://api.github.com/repos/antis81/qTox","forks_url":"https://api.github.com/repos/antis81/qTox/forks","keys_url":"https://api.github.com/repos/antis81/qTox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antis81/qTox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antis81/qTox/teams","hooks_url":"https://api.github.com/repos/antis81/qTox/hooks","issue_events_url":"https://api.github.com/repos/antis81/qTox/issues/events{/number}","events_url":"https://api.github.com/repos/antis81/qTox/events","assignees_url":"https://api.github.com/repos/antis81/qTox/assignees{/user}","branches_url":"https://api.github.com/repos/antis81/qTox/branches{/branch}","tags_url":"https://api.github.com/repos/antis81/qTox/tags","blobs_url":"https://api.github.com/repos/antis81/qTox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antis81/qTox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antis81/qTox/git/refs{/sha}","trees_url":"https://api.github.com/repos/antis81/qTox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antis81/qTox/statuses/{sha}","languages_url":"https://api.github.com/repos/antis81/qTox/languages","stargazers_url":"https://api.github.com/repos/antis81/qTox/stargazers","contributors_url":"https://api.github.com/repos/antis81/qTox/contributors","subscribers_url":"https://api.github.com/repos/antis81/qTox/subscribers","subscription_url":"https://api.github.com/repos/antis81/qTox/subscription","commits_url":"https://api.github.com/repos/antis81/qTox/commits{/sha}","git_commits_url":"https://api.github.com/repos/antis81/qTox/git/commits{/sha}","comments_url":"https://api.github.com/repos/antis81/qTox/comments{/number}","issue_comment_url":"https://api.github.com/repos/antis81/qTox/issues/comments{/number}","contents_url":"https://api.github.com/repos/antis81/qTox/contents/{+path}","compare_url":"https://api.github.com/repos/antis81/qTox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antis81/qTox/merges","archive_url":"https://api.github.com/repos/antis81/qTox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antis81/qTox/downloads","issues_url":"https://api.github.com/repos/antis81/qTox/issues{/number}","pulls_url":"https://api.github.com/repos/antis81/qTox/pulls{/number}","milestones_url":"https://api.github.com/repos/antis81/qTox/milestones{/number}","notifications_url":"https://api.github.com/repos/antis81/qTox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antis81/qTox/labels{/name}","releases_url":"https://api.github.com/repos/antis81/qTox/releases{/id}","deployments_url":"https://api.github.com/repos/antis81/qTox/deployments","created_at":"2015-08-04T21:03:49Z","updated_at":"2015-09-26T06:45:21Z","pushed_at":"2016-05-23T23:49:40Z","git_url":"git://github.com/antis81/qTox.git","ssh_url":"git@github.com:antis81/qTox.git","clone_url":"https://github.com/antis81/qTox.git","svn_url":"https://github.com/antis81/qTox","homepage":"http://utoxisfinished.info","size":17146,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tux3:master","ref":"master","sha":"75c72a4ebd1fdc75ff3bbf8cbcac49ef8df39fcf","user":{"login":"tux3","id":5155966,"avatar_url":"https://avatars.githubusercontent.com/u/5155966?v=3","gravatar_id":"","url":"https://api.github.com/users/tux3","html_url":"https://github.com/tux3","followers_url":"https://api.github.com/users/tux3/followers","following_url":"https://api.github.com/users/tux3/following{/other_user}","gists_url":"https://api.github.com/users/tux3/gists{/gist_id}","starred_url":"https://api.github.com/users/tux3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tux3/subscriptions","organizations_url":"https://api.github.com/users/tux3/orgs","repos_url":"https://api.github.com/users/tux3/repos","events_url":"https://api.github.com/users/tux3/events{/privacy}","received_events_url":"https://api.github.com/users/tux3/received_events","type":"User","site_admin":false},"repo":{"id":21179164,"name":"qTox","full_name":"tux3/qTox","owner":{"login":"tux3","id":5155966,"avatar_url":"https://avatars.githubusercontent.com/u/5155966?v=3","gravatar_id":"","url":"https://api.github.com/users/tux3","html_url":"https://github.com/tux3","followers_url":"https://api.github.com/users/tux3/followers","following_url":"https://api.github.com/users/tux3/following{/other_user}","gists_url":"https://api.github.com/users/tux3/gists{/gist_id}","starred_url":"https://api.github.com/users/tux3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tux3/subscriptions","organizations_url":"https://api.github.com/users/tux3/orgs","repos_url":"https://api.github.com/users/tux3/repos","events_url":"https://api.github.com/users/tux3/events{/privacy}","received_events_url":"https://api.github.com/users/tux3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tux3/qTox","description":"Powerful Tox chat client that follows the Tox design guidelines.","fork":false,"url":"https://api.github.com/repos/tux3/qTox","forks_url":"https://api.github.com/repos/tux3/qTox/forks","keys_url":"https://api.github.com/repos/tux3/qTox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tux3/qTox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tux3/qTox/teams","hooks_url":"https://api.github.com/repos/tux3/qTox/hooks","issue_events_url":"https://api.github.com/repos/tux3/qTox/issues/events{/number}","events_url":"https://api.github.com/repos/tux3/qTox/events","assignees_url":"https://api.github.com/repos/tux3/qTox/assignees{/user}","branches_url":"https://api.github.com/repos/tux3/qTox/branches{/branch}","tags_url":"https://api.github.com/repos/tux3/qTox/tags","blobs_url":"https://api.github.com/repos/tux3/qTox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tux3/qTox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tux3/qTox/git/refs{/sha}","trees_url":"https://api.github.com/repos/tux3/qTox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tux3/qTox/statuses/{sha}","languages_url":"https://api.github.com/repos/tux3/qTox/languages","stargazers_url":"https://api.github.com/repos/tux3/qTox/stargazers","contributors_url":"https://api.github.com/repos/tux3/qTox/contributors","subscribers_url":"https://api.github.com/repos/tux3/qTox/subscribers","subscription_url":"https://api.github.com/repos/tux3/qTox/subscription","commits_url":"https://api.github.com/repos/tux3/qTox/commits{/sha}","git_commits_url":"https://api.github.com/repos/tux3/qTox/git/commits{/sha}","comments_url":"https://api.github.com/repos/tux3/qTox/comments{/number}","issue_comment_url":"https://api.github.com/repos/tux3/qTox/issues/comments{/number}","contents_url":"https://api.github.com/repos/tux3/qTox/contents/{+path}","compare_url":"https://api.github.com/repos/tux3/qTox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tux3/qTox/merges","archive_url":"https://api.github.com/repos/tux3/qTox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tux3/qTox/downloads","issues_url":"https://api.github.com/repos/tux3/qTox/issues{/number}","pulls_url":"https://api.github.com/repos/tux3/qTox/pulls{/number}","milestones_url":"https://api.github.com/repos/tux3/qTox/milestones{/number}","notifications_url":"https://api.github.com/repos/tux3/qTox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tux3/qTox/labels{/name}","releases_url":"https://api.github.com/repos/tux3/qTox/releases{/id}","deployments_url":"https://api.github.com/repos/tux3/qTox/deployments","created_at":"2014-06-24T20:09:04Z","updated_at":"2016-05-24T19:07:23Z","pushed_at":"2016-05-24T20:16:45Z","git_url":"git://github.com/tux3/qTox.git","ssh_url":"git@github.com:tux3/qTox.git","clone_url":"https://github.com/tux3/qTox.git","svn_url":"https://github.com/tux3/qTox","homepage":"","size":22012,"stargazers_count":938,"watchers_count":938,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":274,"mirror_url":null,"open_issues_count":490,"forks":274,"open_issues":490,"watchers":938,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tux3/qTox/pulls/3311"},"html":{"href":"https://github.com/tux3/qTox/pull/3311"},"issue":{"href":"https://api.github.com/repos/tux3/qTox/issues/3311"},"comments":{"href":"https://api.github.com/repos/tux3/qTox/issues/3311/comments"},"review_comments":{"href":"https://api.github.com/repos/tux3/qTox/pulls/3311/comments"},"review_comment":{"href":"https://api.github.com/repos/tux3/qTox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tux3/qTox/pulls/3311/commits"},"statuses":{"href":"https://api.github.com/repos/tux3/qTox/statuses/1f0965d9d481bfbfa23c3140bdef7454a93061cb"}}}}
{"actor":{"display_login":"antis81"}}