aucat -l and mpd

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

aucat -l and mpd

gmsw
hello,
while I see there is some talking about aucat, I'd like to pose a question
myself.
If I use aucat -l and then play multiple sessions of, say, mplayer,
everything is fine, but if I start mpd while running aucat as server, mpd
refuses to start.
Is it possible to make mpd use aucat? Or should I use mpd to do the "aucat
-l" job? (to be able to hear, for instance, incoming messages from
pidgin).

tks

Reply | Threaded
Open this post in threaded view
|

Re: aucat -l and mpd

Romain Bertrand
Saturday 03 Oct 2009 16:18:15 (+0800), [hidden email] wrote :

> hello,
> while I see there is some talking about aucat, I'd like to pose a question
> myself.
> If I use aucat -l and then play multiple sessions of, say, mplayer,
> everything is fine, but if I start mpd while running aucat as server, mpd
> refuses to start.
> Is it possible to make mpd use aucat? Or should I use mpd to do the "aucat
> -l" job? (to be able to hear, for instance, incoming messages from
> pidgin).
>
> tks
>

you need the same user for aucat and mpd

hth

Reply | Threaded
Open this post in threaded view
|

aucat -l and mpd

Nick Guenther
In reply to this post by gmsw
On Sat, Oct 3, 2009 at 4:18 AM,  <[hidden email]> wrote:
> hello,
> while I see there is some talking about aucat, I'd like to pose a question
> myself.
> If I use aucat -l and then play multiple sessions of, say, mplayer,
> everything is fine, but if I start mpd while running aucat as server, mpd
> refuses to start.
> Is it possible to make mpd use aucat? Or should I use mpd to do the "aucat
> -l" job? (to be able to hear, for instance, incoming messages from pidgin).

aucat locks /dev/audio while it's running, and a new sound API, sndio,
is used to intelligently detect whether aucat is running or not and
route audio to it or to the soundcard directly. The (huge) downside of
this is that there is no drop-in solution that lets you have audio
shared between any and all apps, each one must be hacked to support
sndio as a backend, and mpd hasn't had this work done yet as far as I
know.

Reply | Threaded
Open this post in threaded view
|

Re: aucat -l and mpd

Stuart Henderson
On 2009-10-03, Nick Guenther <[hidden email]> wrote:

> On Sat, Oct 3, 2009 at 4:18 AM,  <[hidden email]> wrote:
>> hello,
>> while I see there is some talking about aucat, I'd like to pose a question
>> myself.
>> If I use aucat -l and then play multiple sessions of, say, mplayer,
>> everything is fine, but if I start mpd while running aucat as server, mpd
>> refuses to start.
>> Is it possible to make mpd use aucat? Or should I use mpd to do the "aucat
>> -l" job? (to be able to hear, for instance, incoming messages from pidgin).
>
> aucat locks /dev/audio while it's running, and a new sound API, sndio,
> is used to intelligently detect whether aucat is running or not and
> route audio to it or to the soundcard directly. The (huge) downside of
> this is that there is no drop-in solution that lets you have audio
> shared between any and all apps, each one must be hacked to support
> sndio as a backend, and mpd hasn't had this work done yet as far as I
> know.
>
>

mpd uses libao which was has been converted. Most audio software in
the ports tree does now use sndio.

The problem with mpd is it runs as a different user - the directory
containing the aucat socket is created with restricted permissions.
(Wondering why? Maybe you don't want someone who managed to connect
to your laptop to access the microphone...)

So after running the aucat daemon, you need to loosen the permissions
(e.g. chgrp _mpd /tmp/aucat-`id -u`; chmod 770 /tmp/aucat-`id -u`).
You probably want to symlink the directory to the name mpd will use
by default too (/tmp/aucat-560, named after the uid).

Reply | Threaded
Open this post in threaded view
|

Re: aucat -l and mpd

gmsw
In reply to this post by Romain Bertrand
On Sat, 3 Oct 2009, Romain Bertrand wrote:

