{"action":"created","comment":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/25129447","id":25129447,"diff_hunk":"@@ -268,6 +274,93 @@ double BeatMap::findNthBeat(double dSamples, int n) const {\n     return -1;\n }\n \n+bool BeatMap::findPrevNextBeats(double dSamples,","path":"src/track/beatmap.cpp","position":30,"original_position":30,"commit_id":"dad2018946ea170e51c1106a8581199509cdde52","original_commit_id":"dad2018946ea170e51c1106a8581199509cdde52","user":{"login":"rryan","id":26527,"avatar_url":"https://avatars.githubusercontent.com/u/26527?v=3","gravatar_id":"","url":"https://api.github.com/users/rryan","html_url":"https://github.com/rryan","followers_url":"https://api.github.com/users/rryan/followers","following_url":"https://api.github.com/users/rryan/following{/other_user}","gists_url":"https://api.github.com/users/rryan/gists{/gist_id}","starred_url":"https://api.github.com/users/rryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rryan/subscriptions","organizations_url":"https://api.github.com/users/rryan/orgs","repos_url":"https://api.github.com/users/rryan/repos","events_url":"https://api.github.com/users/rryan/events{/privacy}","received_events_url":"https://api.github.com/users/rryan/received_events","type":"User","site_admin":false},"body":"It would be nice if we could share the logic between findNthBeat and findPrevNextBeats since for BeatMap it's pretty complicated. What if this was called ```findNthBeats(double dSample, int n1, double* dpBeat1Samples, int n2, double* dpBeat2Samples)``` -- findNthBeat could call that and throw away the 2nd number. Or there could be a helper function that calculates the 3 iterators and then the findPrevNextBeats could do its custom thing. Shrug -- not super urgent so we could wait until after the release to clean up.","created_at":"2015-02-22T05:38:42Z","updated_at":"2015-02-22T05:38:42Z","html_url":"https://github.com/mixxxdj/mixxx/pull/494#discussion_r25129447","pull_request_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/494","_links":{"self":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/25129447"},"html":{"href":"https://github.com/mixxxdj/mixxx/pull/494#discussion_r25129447"},"pull_request":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/494"}}},"pull_request":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/494","id":29649227,"html_url":"https://github.com/mixxxdj/mixxx/pull/494","diff_url":"https://github.com/mixxxdj/mixxx/pull/494.diff","patch_url":"https://github.com/mixxxdj/mixxx/pull/494.patch","issue_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/494","number":494,"state":"open","locked":false,"title":"Implement findPrevNextBeats to reduce Beats mutex locking.","user":{"login":"ywwg","id":888940,"avatar_url":"https://avatars.githubusercontent.com/u/888940?v=3","gravatar_id":"","url":"https://api.github.com/users/ywwg","html_url":"https://github.com/ywwg","followers_url":"https://api.github.com/users/ywwg/followers","following_url":"https://api.github.com/users/ywwg/following{/other_user}","gists_url":"https://api.github.com/users/ywwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ywwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywwg/subscriptions","organizations_url":"https://api.github.com/users/ywwg/orgs","repos_url":"https://api.github.com/users/ywwg/repos","events_url":"https://api.github.com/users/ywwg/events{/privacy}","received_events_url":"https://api.github.com/users/ywwg/received_events","type":"User","site_admin":false},"body":"Change paired calls to findnext and findprev to use the new function.\r\nAdded tests to confirm it works as intended.","created_at":"2015-02-19T21:10:58Z","updated_at":"2015-02-22T05:38:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6bb6da785a488f019049aa481193c81f5f4f9022","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/494/commits","review_comments_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/494/comments","review_comment_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/494/comments","statuses_url":"https://api.github.com/repos/mixxxdj/mixxx/statuses/dad2018946ea170e51c1106a8581199509cdde52","head":{"label":"ywwg:beat-prev-next","ref":"beat-prev-next","sha":"dad2018946ea170e51c1106a8581199509cdde52","user":{"login":"ywwg","id":888940,"avatar_url":"https://avatars.githubusercontent.com/u/888940?v=3","gravatar_id":"","url":"https://api.github.com/users/ywwg","html_url":"https://github.com/ywwg","followers_url":"https://api.github.com/users/ywwg/followers","following_url":"https://api.github.com/users/ywwg/following{/other_user}","gists_url":"https://api.github.com/users/ywwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ywwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywwg/subscriptions","organizations_url":"https://api.github.com/users/ywwg/orgs","repos_url":"https://api.github.com/users/ywwg/repos","events_url":"https://api.github.com/users/ywwg/events{/privacy}","received_events_url":"https://api.github.com/users/ywwg/received_events","type":"User","site_admin":false},"repo":{"id":10135825,"name":"mixxx","full_name":"ywwg/mixxx","owner":{"login":"ywwg","id":888940,"avatar_url":"https://avatars.githubusercontent.com/u/888940?v=3","gravatar_id":"","url":"https://api.github.com/users/ywwg","html_url":"https://github.com/ywwg","followers_url":"https://api.github.com/users/ywwg/followers","following_url":"https://api.github.com/users/ywwg/following{/other_user}","gists_url":"https://api.github.com/users/ywwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ywwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywwg/subscriptions","organizations_url":"https://api.github.com/users/ywwg/orgs","repos_url":"https://api.github.com/users/ywwg/repos","events_url":"https://api.github.com/users/ywwg/events{/privacy}","received_events_url":"https://api.github.com/users/ywwg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ywwg/mixxx","description":"Personal work branches for the mixxx project -- you may be interested in DJO-hacks-trunk, which contains a bunch of UNSUPPORTED tweaks I like","fork":true,"url":"https://api.github.com/repos/ywwg/mixxx","forks_url":"https://api.github.com/repos/ywwg/mixxx/forks","keys_url":"https://api.github.com/repos/ywwg/mixxx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ywwg/mixxx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ywwg/mixxx/teams","hooks_url":"https://api.github.com/repos/ywwg/mixxx/hooks","issue_events_url":"https://api.github.com/repos/ywwg/mixxx/issues/events{/number}","events_url":"https://api.github.com/repos/ywwg/mixxx/events","assignees_url":"https://api.github.com/repos/ywwg/mixxx/assignees{/user}","branches_url":"https://api.github.com/repos/ywwg/mixxx/branches{/branch}","tags_url":"https://api.github.com/repos/ywwg/mixxx/tags","blobs_url":"https://api.github.com/repos/ywwg/mixxx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ywwg/mixxx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ywwg/mixxx/git/refs{/sha}","trees_url":"https://api.github.com/repos/ywwg/mixxx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ywwg/mixxx/statuses/{sha}","languages_url":"https://api.github.com/repos/ywwg/mixxx/languages","stargazers_url":"https://api.github.com/repos/ywwg/mixxx/stargazers","contributors_url":"https://api.github.com/repos/ywwg/mixxx/contributors","subscribers_url":"https://api.github.com/repos/ywwg/mixxx/subscribers","subscription_url":"https://api.github.com/repos/ywwg/mixxx/subscription","commits_url":"https://api.github.com/repos/ywwg/mixxx/commits{/sha}","git_commits_url":"https://api.github.com/repos/ywwg/mixxx/git/commits{/sha}","comments_url":"https://api.github.com/repos/ywwg/mixxx/comments{/number}","issue_comment_url":"https://api.github.com/repos/ywwg/mixxx/issues/comments{/number}","contents_url":"https://api.github.com/repos/ywwg/mixxx/contents/{+path}","compare_url":"https://api.github.com/repos/ywwg/mixxx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ywwg/mixxx/merges","archive_url":"https://api.github.com/repos/ywwg/mixxx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ywwg/mixxx/downloads","issues_url":"https://api.github.com/repos/ywwg/mixxx/issues{/number}","pulls_url":"https://api.github.com/repos/ywwg/mixxx/pulls{/number}","milestones_url":"https://api.github.com/repos/ywwg/mixxx/milestones{/number}","notifications_url":"https://api.github.com/repos/ywwg/mixxx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ywwg/mixxx/labels{/name}","releases_url":"https://api.github.com/repos/ywwg/mixxx/releases{/id}","created_at":"2013-05-18T02:52:01Z","updated_at":"2015-02-20T22:28:35Z","pushed_at":"2015-02-21T21:35:52Z","git_url":"git://github.com/ywwg/mixxx.git","ssh_url":"git@github.com:ywwg/mixxx.git","clone_url":"https://github.com/ywwg/mixxx.git","svn_url":"https://github.com/ywwg/mixxx","homepage":"","size":240678,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"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":"mixxxdj:master","ref":"master","sha":"80bd3b35ea2ea79f83a957d56da047957a027f1d","user":{"login":"mixxxdj","id":1743769,"avatar_url":"https://avatars.githubusercontent.com/u/1743769?v=3","gravatar_id":"","url":"https://api.github.com/users/mixxxdj","html_url":"https://github.com/mixxxdj","followers_url":"https://api.github.com/users/mixxxdj/followers","following_url":"https://api.github.com/users/mixxxdj/following{/other_user}","gists_url":"https://api.github.com/users/mixxxdj/gists{/gist_id}","starred_url":"https://api.github.com/users/mixxxdj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mixxxdj/subscriptions","organizations_url":"https://api.github.com/users/mixxxdj/orgs","repos_url":"https://api.github.com/users/mixxxdj/repos","events_url":"https://api.github.com/users/mixxxdj/events{/privacy}","received_events_url":"https://api.github.com/users/mixxxdj/received_events","type":"Organization","site_admin":false},"repo":{"id":10126031,"name":"mixxx","full_name":"mixxxdj/mixxx","owner":{"login":"mixxxdj","id":1743769,"avatar_url":"https://avatars.githubusercontent.com/u/1743769?v=3","gravatar_id":"","url":"https://api.github.com/users/mixxxdj","html_url":"https://github.com/mixxxdj","followers_url":"https://api.github.com/users/mixxxdj/followers","following_url":"https://api.github.com/users/mixxxdj/following{/other_user}","gists_url":"https://api.github.com/users/mixxxdj/gists{/gist_id}","starred_url":"https://api.github.com/users/mixxxdj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mixxxdj/subscriptions","organizations_url":"https://api.github.com/users/mixxxdj/orgs","repos_url":"https://api.github.com/users/mixxxdj/repos","events_url":"https://api.github.com/users/mixxxdj/events{/privacy}","received_events_url":"https://api.github.com/users/mixxxdj/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mixxxdj/mixxx","description":"Mixxx is Free DJ software that gives you everything you need to perform live mixes.","fork":false,"url":"https://api.github.com/repos/mixxxdj/mixxx","forks_url":"https://api.github.com/repos/mixxxdj/mixxx/forks","keys_url":"https://api.github.com/repos/mixxxdj/mixxx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mixxxdj/mixxx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mixxxdj/mixxx/teams","hooks_url":"https://api.github.com/repos/mixxxdj/mixxx/hooks","issue_events_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/events{/number}","events_url":"https://api.github.com/repos/mixxxdj/mixxx/events","assignees_url":"https://api.github.com/repos/mixxxdj/mixxx/assignees{/user}","branches_url":"https://api.github.com/repos/mixxxdj/mixxx/branches{/branch}","tags_url":"https://api.github.com/repos/mixxxdj/mixxx/tags","blobs_url":"https://api.github.com/repos/mixxxdj/mixxx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mixxxdj/mixxx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mixxxdj/mixxx/git/refs{/sha}","trees_url":"https://api.github.com/repos/mixxxdj/mixxx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mixxxdj/mixxx/statuses/{sha}","languages_url":"https://api.github.com/repos/mixxxdj/mixxx/languages","stargazers_url":"https://api.github.com/repos/mixxxdj/mixxx/stargazers","contributors_url":"https://api.github.com/repos/mixxxdj/mixxx/contributors","subscribers_url":"https://api.github.com/repos/mixxxdj/mixxx/subscribers","subscription_url":"https://api.github.com/repos/mixxxdj/mixxx/subscription","commits_url":"https://api.github.com/repos/mixxxdj/mixxx/commits{/sha}","git_commits_url":"https://api.github.com/repos/mixxxdj/mixxx/git/commits{/sha}","comments_url":"https://api.github.com/repos/mixxxdj/mixxx/comments{/number}","issue_comment_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/comments{/number}","contents_url":"https://api.github.com/repos/mixxxdj/mixxx/contents/{+path}","compare_url":"https://api.github.com/repos/mixxxdj/mixxx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mixxxdj/mixxx/merges","archive_url":"https://api.github.com/repos/mixxxdj/mixxx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mixxxdj/mixxx/downloads","issues_url":"https://api.github.com/repos/mixxxdj/mixxx/issues{/number}","pulls_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls{/number}","milestones_url":"https://api.github.com/repos/mixxxdj/mixxx/milestones{/number}","notifications_url":"https://api.github.com/repos/mixxxdj/mixxx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mixxxdj/mixxx/labels{/name}","releases_url":"https://api.github.com/repos/mixxxdj/mixxx/releases{/id}","created_at":"2013-05-17T15:14:38Z","updated_at":"2015-02-22T04:46:30Z","pushed_at":"2015-02-22T04:46:30Z","git_url":"git://github.com/mixxxdj/mixxx.git","ssh_url":"git@github.com:mixxxdj/mixxx.git","clone_url":"https://github.com/mixxxdj/mixxx.git","svn_url":"https://github.com/mixxxdj/mixxx","homepage":"http://mixxx.org","size":313293,"stargazers_count":241,"watchers_count":241,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":194,"mirror_url":null,"open_issues_count":37,"forks":194,"open_issues":37,"watchers":241,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/494"},"html":{"href":"https://github.com/mixxxdj/mixxx/pull/494"},"issue":{"href":"https://api.github.com/repos/mixxxdj/mixxx/issues/494"},"comments":{"href":"https://api.github.com/repos/mixxxdj/mixxx/issues/494/comments"},"review_comments":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/494/comments"},"review_comment":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/494/commits"},"statuses":{"href":"https://api.github.com/repos/mixxxdj/mixxx/statuses/dad2018946ea170e51c1106a8581199509cdde52"}}}}