{"action":"created","comment":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/25173174","id":25173174,"diff_hunk":"@@ -126,68 +128,104 @@ class EngineMaster : public QObject, public AudioSource {\n     }\n \n     struct ChannelInfo {\n-        ChannelInfo()\n+        ChannelInfo(int index)\n                 : m_pChannel(NULL),\n                   m_pBuffer(NULL),\n                   m_pVolumeControl(NULL),\n-                  m_pMuteControl(NULL) {\n+                  m_pMuteControl(NULL),\n+                  m_index(index) {\n         }\n         EngineChannel* m_pChannel;\n         CSAMPLE* m_pBuffer;\n         ControlObject* m_pVolumeControl;\n         ControlPushButton* m_pMuteControl;\n+        int m_index;\n+    };\n+\n+    struct GainCache {\n+        CSAMPLE m_gain;\n+        bool m_fadeout;\n     };\n \n     class GainCalculator {\n       public:\n         virtual double getGain(ChannelInfo* pChannelInfo) const = 0;\n     };\n-    class ConstantGainCalculator : public GainCalculator {\n+    class PflGainCalculator : public GainCalculator {\n       public:\n         inline double getGain(ChannelInfo* pChannelInfo) const {\n-            return pChannelInfo->m_pChannel->isTalkover() ? m_dTalkoverGain : m_dGain;\n+            Q_UNUSED(pChannelInfo);\n+            return m_dGain;\n         }\n         inline void setGain(double dGain) {\n             m_dGain = dGain;\n         }\n-        inline void setTalkoverGain(double dGain) {\n-            m_dTalkoverGain = dGain;\n-        }\n       private:\n         double m_dGain;\n-        double m_dTalkoverGain;\n+    };\n+    class TalkoverGainCalculator : public GainCalculator {\n+      public:\n+        inline double getGain(ChannelInfo* pChannelInfo) const {\n+            Q_UNUSED(pChannelInfo);\n+            return 1.0;\n+        }\n     };\n     class OrientationVolumeGainCalculator : public GainCalculator {\n       public:\n         OrientationVolumeGainCalculator()\n-                : m_dVolume(1.0), m_dLeftGain(1.0), m_dCenterGain(1.0), m_dRightGain(1.0),\n-                  m_dTalkoverGain(1.0) { }\n+                : m_dVolume(1.0),\n+                  m_dLeftGain(1.0),\n+                  m_dCenterGain(1.0),\n+                  m_dRightGain(1.0) {\n+        }\n \n         inline double getGain(ChannelInfo* pChannelInfo) const {\n-            if (pChannelInfo->m_pMuteControl->get() > 0.0) {\n-                return 0.0;\n-            }\n-            if (pChannelInfo->m_pChannel->isTalkover()) {\n-                return m_dTalkoverGain;\n-            }\n             const double channelVolume = pChannelInfo->m_pVolumeControl->get();\n             const double orientationGain = EngineMaster::gainForOrientation(\n-                pChannelInfo->m_pChannel->getOrientation(),\n-                m_dLeftGain, m_dCenterGain, m_dRightGain);\n+                    pChannelInfo->m_pChannel->getOrientation(),\n+                    m_dLeftGain, m_dCenterGain, m_dRightGain);\n             return m_dVolume * channelVolume * orientationGain;\n         }\n \n-        inline void setGains(double dVolume, double leftGain, double centerGain, double rightGain,\n-                             double talkoverGain) {\n+        inline void setGains(double dVolume, double leftGain,\n+                double centerGain, double rightGain) {\n             m_dVolume = dVolume;\n             m_dLeftGain = leftGain;\n             m_dCenterGain = centerGain;\n             m_dRightGain = rightGain;\n-            m_dTalkoverGain = talkoverGain;\n         }\n \n       private:\n-        double m_dVolume, m_dLeftGain, m_dCenterGain, m_dRightGain, m_dTalkoverGain;\n+        double m_dVolume;\n+        double m_dLeftGain;\n+        double m_dCenterGain;\n+        double m_dRightGain;\n+    };\n+    template<typename T, unsigned int CAPACITY>\n+    class FastVector {","path":"src/engine/enginemaster.h","position":109,"original_position":109,"commit_id":"ae86f856697dcca4dfbcf83d6ac87baa621e8acc","original_commit_id":"db6de86791398ec48e333d837f7b5027071cb9f6","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":"> I have actually started to introduce QVarLengthArray, but it feels stupid to code around the lenght check like ->data()[i], which will reintroduce the same problems with complex types you have pointed out.\r\n\r\n```->data()[i]``` instead of accessors doesn't have any complex type problems -- trying to replace ```append``` or ```replace``` would though.","created_at":"2015-02-23T15:40:25Z","updated_at":"2015-02-23T15:40:25Z","html_url":"https://github.com/mixxxdj/mixxx/pull/474#discussion_r25173174","pull_request_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/474","_links":{"self":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/25173174"},"html":{"href":"https://github.com/mixxxdj/mixxx/pull/474#discussion_r25173174"},"pull_request":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/474"}}},"pull_request":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/474","id":27999925,"html_url":"https://github.com/mixxxdj/mixxx/pull/474","diff_url":"https://github.com/mixxxdj/mixxx/pull/474.diff","patch_url":"https://github.com/mixxxdj/mixxx/pull/474.patch","issue_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/474","number":474,"state":"open","locked":false,"title":"Mic output to sidechain only","user":{"login":"daschuer","id":1777442,"avatar_url":"https://avatars.githubusercontent.com/u/1777442?v=3","gravatar_id":"","url":"https://api.github.com/users/daschuer","html_url":"https://github.com/daschuer","followers_url":"https://api.github.com/users/daschuer/followers","following_url":"https://api.github.com/users/daschuer/following{/other_user}","gists_url":"https://api.github.com/users/daschuer/gists{/gist_id}","starred_url":"https://api.github.com/users/daschuer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daschuer/subscriptions","organizations_url":"https://api.github.com/users/daschuer/orgs","repos_url":"https://api.github.com/users/daschuer/repos","events_url":"https://api.github.com/users/daschuer/events{/privacy}","received_events_url":"https://api.github.com/users/daschuer/received_events","type":"User","site_admin":false},"body":"This is a first step towards a preference options that allows to remove the mic from the master output. \r\nIt implements option 2. of https://bugs.launchpad.net/mixxx/+bug/1414483","created_at":"2015-01-25T23:11:12Z","updated_at":"2015-02-23T15:40:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4a286e82d6879eda258619f6c17b6d80a6e9538","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/474/commits","review_comments_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/474/comments","review_comment_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/474/comments","statuses_url":"https://api.github.com/repos/mixxxdj/mixxx/statuses/ae86f856697dcca4dfbcf83d6ac87baa621e8acc","head":{"label":"daschuer:micsidechain","ref":"micsidechain","sha":"ae86f856697dcca4dfbcf83d6ac87baa621e8acc","user":{"login":"daschuer","id":1777442,"avatar_url":"https://avatars.githubusercontent.com/u/1777442?v=3","gravatar_id":"","url":"https://api.github.com/users/daschuer","html_url":"https://github.com/daschuer","followers_url":"https://api.github.com/users/daschuer/followers","following_url":"https://api.github.com/users/daschuer/following{/other_user}","gists_url":"https://api.github.com/users/daschuer/gists{/gist_id}","starred_url":"https://api.github.com/users/daschuer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daschuer/subscriptions","organizations_url":"https://api.github.com/users/daschuer/orgs","repos_url":"https://api.github.com/users/daschuer/repos","events_url":"https://api.github.com/users/daschuer/events{/privacy}","received_events_url":"https://api.github.com/users/daschuer/received_events","type":"User","site_admin":false},"repo":{"id":10669071,"name":"mixxx","full_name":"daschuer/mixxx","owner":{"login":"daschuer","id":1777442,"avatar_url":"https://avatars.githubusercontent.com/u/1777442?v=3","gravatar_id":"","url":"https://api.github.com/users/daschuer","html_url":"https://github.com/daschuer","followers_url":"https://api.github.com/users/daschuer/followers","following_url":"https://api.github.com/users/daschuer/following{/other_user}","gists_url":"https://api.github.com/users/daschuer/gists{/gist_id}","starred_url":"https://api.github.com/users/daschuer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daschuer/subscriptions","organizations_url":"https://api.github.com/users/daschuer/orgs","repos_url":"https://api.github.com/users/daschuer/repos","events_url":"https://api.github.com/users/daschuer/events{/privacy}","received_events_url":"https://api.github.com/users/daschuer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daschuer/mixxx","description":"Mixxx is Free DJ software that gives you everything you need to perform live mixes.","fork":true,"url":"https://api.github.com/repos/daschuer/mixxx","forks_url":"https://api.github.com/repos/daschuer/mixxx/forks","keys_url":"https://api.github.com/repos/daschuer/mixxx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daschuer/mixxx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daschuer/mixxx/teams","hooks_url":"https://api.github.com/repos/daschuer/mixxx/hooks","issue_events_url":"https://api.github.com/repos/daschuer/mixxx/issues/events{/number}","events_url":"https://api.github.com/repos/daschuer/mixxx/events","assignees_url":"https://api.github.com/repos/daschuer/mixxx/assignees{/user}","branches_url":"https://api.github.com/repos/daschuer/mixxx/branches{/branch}","tags_url":"https://api.github.com/repos/daschuer/mixxx/tags","blobs_url":"https://api.github.com/repos/daschuer/mixxx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daschuer/mixxx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daschuer/mixxx/git/refs{/sha}","trees_url":"https://api.github.com/repos/daschuer/mixxx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daschuer/mixxx/statuses/{sha}","languages_url":"https://api.github.com/repos/daschuer/mixxx/languages","stargazers_url":"https://api.github.com/repos/daschuer/mixxx/stargazers","contributors_url":"https://api.github.com/repos/daschuer/mixxx/contributors","subscribers_url":"https://api.github.com/repos/daschuer/mixxx/subscribers","subscription_url":"https://api.github.com/repos/daschuer/mixxx/subscription","commits_url":"https://api.github.com/repos/daschuer/mixxx/commits{/sha}","git_commits_url":"https://api.github.com/repos/daschuer/mixxx/git/commits{/sha}","comments_url":"https://api.github.com/repos/daschuer/mixxx/comments{/number}","issue_comment_url":"https://api.github.com/repos/daschuer/mixxx/issues/comments{/number}","contents_url":"https://api.github.com/repos/daschuer/mixxx/contents/{+path}","compare_url":"https://api.github.com/repos/daschuer/mixxx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daschuer/mixxx/merges","archive_url":"https://api.github.com/repos/daschuer/mixxx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daschuer/mixxx/downloads","issues_url":"https://api.github.com/repos/daschuer/mixxx/issues{/number}","pulls_url":"https://api.github.com/repos/daschuer/mixxx/pulls{/number}","milestones_url":"https://api.github.com/repos/daschuer/mixxx/milestones{/number}","notifications_url":"https://api.github.com/repos/daschuer/mixxx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daschuer/mixxx/labels{/name}","releases_url":"https://api.github.com/repos/daschuer/mixxx/releases{/id}","created_at":"2013-06-13T15:21:23Z","updated_at":"2015-02-15T22:06:22Z","pushed_at":"2015-02-23T08:47:26Z","git_url":"git://github.com/daschuer/mixxx.git","ssh_url":"git@github.com:daschuer/mixxx.git","clone_url":"https://github.com/daschuer/mixxx.git","svn_url":"https://github.com/daschuer/mixxx","homepage":null,"size":287249,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mixxxdj:master","ref":"master","sha":"aee8105a189872f369191cebd0a3ad5e47614291","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-22T23:09:41Z","pushed_at":"2015-02-22T23:09:40Z","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":313683,"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":36,"forks":194,"open_issues":36,"watchers":241,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/474"},"html":{"href":"https://github.com/mixxxdj/mixxx/pull/474"},"issue":{"href":"https://api.github.com/repos/mixxxdj/mixxx/issues/474"},"comments":{"href":"https://api.github.com/repos/mixxxdj/mixxx/issues/474/comments"},"review_comments":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/474/comments"},"review_comment":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/474/commits"},"statuses":{"href":"https://api.github.com/repos/mixxxdj/mixxx/statuses/ae86f856697dcca4dfbcf83d6ac87baa621e8acc"}}}}