Reputation: 181
I'm trying to capture sound from microphone via Java Sound API. I'm using sample code from github and it works perfect on Windows system, but when it runs on MacOS - audio-line buffer returns zero-bytes.
Also if I compile project to jar and run it via administrator permission - appears a message to give access to microphone and after I grant it - all works.
So the question is how to make permission request from code and run app without sudo?
Thanks!
Upvotes: 8
Views: 1220
Reputation: 765
BTW, you have to use the default terminal that comes with mac to execute jar file. That will worked.
The third party terminal, such as iTerm, it's not ok.
Upvotes: 1