> Saturday 03 Oct 2009 16:18:15 (+0800), [hidden email] wrote :
>> hello,
>> while I see there is some talking about aucat, I'd like to pose a question
>> myself.
>> If I use aucat -l and then play multiple sessions of, say, mplayer,
>> everything is fine, but if I start mpd while running aucat as server, mpd
>> refuses to start.
>> Is it possible to make mpd use aucat? Or should I use mpd to do the "aucat
>> -l" job? (to be able to hear, for instance, incoming messages from
>> pidgin).
>>
>> tks
>>
>
> you need the same user for aucat and mpd
>
> hth
>
WORKS!
thanks a lot

Reply | Threaded
Open this post in threaded view
|

Re: aucat -l and mpd

gmsw
In reply to this post by Stuart Henderson
On Sat, 3 Oct 2009, Stuart Henderson wrote:

> On 2009-10-03, Nick Guenther <[hidden email]> wrote:
>> On Sat, Oct 3, 2009 at 4:18 AM,  <[hidden email]> wrote:
>>> hello,
>>> while I see there is some talking about aucat, I'd like to pose a question
>>> myself.
>>> If I use aucat -l and then play multiple sessions of, say, mplayer,
>>> everything is fine, but if I start mpd while running aucat as server, mpd
>>> refuses to start.
>>> Is it possible to make mpd use aucat? Or should I use mpd to do the "aucat
>>> -l" job? (to be able to hear, for instance, incoming messages from pidgin).
>>
>> aucat locks /dev/audio while it's running, and a new sound API, sndio,
>> is used to intelligently detect whether aucat is running or not and
>> route audio to it or to the soundcard directly. The (huge) downside of
>> this is that there is no drop-in solution that lets you have audio
>> shared between any and all apps, each one must be hacked to support
>> sndio as a backend, and mpd hasn't had this work done yet as far as I
>> know.
>>
>>
>
> mpd uses libao which was has been converted. Most audio software in
> the ports tree does now use sndio.
>
> The problem with mpd is it runs as a different user - the directory
> containing the aucat socket is created with restricted permissions.
> (Wondering why? Maybe you don't want someone who managed to connect
> to your laptop to access the microphone...)
>
> So after running the aucat daemon, you need to loosen the permissions
> (e.g. chgrp _mpd /tmp/aucat-`id -u`; chmod 770 /tmp/aucat-`id -u`).
> You probably want to symlink the directory to the name mpd will use
> by default too (/tmp/aucat-560, named after the uid).
>
>
as answered in my previous message, it works using the same user.
So starting aucat -l at boot time as _mpd user (or as myself) and then mpd
dropping privilegies to the same user should do the trick?

Reply | Threaded
Open this post in threaded view
|

Re: aucat -l and mpd

j4nKy
In reply to this post by Nick Guenther
On Sat, Oct 03, 2009 at 04:58:09AM -0400, Nick Guenther wrote:

> On Sat, Oct 3, 2009 at 4:18 AM,  <[hidden email]> wrote:
> > hello,
> > while I see there is some talking about aucat, I'd like to pose a question
> > myself.
> > If I use aucat -l and then play multiple sessions of, say, mplayer,
> > everything is fine, but if I start mpd while running aucat as server, mpd
> > refuses to start.
> > Is it possible to make mpd use aucat? Or should I use mpd to do the "aucat
> > -l" job? (to be able to hear, for instance, incoming messages from pidgin).
>
> aucat locks /dev/audio while it's running, and a new sound API, sndio,
> is used to intelligently detect whether aucat is running or not and
> route audio to it or to the soundcard directly. The (huge) downside of
> this is that there is no drop-in solution that lets you have audio
> shared between any and all apps, each one must be hacked to support
> sndio as a backend,

all I have to say to that is that there are more ports using the
native audio API than there ever have been.

 and mpd hasn't had this work done yet as far as I
> know.

bzzt!

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org