{"action":"created","comment":{"url":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls/comments/93412054","pull_request_review_id":13937044,"id":93412054,"diff_hunk":"@@ -418,8 +419,10 @@ netmd_error netmd_prepare_packets(unsigned char* data, size_t data_lenght,\n             chunksize = data_lenght - position;\n         }\n \n-        if ((chunksize % 8) != 0) {\n-            chunksize = chunksize + 8 - (chunksize % 8);\n+        /* do not truncate frames, transfer data size will be calculated by number of frames in netmd_secure_send_track(),\n+           alternatively change totalbytes calculation in netmd_secure_send_track() */\n+        if ((chunksize % frame_size) != 0) {","path":"libnetmd/secure.c","position":34,"original_position":34,"commit_id":"6529602bde8eab1ab1285c0e0aa41b70d5b107fe","original_commit_id":"6529602bde8eab1ab1285c0e0aa41b70d5b107fe","user":{"login":"thp","id":135241,"avatar_url":"https://avatars.githubusercontent.com/u/135241?v=3","gravatar_id":"","url":"https://api.github.com/users/thp","html_url":"https://github.com/thp","followers_url":"https://api.github.com/users/thp/followers","following_url":"https://api.github.com/users/thp/following{/other_user}","gists_url":"https://api.github.com/users/thp/gists{/gist_id}","starred_url":"https://api.github.com/users/thp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thp/subscriptions","organizations_url":"https://api.github.com/users/thp/orgs","repos_url":"https://api.github.com/users/thp/repos","events_url":"https://api.github.com/users/thp/events{/privacy}","received_events_url":"https://api.github.com/users/thp/received_events","type":"User","site_admin":false},"body":"This can be rewritten without a condition:\r\n\r\n```\r\nchunksize = ((chunksize + frame_size - 1) / frame_size) * frame_size;\r\n```","created_at":"2016-12-21T10:23:08Z","updated_at":"2016-12-21T10:23:08Z","html_url":"https://github.com/glaubitz/linux-minidisc/pull/27#discussion_r93412054","pull_request_url":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls/comments/93412054"},"html":{"href":"https://github.com/glaubitz/linux-minidisc/pull/27#discussion_r93412054"},"pull_request":{"href":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls/27","id":98848616,"html_url":"https://github.com/glaubitz/linux-minidisc/pull/27","diff_url":"https://github.com/glaubitz/linux-minidisc/pull/27.diff","patch_url":"https://github.com/glaubitz/linux-minidisc/pull/27.patch","issue_url":"https://api.github.com/repos/glaubitz/linux-minidisc/issues/27","number":27,"state":"open","locked":false,"title":"added netmd download support in netmdcli","user":{"login":"tharp","id":1863908,"avatar_url":"https://avatars.githubusercontent.com/u/1863908?v=3","gravatar_id":"","url":"https://api.github.com/users/tharp","html_url":"https://github.com/tharp","followers_url":"https://api.github.com/users/tharp/followers","following_url":"https://api.github.com/users/tharp/following{/other_user}","gists_url":"https://api.github.com/users/tharp/gists{/gist_id}","starred_url":"https://api.github.com/users/tharp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tharp/subscriptions","organizations_url":"https://api.github.com/users/tharp/orgs","repos_url":"https://api.github.com/users/tharp/repos","events_url":"https://api.github.com/users/tharp/events{/privacy}","received_events_url":"https://api.github.com/users/tharp/received_events","type":"User","site_admin":false},"body":"I added netmd download support in netmdcli.\r\nSupported formats are: 16bit pcm @ 44k1Hz stereo or mono and Atrac LP2/4 stored in a wav container file.\r\n\r\nAs i tested, bitrate conversion ( pcm -> Atrac LP2/4) doesn´t work this way, transfer is fine but no audio output when playing the track. Also pcm stereo -> Atrac SP mono failed with unknown error.\r\nSo i left it the way i worked on before:\r\n16bit pcm mono -> Atrac SP mono\r\n16bit pcm stereo -> Atrac SP stereo\r\nLP2 -> LP2\r\nLP4 -> LP4\r\n\r\nAlso added some more detailed debug messages, may be very useful when testing/debugging.\r\n\r\nSuccessfully tested with different stereo pcm and LP2 files, LP4 and mono not tested, yet.","created_at":"2016-12-21T00:00:27Z","updated_at":"2016-12-21T10:41:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ba58b294f07569446250a87c193be711ef7fc1e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls/27/commits","review_comments_url":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls/27/comments","review_comment_url":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/glaubitz/linux-minidisc/issues/27/comments","statuses_url":"https://api.github.com/repos/glaubitz/linux-minidisc/statuses/6529602bde8eab1ab1285c0e0aa41b70d5b107fe","head":{"label":"tharp:netmd-download","ref":"netmd-download","sha":"6529602bde8eab1ab1285c0e0aa41b70d5b107fe","user":{"login":"tharp","id":1863908,"avatar_url":"https://avatars.githubusercontent.com/u/1863908?v=3","gravatar_id":"","url":"https://api.github.com/users/tharp","html_url":"https://github.com/tharp","followers_url":"https://api.github.com/users/tharp/followers","following_url":"https://api.github.com/users/tharp/following{/other_user}","gists_url":"https://api.github.com/users/tharp/gists{/gist_id}","starred_url":"https://api.github.com/users/tharp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tharp/subscriptions","organizations_url":"https://api.github.com/users/tharp/orgs","repos_url":"https://api.github.com/users/tharp/repos","events_url":"https://api.github.com/users/tharp/events{/privacy}","received_events_url":"https://api.github.com/users/tharp/received_events","type":"User","site_admin":false},"repo":{"id":16025618,"name":"linux-minidisc","full_name":"tharp/linux-minidisc","owner":{"login":"tharp","id":1863908,"avatar_url":"https://avatars.githubusercontent.com/u/1863908?v=3","gravatar_id":"","url":"https://api.github.com/users/tharp","html_url":"https://github.com/tharp","followers_url":"https://api.github.com/users/tharp/followers","following_url":"https://api.github.com/users/tharp/following{/other_user}","gists_url":"https://api.github.com/users/tharp/gists{/gist_id}","starred_url":"https://api.github.com/users/tharp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tharp/subscriptions","organizations_url":"https://api.github.com/users/tharp/orgs","repos_url":"https://api.github.com/users/tharp/repos","events_url":"https://api.github.com/users/tharp/events{/privacy}","received_events_url":"https://api.github.com/users/tharp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tharp/linux-minidisc","description":"Free software for accessing MiniDisc devices","fork":true,"url":"https://api.github.com/repos/tharp/linux-minidisc","forks_url":"https://api.github.com/repos/tharp/linux-minidisc/forks","keys_url":"https://api.github.com/repos/tharp/linux-minidisc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tharp/linux-minidisc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tharp/linux-minidisc/teams","hooks_url":"https://api.github.com/repos/tharp/linux-minidisc/hooks","issue_events_url":"https://api.github.com/repos/tharp/linux-minidisc/issues/events{/number}","events_url":"https://api.github.com/repos/tharp/linux-minidisc/events","assignees_url":"https://api.github.com/repos/tharp/linux-minidisc/assignees{/user}","branches_url":"https://api.github.com/repos/tharp/linux-minidisc/branches{/branch}","tags_url":"https://api.github.com/repos/tharp/linux-minidisc/tags","blobs_url":"https://api.github.com/repos/tharp/linux-minidisc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tharp/linux-minidisc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tharp/linux-minidisc/git/refs{/sha}","trees_url":"https://api.github.com/repos/tharp/linux-minidisc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tharp/linux-minidisc/statuses/{sha}","languages_url":"https://api.github.com/repos/tharp/linux-minidisc/languages","stargazers_url":"https://api.github.com/repos/tharp/linux-minidisc/stargazers","contributors_url":"https://api.github.com/repos/tharp/linux-minidisc/contributors","subscribers_url":"https://api.github.com/repos/tharp/linux-minidisc/subscribers","subscription_url":"https://api.github.com/repos/tharp/linux-minidisc/subscription","commits_url":"https://api.github.com/repos/tharp/linux-minidisc/commits{/sha}","git_commits_url":"https://api.github.com/repos/tharp/linux-minidisc/git/commits{/sha}","comments_url":"https://api.github.com/repos/tharp/linux-minidisc/comments{/number}","issue_comment_url":"https://api.github.com/repos/tharp/linux-minidisc/issues/comments{/number}","contents_url":"https://api.github.com/repos/tharp/linux-minidisc/contents/{+path}","compare_url":"https://api.github.com/repos/tharp/linux-minidisc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tharp/linux-minidisc/merges","archive_url":"https://api.github.com/repos/tharp/linux-minidisc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tharp/linux-minidisc/downloads","issues_url":"https://api.github.com/repos/tharp/linux-minidisc/issues{/number}","pulls_url":"https://api.github.com/repos/tharp/linux-minidisc/pulls{/number}","milestones_url":"https://api.github.com/repos/tharp/linux-minidisc/milestones{/number}","notifications_url":"https://api.github.com/repos/tharp/linux-minidisc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tharp/linux-minidisc/labels{/name}","releases_url":"https://api.github.com/repos/tharp/linux-minidisc/releases{/id}","deployments_url":"https://api.github.com/repos/tharp/linux-minidisc/deployments","created_at":"2014-01-18T13:05:50Z","updated_at":"2016-12-20T23:20:18Z","pushed_at":"2016-12-20T23:32:39Z","git_url":"git://github.com/tharp/linux-minidisc.git","ssh_url":"git@github.com:tharp/linux-minidisc.git","clone_url":"https://github.com/tharp/linux-minidisc.git","svn_url":"https://github.com/tharp/linux-minidisc","homepage":null,"size":3980,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"glaubitz:master","ref":"master","sha":"824460bb44420a153f82ba79ab36afc5c2b396f8","user":{"login":"glaubitz","id":1647645,"avatar_url":"https://avatars.githubusercontent.com/u/1647645?v=3","gravatar_id":"","url":"https://api.github.com/users/glaubitz","html_url":"https://github.com/glaubitz","followers_url":"https://api.github.com/users/glaubitz/followers","following_url":"https://api.github.com/users/glaubitz/following{/other_user}","gists_url":"https://api.github.com/users/glaubitz/gists{/gist_id}","starred_url":"https://api.github.com/users/glaubitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glaubitz/subscriptions","organizations_url":"https://api.github.com/users/glaubitz/orgs","repos_url":"https://api.github.com/users/glaubitz/repos","events_url":"https://api.github.com/users/glaubitz/events{/privacy}","received_events_url":"https://api.github.com/users/glaubitz/received_events","type":"User","site_admin":false},"repo":{"id":6741231,"name":"linux-minidisc","full_name":"glaubitz/linux-minidisc","owner":{"login":"glaubitz","id":1647645,"avatar_url":"https://avatars.githubusercontent.com/u/1647645?v=3","gravatar_id":"","url":"https://api.github.com/users/glaubitz","html_url":"https://github.com/glaubitz","followers_url":"https://api.github.com/users/glaubitz/followers","following_url":"https://api.github.com/users/glaubitz/following{/other_user}","gists_url":"https://api.github.com/users/glaubitz/gists{/gist_id}","starred_url":"https://api.github.com/users/glaubitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glaubitz/subscriptions","organizations_url":"https://api.github.com/users/glaubitz/orgs","repos_url":"https://api.github.com/users/glaubitz/repos","events_url":"https://api.github.com/users/glaubitz/events{/privacy}","received_events_url":"https://api.github.com/users/glaubitz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/glaubitz/linux-minidisc","description":"Free software for accessing MiniDisc devices","fork":false,"url":"https://api.github.com/repos/glaubitz/linux-minidisc","forks_url":"https://api.github.com/repos/glaubitz/linux-minidisc/forks","keys_url":"https://api.github.com/repos/glaubitz/linux-minidisc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glaubitz/linux-minidisc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glaubitz/linux-minidisc/teams","hooks_url":"https://api.github.com/repos/glaubitz/linux-minidisc/hooks","issue_events_url":"https://api.github.com/repos/glaubitz/linux-minidisc/issues/events{/number}","events_url":"https://api.github.com/repos/glaubitz/linux-minidisc/events","assignees_url":"https://api.github.com/repos/glaubitz/linux-minidisc/assignees{/user}","branches_url":"https://api.github.com/repos/glaubitz/linux-minidisc/branches{/branch}","tags_url":"https://api.github.com/repos/glaubitz/linux-minidisc/tags","blobs_url":"https://api.github.com/repos/glaubitz/linux-minidisc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glaubitz/linux-minidisc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glaubitz/linux-minidisc/git/refs{/sha}","trees_url":"https://api.github.com/repos/glaubitz/linux-minidisc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glaubitz/linux-minidisc/statuses/{sha}","languages_url":"https://api.github.com/repos/glaubitz/linux-minidisc/languages","stargazers_url":"https://api.github.com/repos/glaubitz/linux-minidisc/stargazers","contributors_url":"https://api.github.com/repos/glaubitz/linux-minidisc/contributors","subscribers_url":"https://api.github.com/repos/glaubitz/linux-minidisc/subscribers","subscription_url":"https://api.github.com/repos/glaubitz/linux-minidisc/subscription","commits_url":"https://api.github.com/repos/glaubitz/linux-minidisc/commits{/sha}","git_commits_url":"https://api.github.com/repos/glaubitz/linux-minidisc/git/commits{/sha}","comments_url":"https://api.github.com/repos/glaubitz/linux-minidisc/comments{/number}","issue_comment_url":"https://api.github.com/repos/glaubitz/linux-minidisc/issues/comments{/number}","contents_url":"https://api.github.com/repos/glaubitz/linux-minidisc/contents/{+path}","compare_url":"https://api.github.com/repos/glaubitz/linux-minidisc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glaubitz/linux-minidisc/merges","archive_url":"https://api.github.com/repos/glaubitz/linux-minidisc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glaubitz/linux-minidisc/downloads","issues_url":"https://api.github.com/repos/glaubitz/linux-minidisc/issues{/number}","pulls_url":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls{/number}","milestones_url":"https://api.github.com/repos/glaubitz/linux-minidisc/milestones{/number}","notifications_url":"https://api.github.com/repos/glaubitz/linux-minidisc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glaubitz/linux-minidisc/labels{/name}","releases_url":"https://api.github.com/repos/glaubitz/linux-minidisc/releases{/id}","deployments_url":"https://api.github.com/repos/glaubitz/linux-minidisc/deployments","created_at":"2012-11-17T23:12:04Z","updated_at":"2016-11-27T21:37:16Z","pushed_at":"2016-12-21T00:00:27Z","git_url":"git://github.com/glaubitz/linux-minidisc.git","ssh_url":"git@github.com:glaubitz/linux-minidisc.git","clone_url":"https://github.com/glaubitz/linux-minidisc.git","svn_url":"https://github.com/glaubitz/linux-minidisc","homepage":null,"size":4176,"stargazers_count":9,"watchers_count":9,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":6,"forks":9,"open_issues":6,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls/27"},"html":{"href":"https://github.com/glaubitz/linux-minidisc/pull/27"},"issue":{"href":"https://api.github.com/repos/glaubitz/linux-minidisc/issues/27"},"comments":{"href":"https://api.github.com/repos/glaubitz/linux-minidisc/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/glaubitz/linux-minidisc/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/glaubitz/linux-minidisc/statuses/6529602bde8eab1ab1285c0e0aa41b70d5b107fe"}}}}
{"actor":{"display_login":"thp"}}