{"action":"created","issue":{"url":"https://api.github.com/repos/karlstav/cava/issues/123","repository_url":"https://api.github.com/repos/karlstav/cava","labels_url":"https://api.github.com/repos/karlstav/cava/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/karlstav/cava/issues/123/comments","events_url":"https://api.github.com/repos/karlstav/cava/issues/123/events","html_url":"https://github.com/karlstav/cava/issues/123","id":197145003,"number":123,"title":"Raw output not going STDOUT?","user":{"login":"DejitaruJin","id":24714336,"avatar_url":"https://avatars1.githubusercontent.com/u/24714336?v=3","gravatar_id":"","url":"https://api.github.com/users/DejitaruJin","html_url":"https://github.com/DejitaruJin","followers_url":"https://api.github.com/users/DejitaruJin/followers","following_url":"https://api.github.com/users/DejitaruJin/following{/other_user}","gists_url":"https://api.github.com/users/DejitaruJin/gists{/gist_id}","starred_url":"https://api.github.com/users/DejitaruJin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DejitaruJin/subscriptions","organizations_url":"https://api.github.com/users/DejitaruJin/orgs","repos_url":"https://api.github.com/users/DejitaruJin/repos","events_url":"https://api.github.com/users/DejitaruJin/events{/privacy}","received_events_url":"https://api.github.com/users/DejitaruJin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-12-22T10:37:29Z","updated_at":"2017-06-06T10:09:21Z","closed_at":null,"body":"I have the latest version of CAVA, set to raw output method. And indeed, if the nonsense in the terminal is to be believed, it is spitting out 8-bit raw data. (The way they all seem to be boxes is kind of odd, but I can't verify what I can't parse.)\r\n\r\nThe problem is, while it's printing in the terminal, it is not technically STDOUT - it can not be piped nor redirected. I've tried piping it to a Python script, dd, and hexdump, and even tried redirecting it (along with STDERR) to /dev/null... but those boxes just keep printing! Testing in ASCII mode, it also produces unconsumable output. Myself and my coworkers can't even figure out how it's doing that, nothing should be that resistant to redirection.\r\n\r\nLooking at the code, it seems almost like it's trying to output to a file, /dev/stdout? Which technically is file descriptor 1 for the current process (that being the Bash window), but it can't be piped, so it's a ways away from actual \"STDOUT\".\r\n\r\nCurrently running on a Raspberry Pi B+, all updates applied. Got so frustrated with this I reformatted, so all's clean."},"comment":{"url":"https://api.github.com/repos/karlstav/cava/issues/comments/306441612","html_url":"https://github.com/karlstav/cava/issues/123#issuecomment-306441612","issue_url":"https://api.github.com/repos/karlstav/cava/issues/123","id":306441612,"user":{"login":"chrisg-waymark","id":16538265,"avatar_url":"https://avatars3.githubusercontent.com/u/16538265?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisg-waymark","html_url":"https://github.com/chrisg-waymark","followers_url":"https://api.github.com/users/chrisg-waymark/followers","following_url":"https://api.github.com/users/chrisg-waymark/following{/other_user}","gists_url":"https://api.github.com/users/chrisg-waymark/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisg-waymark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisg-waymark/subscriptions","organizations_url":"https://api.github.com/users/chrisg-waymark/orgs","repos_url":"https://api.github.com/users/chrisg-waymark/repos","events_url":"https://api.github.com/users/chrisg-waymark/events{/privacy}","received_events_url":"https://api.github.com/users/chrisg-waymark/received_events","type":"User","site_admin":false},"created_at":"2017-06-06T10:09:21Z","updated_at":"2017-06-06T10:09:21Z","body":"Thanks Worron, I managed to change the output from Cava to printf statements like Karl mentioned, then I can pickup the stdout straight away.\r\n\r\nI'll have a look at this though as it might solve some of the lag I'm experiencing.  I'm currently just outputting Ascii to 256, and I'm also voice controlling the LEDs and this introduces bad lag.  I'm killing and restarting the process but its only a temporary fix.  I think tonight I'll try and read through the whole buffer doing nothing until I get to the last line, which should allow it to catch up!\r\n\r\nMuch appreciated code sample though, hopefully this helps others to work more easily with CAVA."}}
{"actor":{"display_login":"chrisg-waymark"}}