markmcconnell / mai

Mark's AES67 Implementation
BSD 3-Clause "New" or "Revised" License
93 stars 22 forks source link

regular user not able to initialize #5

Closed mr-berndt closed 2 years ago

mr-berndt commented 2 years ago

Many thx for the quick fix https://github.com/markmcconnell/mai/issues/4 I still have to comment out -Werror, btw., otherwise ‘ptime’ may be used uninitialized in this function.

Anyway, now that I can run it, I stumble over the problem, that only root can use it. As a normal user I get: [ERROR] sock_recv bind: Permission denied [ERROR] mai_ptp_init could not open PTP event socket

Tested under Debian and Arch.

It seem that setting up multicast is the issue. AFAIK jack itself is doing that, when used over the network, which I am doing, so there must be a simple way, I just don't find it. root is not a safe option for firing up an entire audio environment, so I wonder, what I am missing.

If there is a simple solution it would be very helpful to find that under getting started in the README.

markmcconnell commented 2 years ago

just pushed another patch for that error.

you must start the program as root or as a user that has the necessary network permissions to open the multicast socket and set realtime priority; however, there are the -u and -g command line parameters that allow you to drop root privileges after network and jack startup is complete and last for the remainder of the duration of the program.