fand / veda

⚡VJ / Live Coding on Atom⚡

Home Page:http://veda.gl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Audio is not working on a macbook with m1

illus0r opened this issue · comments

This code works on my old mac but gives a black screen on a new one, that uses apple's m1 cpu.

/*
{
  audio: true,
}
*/
precision mediump float;
uniform vec2 resolution;
uniform float volume;
uniform sampler2D samples;
uniform sampler2D spectrum;

void main() {
  vec2 uv = gl_FragCoord.xy/resolution.xy;
  gl_FragColor=texture2D(spectrum,uv);
  gl_FragColor.a=1.;
}

I've added Veda to my Security & Privacy → Accessability list, but I can't add it to the Microphone list, because there are no + button:

I think Veda should've requested access at some point but it didn't.

Atom 1.58.0

I recently got M1 macbookpro and it reproduced on my machine.
I spent a few days to figure out the problem, but still no solution was found.
I'll drop here what I've found so far...

  • This only occurs on Atom / Chrome
    • I run the same code with server mode on (server: 3000) and checked if the problem occurs on browsers.
    • It worked on Safari and Firefox, but didn't work on Chrome
  • TCC
    • macOS has it's privacy protection system (TCC) and it prevents apps to access audio inputs.
    • I found some people having similar problems on VSCode microsoft/vscode#95062
      • The solution introduced here is to edit TCC.db directly.
      • I tried this to allow Atom to access audio, but it didn't solve the problem 😇
INSERT into access VALUES('kTCCServiceMicrophone',"com.github.atom",0,1,1,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);
INSERT into access VALUES('kTCCServiceCamera',"com.github.atom",0,1,1,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);
INSERT into access VALUES('kTCCServiceMicrophone',"com.github.atom.helper",0,1,1,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);
INSERT into access VALUES('kTCCServiceCamera',"com.github.atom.helper",0,1,1,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);

I am having this issue as well (also on m1 mac), a year later. Any updates?