GitHub PullRequestReviewCommentEvent at 2014-04-03 14:35:16
Repository: mixxx
Actor: rryan
Payload: {"comment":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/11254060","id":11254060,"diff_hunk":"@@ -162,7 +169,27 @@ int SoundDevicePortAudio::open() {\n     qDebug() << \"Opening stream with id\" << m_devId;\n \n     //Create the callback function pointer.\n-    PaStreamCallback* callback = paV19Callback;\n+    PaStreamCallback* callback = NULL;\n+    if (isClkRefDevice) {\n+        callback = paV19CallbackClkRef;\n+    } else {\n+        callback = paV19Callback;\n+        // to avoid overflows when one callback overtakes the other or\n+        // when there is a clock drift compared to the clock reference device\n+        // we need an additional artificial delay\n+        if (m_outputParams.channelCount) {\n+            // On chunk for reading one for writing and on for drift correction\n+            m_outputFifo = new FIFO<CSAMPLE>(m_outputParams.channelCount * m_framesPerBuffer * 3);\n+            // Clear first 1.5 chunks on for the required artificial delaly to a allow jitter","path":"src/sounddeviceportaudio.cpp","position":45,"original_position":45,"commit_id":"6725e5df38b510fa5668d4e136282ba46f094647","original_commit_id":"6725e5df38b510fa5668d4e136282ba46f094647","user":{"login":"rryan","id":26527,"avatar_url":"https://avatars.githubusercontent.com/u/26527?","gravatar_id":"169672d4f18bf00666136d090a74693f","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":">The desired value is 1x. If reading course first, we have 0.5 x delay, else we have 2.5 x delay. \r\n\r\nI don't think that's true -- you insert 1.5x a latency period of silence into the buffer. This is a 1.5x latency period delay regardless of which callback comes first. Am I misunderstanding how this works?","created_at":"2014-04-03T14:35:16Z","updated_at":"2014-04-03T14:35:16Z","html_url":"https://github.com/mixxxdj/mixxx/pull/219#discussion_r11254060","pull_request_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/219","_links":{"self":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/11254060"},"html":{"href":"https://github.com/mixxxdj/mixxx/pull/219#discussion_r11254060"},"pull_request":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/219"}}}}