dynamic routing through pulse audio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

'Twas brillig, and Himanshu Chug at 06/06/11 10:08 did gyre and gimble:
> Thanks Colin for your suggestions, that give me some good directions to
> start with.
> 
> I tried to modify existing module "module-cork-music-on-phone" , I have
> few queries:
> 1. I am now able to Cork(Pause) the "event" stream while a new "phone"
> stream arrives. but instead my requirement is to to permanently STOP the
> "event" stream
>    instead of Corking while "phone" call stream exists? Is there any
> event/api I can use to achieve this?

No it's up to the application to decide how it handles the cork events.
If it would prefer to stop itself, then that's up to the app. We should
not be deciding policy for this behaviour in PA, just indicating that we
want the application to stop producing audio.

For more fine grained media player control, I'd recommend using
something like MPRIS or similar.


> 2. I just need to give a try to play sample cache (beep) first in the
> same module (module-cork-music-on-phone)
>  {Just Playback no role supression initially at this stage}  for that:
>      -  How to init the module so that  it would load the
> suppression_sound (if present) into the sample cache

Just look elsewhere in the code for examples of how to upload samples
to the cache. But as a hint, pa_scache_add_file()

>      -  Where (Location) to copy the sound (beep) .wav file  ?

It's up to you. You could just pass a full path in the module argument
or default to /usr/share/sounds if you prefer. Perhaps it's even worth
adding a "suppressed-sound" to the Sound Theme Specification? I think
that's more complicated than it needs to be at this stage however.

>      -  How to Play the .wav from the module?

Again this is in the code but as a hint pa_scache_play_item();

(I appreciate we don't really have great devel docs here, so the "it's
in the code" argument is pretty weak!)

Take care

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux