{"action":"created","issue":{"url":"https://api.github.com/repos/wacossusca34/glava/issues/20","repository_url":"https://api.github.com/repos/wacossusca34/glava","labels_url":"https://api.github.com/repos/wacossusca34/glava/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/wacossusca34/glava/issues/20/comments","events_url":"https://api.github.com/repos/wacossusca34/glava/issues/20/events","html_url":"https://github.com/wacossusca34/glava/issues/20","id":296179392,"number":20,"title":"Inconsistent UPS while interacting with GNOME's audio settings","user":{"login":"ElectroCamel","id":5921409,"avatar_url":"https://avatars1.githubusercontent.com/u/5921409?v=4","gravatar_id":"","url":"https://api.github.com/users/ElectroCamel","html_url":"https://github.com/ElectroCamel","followers_url":"https://api.github.com/users/ElectroCamel/followers","following_url":"https://api.github.com/users/ElectroCamel/following{/other_user}","gists_url":"https://api.github.com/users/ElectroCamel/gists{/gist_id}","starred_url":"https://api.github.com/users/ElectroCamel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElectroCamel/subscriptions","organizations_url":"https://api.github.com/users/ElectroCamel/orgs","repos_url":"https://api.github.com/users/ElectroCamel/repos","events_url":"https://api.github.com/users/ElectroCamel/events{/privacy}","received_events_url":"https://api.github.com/users/ElectroCamel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-11T10:29:55Z","updated_at":"2018-02-11T16:43:31Z","closed_at":null,"author_association":"NONE","body":"Right after starting glava I get 30-50 UPS, trying to find a solution I discovered that if I stop glava, switch the audio output from analog to digital or viceversa (I'm using a DAC, so they both come out of my speakers) and restart glava, I get 60 UPS, but as soon as I focus another window or close the audio settings it goes back to 40ish. I also noticed that if I change output while glava is running, it uses my USB mic as input.\r\n\r\nThings I changed in my `rc.glsl`:\r\n\r\n```\r\nsetinterpolate -> false\r\nsetsamplerate -> 44100\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/wacossusca34/glava/issues/comments/364765699","html_url":"https://github.com/wacossusca34/glava/issues/20#issuecomment-364765699","issue_url":"https://api.github.com/repos/wacossusca34/glava/issues/20","id":364765699,"user":{"login":"wacossusca34","id":1881867,"avatar_url":"https://avatars3.githubusercontent.com/u/1881867?v=4","gravatar_id":"","url":"https://api.github.com/users/wacossusca34","html_url":"https://github.com/wacossusca34","followers_url":"https://api.github.com/users/wacossusca34/followers","following_url":"https://api.github.com/users/wacossusca34/following{/other_user}","gists_url":"https://api.github.com/users/wacossusca34/gists{/gist_id}","starred_url":"https://api.github.com/users/wacossusca34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wacossusca34/subscriptions","organizations_url":"https://api.github.com/users/wacossusca34/orgs","repos_url":"https://api.github.com/users/wacossusca34/repos","events_url":"https://api.github.com/users/wacossusca34/events{/privacy}","received_events_url":"https://api.github.com/users/wacossusca34/received_events","type":"User","site_admin":false},"created_at":"2018-02-11T16:43:31Z","updated_at":"2018-02-11T16:43:31Z","author_association":"OWNER","body":"You should set `setsamplerate` back to `22050`. Increasing this value isn't nessecary unless your audio device has a different sample rate (**not** 44100Hz), in which case you need to select a close value that is a multiple of said sample rate.\r\n\r\nKeep in mind GLava is just performing FFT on the audio data here, the most a higher sample rate does here is make it respond _slightly_ better to high frequencies. It also will cause lower frequencies to respond worse because of the buffer size GLava uses by default (the values get windowed, so low frequency waves may not be captured fully by the sample passed to the FFT function).\r\n\r\nFrom the `rc.glsl` file's comments:\r\n>```C\r\n> /*                    ... It's generally OK to leave this\r\n>   value unless you have a strange PulseAudio configuration. */\r\n>```\r\n\r\n> I get 60 UPS, but as soon as I focus another window or close the audio settings it goes back to 40ish.\r\n\r\nThis sounds like a process priority/affinity issue. UPS only decreases if:\r\n\r\n* The CPU core that GLava is running literally cannot keep up with FFT computations and other transformations.\r\n* The framerate you are running at is less than the potential UPS you could be getting. GLava notices this and automatically matches the UPS to your framerate to prevent pointless computations.\r\n\r\n> I also noticed that if I change output while glava is running, it uses my USB mic as input.\r\n\r\nI might be able to fix this, but I would need to play around with this scenariop myself to see what the issue is."}}
{"actor":{"display_login":"wacossusca34"}}