{"action":"created","issue":{"url":"https://api.github.com/repos/x42/libltc/issues/18","repository_url":"https://api.github.com/repos/x42/libltc","labels_url":"https://api.github.com/repos/x42/libltc/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/x42/libltc/issues/18/comments","events_url":"https://api.github.com/repos/x42/libltc/issues/18/events","html_url":"https://github.com/x42/libltc/issues/18","id":132079199,"number":18,"title":"Compiling under Windows + real time decoding","user":{"login":"orso135","id":17119373,"avatar_url":"https://avatars.githubusercontent.com/u/17119373?v=3","gravatar_id":"","url":"https://api.github.com/users/orso135","html_url":"https://github.com/orso135","followers_url":"https://api.github.com/users/orso135/followers","following_url":"https://api.github.com/users/orso135/following{/other_user}","gists_url":"https://api.github.com/users/orso135/gists{/gist_id}","starred_url":"https://api.github.com/users/orso135/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orso135/subscriptions","organizations_url":"https://api.github.com/users/orso135/orgs","repos_url":"https://api.github.com/users/orso135/repos","events_url":"https://api.github.com/users/orso135/events{/privacy}","received_events_url":"https://api.github.com/users/orso135/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-02-08T08:19:49Z","updated_at":"2016-02-24T09:05:53Z","closed_at":"2016-02-24T09:05:53Z","body":"Hello!\r\nFirst of all, thank you very much for this code and all the resources provided with it. \r\nIt has been of great help to better understand how to decode LTC from an audio source.\r\n\r\nMy goal is to integrate this library into a previously written code (on windows) that reads in real time audio data from a soundcard (using ASIO callbacks) and then decodes it.\r\n\r\nI compiled libltc under linux (on cloud9, using make and make check) and everything went as expected: the make check was successful and the timecode.raw file was flawlessly decoded.\r\n\r\nUnfortunately, while compiling it in Visual Studio and I encountered few problems, but I quickly fixed them:\r\n\r\n1. rint() identifier not found (fixed by manually force the code inside the #if macro)\r\n2. return -infinity; \"infinity\" undeclared identifier. I fixed it by adding the line:\r\n`double infinity =  std::numeric_limits<double>::max()`\r\n\r\nHowever, once I run the `ltcdecode.cpp` with the following parameters (timecode.raw 882) as done in the make check, I get the following output on  terminal:\r\n\r\n`* reading from: timecode.raw `\r\n`2000-00-00 +0000 00:05:27:17 |      626     1511`\r\n\r\n(that it's coherent with the first two lines of the linux output), but then it returns without decoding the rest.\r\n\r\nDo you have any suggestion? Why is it not properly decoding the whole file?\r\n\r\nThank you in advance!\r\n"},"comment":{"url":"https://api.github.com/repos/x42/libltc/issues/comments/188149105","html_url":"https://github.com/x42/libltc/issues/18#issuecomment-188149105","issue_url":"https://api.github.com/repos/x42/libltc/issues/18","id":188149105,"user":{"login":"x42","id":30246,"avatar_url":"https://avatars.githubusercontent.com/u/30246?v=3","gravatar_id":"","url":"https://api.github.com/users/x42","html_url":"https://github.com/x42","followers_url":"https://api.github.com/users/x42/followers","following_url":"https://api.github.com/users/x42/following{/other_user}","gists_url":"https://api.github.com/users/x42/gists{/gist_id}","starred_url":"https://api.github.com/users/x42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/x42/subscriptions","organizations_url":"https://api.github.com/users/x42/orgs","repos_url":"https://api.github.com/users/x42/repos","events_url":"https://api.github.com/users/x42/events{/privacy}","received_events_url":"https://api.github.com/users/x42/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T09:05:53Z","updated_at":"2016-02-24T09:05:53Z","body":"nice.  I'll close this ticket then.\r\n\r\nPS. you may want to un-harcdoe the 1920  audio-samples per video-frame.\r\nhere:  48000 / 25  (audio-sample-rate  over expected video-frame-rate) to speed up initial detection. \r\n\r\nAlso doing file-i/o or printing inside the ASIO callback is not a good idea (though maybe fine for debugging only)\r\nhttp://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing\r\n\r\nI suggest to move the `while (ltc_decoder_read(decoder, &frame)) {..}`  into the main thread."}}