{"action":"created","comment":{"url":"https://api.github.com/repos/LMMS/lmms/pulls/comments/26365963","id":26365963,"diff_hunk":"@@ -83,11 +83,18 @@ bool BassBoosterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames\n \tif( m_bbControls.m_gainModel.isValueChanged() ) { changeGain(); }\n \tif( m_bbControls.m_ratioModel.isValueChanged() ) { changeRatio(); }\n \n+\tfloat gain = m_bbControls.m_gainModel.value();\n+\tValueBuffer *gainBuffer = m_bbControls.m_gainModel.valueBuffer();\n+\tint gainInc = gainBuffer ? 1 : 0;\n+\tfloat *gainPtr = gainBuffer ? &( gainBuffer->values()[ 0 ] ) : &gain;\n+\n \tdouble outSum = 0.0;\n \tconst float d = dryLevel();\n \tconst float w = wetLevel();\n \tfor( fpp_t f = 0; f < frames; ++f )\n \t{\n+\t\tm_bbFX.leftFX().setGain( *gainPtr );\n+\t\tm_bbFX.rightFX().setGain( *gainPtr );\n \t\toutSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];","path":"plugins/BassBooster/BassBooster.cpp","position":16,"original_position":16,"commit_id":"1cb7336189c23aa5747ce69f015bf9392d5f7211","original_commit_id":"1cb7336189c23aa5747ce69f015bf9392d5f7211","user":{"login":"diizy","id":6368868,"avatar_url":"https://avatars.githubusercontent.com/u/6368868?v=3","gravatar_id":"","url":"https://api.github.com/users/diizy","html_url":"https://github.com/diizy","followers_url":"https://api.github.com/users/diizy/followers","following_url":"https://api.github.com/users/diizy/following{/other_user}","gists_url":"https://api.github.com/users/diizy/gists{/gist_id}","starred_url":"https://api.github.com/users/diizy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diizy/subscriptions","organizations_url":"https://api.github.com/users/diizy/orgs","repos_url":"https://api.github.com/users/diizy/repos","events_url":"https://api.github.com/users/diizy/events{/privacy}","received_events_url":"https://api.github.com/users/diizy/received_events","type":"User","site_admin":false},"body":"hmm, this setGain call causes a lot of overhead since it's a function call. I think in this case it'd be better to use two separate for loops, since we only have one parameter we want to make sample-exact. ","created_at":"2015-03-13T05:36:30Z","updated_at":"2015-03-13T05:36:30Z","html_url":"https://github.com/LMMS/lmms/pull/1802#discussion_r26365963","pull_request_url":"https://api.github.com/repos/LMMS/lmms/pulls/1802","_links":{"self":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/comments/26365963"},"html":{"href":"https://github.com/LMMS/lmms/pull/1802#discussion_r26365963"},"pull_request":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/1802"}}},"pull_request":{"url":"https://api.github.com/repos/LMMS/lmms/pulls/1802","id":30248344,"html_url":"https://github.com/LMMS/lmms/pull/1802","diff_url":"https://github.com/LMMS/lmms/pull/1802.diff","patch_url":"https://github.com/LMMS/lmms/pull/1802.patch","issue_url":"https://api.github.com/repos/LMMS/lmms/issues/1802","number":1802,"state":"open","locked":false,"title":"Enable sample exact controls for BassBoost plugin","user":{"login":"curlymorphic","id":7412852,"avatar_url":"https://avatars.githubusercontent.com/u/7412852?v=3","gravatar_id":"","url":"https://api.github.com/users/curlymorphic","html_url":"https://github.com/curlymorphic","followers_url":"https://api.github.com/users/curlymorphic/followers","following_url":"https://api.github.com/users/curlymorphic/following{/other_user}","gists_url":"https://api.github.com/users/curlymorphic/gists{/gist_id}","starred_url":"https://api.github.com/users/curlymorphic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curlymorphic/subscriptions","organizations_url":"https://api.github.com/users/curlymorphic/orgs","repos_url":"https://api.github.com/users/curlymorphic/repos","events_url":"https://api.github.com/users/curlymorphic/events{/privacy}","received_events_url":"https://api.github.com/users/curlymorphic/received_events","type":"User","site_admin":false},"body":"Enabled the use of sample exactness on gain control.\r\n\r\nAfter checking the m_bbfx_leftFX.getGain() function, It was found\r\nthat this functiomn only sets a member variable, and causes no other\r\nover head, so decided that checking if the value had changed would take more\r\nclock cycles, than the check to see if the value had changhed.","created_at":"2015-03-01T20:39:54Z","updated_at":"2015-03-13T05:36:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a92eb161c0d2f0aaca766b2e5cbd3aa04e1f30ab","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/LMMS/lmms/pulls/1802/commits","review_comments_url":"https://api.github.com/repos/LMMS/lmms/pulls/1802/comments","review_comment_url":"https://api.github.com/repos/LMMS/lmms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LMMS/lmms/issues/1802/comments","statuses_url":"https://api.github.com/repos/LMMS/lmms/statuses/1cb7336189c23aa5747ce69f015bf9392d5f7211","head":{"label":"curlymorphic:saBassBoost","ref":"saBassBoost","sha":"1cb7336189c23aa5747ce69f015bf9392d5f7211","user":{"login":"curlymorphic","id":7412852,"avatar_url":"https://avatars.githubusercontent.com/u/7412852?v=3","gravatar_id":"","url":"https://api.github.com/users/curlymorphic","html_url":"https://github.com/curlymorphic","followers_url":"https://api.github.com/users/curlymorphic/followers","following_url":"https://api.github.com/users/curlymorphic/following{/other_user}","gists_url":"https://api.github.com/users/curlymorphic/gists{/gist_id}","starred_url":"https://api.github.com/users/curlymorphic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curlymorphic/subscriptions","organizations_url":"https://api.github.com/users/curlymorphic/orgs","repos_url":"https://api.github.com/users/curlymorphic/repos","events_url":"https://api.github.com/users/curlymorphic/events{/privacy}","received_events_url":"https://api.github.com/users/curlymorphic/received_events","type":"User","site_admin":false},"repo":{"id":27809321,"name":"lmms","full_name":"curlymorphic/lmms","owner":{"login":"curlymorphic","id":7412852,"avatar_url":"https://avatars.githubusercontent.com/u/7412852?v=3","gravatar_id":"","url":"https://api.github.com/users/curlymorphic","html_url":"https://github.com/curlymorphic","followers_url":"https://api.github.com/users/curlymorphic/followers","following_url":"https://api.github.com/users/curlymorphic/following{/other_user}","gists_url":"https://api.github.com/users/curlymorphic/gists{/gist_id}","starred_url":"https://api.github.com/users/curlymorphic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curlymorphic/subscriptions","organizations_url":"https://api.github.com/users/curlymorphic/orgs","repos_url":"https://api.github.com/users/curlymorphic/repos","events_url":"https://api.github.com/users/curlymorphic/events{/privacy}","received_events_url":"https://api.github.com/users/curlymorphic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/curlymorphic/lmms","description":"cross-platform music production software","fork":true,"url":"https://api.github.com/repos/curlymorphic/lmms","forks_url":"https://api.github.com/repos/curlymorphic/lmms/forks","keys_url":"https://api.github.com/repos/curlymorphic/lmms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/curlymorphic/lmms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/curlymorphic/lmms/teams","hooks_url":"https://api.github.com/repos/curlymorphic/lmms/hooks","issue_events_url":"https://api.github.com/repos/curlymorphic/lmms/issues/events{/number}","events_url":"https://api.github.com/repos/curlymorphic/lmms/events","assignees_url":"https://api.github.com/repos/curlymorphic/lmms/assignees{/user}","branches_url":"https://api.github.com/repos/curlymorphic/lmms/branches{/branch}","tags_url":"https://api.github.com/repos/curlymorphic/lmms/tags","blobs_url":"https://api.github.com/repos/curlymorphic/lmms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/curlymorphic/lmms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/curlymorphic/lmms/git/refs{/sha}","trees_url":"https://api.github.com/repos/curlymorphic/lmms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/curlymorphic/lmms/statuses/{sha}","languages_url":"https://api.github.com/repos/curlymorphic/lmms/languages","stargazers_url":"https://api.github.com/repos/curlymorphic/lmms/stargazers","contributors_url":"https://api.github.com/repos/curlymorphic/lmms/contributors","subscribers_url":"https://api.github.com/repos/curlymorphic/lmms/subscribers","subscription_url":"https://api.github.com/repos/curlymorphic/lmms/subscription","commits_url":"https://api.github.com/repos/curlymorphic/lmms/commits{/sha}","git_commits_url":"https://api.github.com/repos/curlymorphic/lmms/git/commits{/sha}","comments_url":"https://api.github.com/repos/curlymorphic/lmms/comments{/number}","issue_comment_url":"https://api.github.com/repos/curlymorphic/lmms/issues/comments{/number}","contents_url":"https://api.github.com/repos/curlymorphic/lmms/contents/{+path}","compare_url":"https://api.github.com/repos/curlymorphic/lmms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/curlymorphic/lmms/merges","archive_url":"https://api.github.com/repos/curlymorphic/lmms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/curlymorphic/lmms/downloads","issues_url":"https://api.github.com/repos/curlymorphic/lmms/issues{/number}","pulls_url":"https://api.github.com/repos/curlymorphic/lmms/pulls{/number}","milestones_url":"https://api.github.com/repos/curlymorphic/lmms/milestones{/number}","notifications_url":"https://api.github.com/repos/curlymorphic/lmms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/curlymorphic/lmms/labels{/name}","releases_url":"https://api.github.com/repos/curlymorphic/lmms/releases{/id}","created_at":"2014-12-10T08:22:40Z","updated_at":"2014-12-13T16:08:16Z","pushed_at":"2015-03-12T20:01:42Z","git_url":"git://github.com/curlymorphic/lmms.git","ssh_url":"git@github.com:curlymorphic/lmms.git","clone_url":"https://github.com/curlymorphic/lmms.git","svn_url":"https://github.com/curlymorphic/lmms","homepage":"http://lmms.io/","size":59995,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"LMMS:master","ref":"master","sha":"a1ac1dd5e5ab9d0e17258ccaa73fbedf550d1050","user":{"login":"LMMS","id":6363159,"avatar_url":"https://avatars.githubusercontent.com/u/6363159?v=3","gravatar_id":"","url":"https://api.github.com/users/LMMS","html_url":"https://github.com/LMMS","followers_url":"https://api.github.com/users/LMMS/followers","following_url":"https://api.github.com/users/LMMS/following{/other_user}","gists_url":"https://api.github.com/users/LMMS/gists{/gist_id}","starred_url":"https://api.github.com/users/LMMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LMMS/subscriptions","organizations_url":"https://api.github.com/users/LMMS/orgs","repos_url":"https://api.github.com/users/LMMS/repos","events_url":"https://api.github.com/users/LMMS/events{/privacy}","received_events_url":"https://api.github.com/users/LMMS/received_events","type":"Organization","site_admin":false},"repo":{"id":15778896,"name":"lmms","full_name":"LMMS/lmms","owner":{"login":"LMMS","id":6363159,"avatar_url":"https://avatars.githubusercontent.com/u/6363159?v=3","gravatar_id":"","url":"https://api.github.com/users/LMMS","html_url":"https://github.com/LMMS","followers_url":"https://api.github.com/users/LMMS/followers","following_url":"https://api.github.com/users/LMMS/following{/other_user}","gists_url":"https://api.github.com/users/LMMS/gists{/gist_id}","starred_url":"https://api.github.com/users/LMMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LMMS/subscriptions","organizations_url":"https://api.github.com/users/LMMS/orgs","repos_url":"https://api.github.com/users/LMMS/repos","events_url":"https://api.github.com/users/LMMS/events{/privacy}","received_events_url":"https://api.github.com/users/LMMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LMMS/lmms","description":"cross-platform music production software","fork":false,"url":"https://api.github.com/repos/LMMS/lmms","forks_url":"https://api.github.com/repos/LMMS/lmms/forks","keys_url":"https://api.github.com/repos/LMMS/lmms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LMMS/lmms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LMMS/lmms/teams","hooks_url":"https://api.github.com/repos/LMMS/lmms/hooks","issue_events_url":"https://api.github.com/repos/LMMS/lmms/issues/events{/number}","events_url":"https://api.github.com/repos/LMMS/lmms/events","assignees_url":"https://api.github.com/repos/LMMS/lmms/assignees{/user}","branches_url":"https://api.github.com/repos/LMMS/lmms/branches{/branch}","tags_url":"https://api.github.com/repos/LMMS/lmms/tags","blobs_url":"https://api.github.com/repos/LMMS/lmms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LMMS/lmms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LMMS/lmms/git/refs{/sha}","trees_url":"https://api.github.com/repos/LMMS/lmms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LMMS/lmms/statuses/{sha}","languages_url":"https://api.github.com/repos/LMMS/lmms/languages","stargazers_url":"https://api.github.com/repos/LMMS/lmms/stargazers","contributors_url":"https://api.github.com/repos/LMMS/lmms/contributors","subscribers_url":"https://api.github.com/repos/LMMS/lmms/subscribers","subscription_url":"https://api.github.com/repos/LMMS/lmms/subscription","commits_url":"https://api.github.com/repos/LMMS/lmms/commits{/sha}","git_commits_url":"https://api.github.com/repos/LMMS/lmms/git/commits{/sha}","comments_url":"https://api.github.com/repos/LMMS/lmms/comments{/number}","issue_comment_url":"https://api.github.com/repos/LMMS/lmms/issues/comments{/number}","contents_url":"https://api.github.com/repos/LMMS/lmms/contents/{+path}","compare_url":"https://api.github.com/repos/LMMS/lmms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LMMS/lmms/merges","archive_url":"https://api.github.com/repos/LMMS/lmms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LMMS/lmms/downloads","issues_url":"https://api.github.com/repos/LMMS/lmms/issues{/number}","pulls_url":"https://api.github.com/repos/LMMS/lmms/pulls{/number}","milestones_url":"https://api.github.com/repos/LMMS/lmms/milestones{/number}","notifications_url":"https://api.github.com/repos/LMMS/lmms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LMMS/lmms/labels{/name}","releases_url":"https://api.github.com/repos/LMMS/lmms/releases{/id}","created_at":"2014-01-09T20:43:43Z","updated_at":"2015-03-12T13:37:26Z","pushed_at":"2015-03-12T13:37:25Z","git_url":"git://github.com/LMMS/lmms.git","ssh_url":"git@github.com:LMMS/lmms.git","clone_url":"https://github.com/LMMS/lmms.git","svn_url":"https://github.com/LMMS/lmms","homepage":"http://lmms.io/","size":79451,"stargazers_count":326,"watchers_count":326,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":109,"mirror_url":null,"open_issues_count":376,"forks":109,"open_issues":376,"watchers":326,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/1802"},"html":{"href":"https://github.com/LMMS/lmms/pull/1802"},"issue":{"href":"https://api.github.com/repos/LMMS/lmms/issues/1802"},"comments":{"href":"https://api.github.com/repos/LMMS/lmms/issues/1802/comments"},"review_comments":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/1802/comments"},"review_comment":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/1802/commits"},"statuses":{"href":"https://api.github.com/repos/LMMS/lmms/statuses/1cb7336189c23aa5747ce69f015bf9392d5f7211"}}}}