Zhen Fu <fuzh at marvell.com> writes: Hi guys, > Hi rong, > > It is very useful message for me. I am doing a audio server, so I refer the pulseaudio system. > > -- > Best Regards, > Zhen Fu > > -----Original Message----- > From: rong deng [mailto:dzrongg at gmail.com] > Sent: Wednesday, July 25, 2012 11:21 PM > To: General PulseAudio Discussion > Cc: Zhen Fu > Subject: Re: [pulseaudio-discuss] I want to know about how to communication one module with another module > > Hi Zhen, > > 2012/7/24 Zhen Fu <fuzh at marvell.com>: >> Hi all developer, >> >> >> >> I want to know about how to communication one module with another module. Is >> it use asyncmg? Thank you! > > I'm not the expert here, but here's my two cents. :) > > In theory, two modules should not communicate directly with each > other. For a module, the only thing it should care about is the core, > and it should communicate with the core, handling the messages from > the core etc. As you might know already, pulseaudio takes the thread > model, for most of the modules, they would reside in a separate > thread, e.g. ALSA. Communicating directly with two methods could be a > mess, and even worse, one module is totally unaware when the another > module is loaded or not. > > So the current way, in my humble opinion, is to use the core as a > bridge to direct the communication between two modules. > > That said, the intrinsic question is why you should do this at your > first place? :) Maybe there's a chance to skip this ugliness in your > design. > > Thanks! > _______________________________________________ > pulseaudio-discuss mailing list > pulseaudio-discuss at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss Taking the opportunity, how pa handle two different conflicting modules ? For example, module-role-cork can be used to cork others streams when a stream with the expected role appears, what happens if we've another module that increases the volume when a stream with the same role appears ? Is it responsability of pa or of the user ? Regards, Flavio Ceolin