[pulseaudio-discuss] Writing an output module
Colin Guthrie
gmane at colin.guthr.ie
Sun May 29 02:19:02 PDT 2011
Hello Damien,
As your message was waiting moderation and as you asked a question that
may gather some replies, I've subscribed you to the list. I hope that's
OK? If it's a problem you can unsubscribe over at:
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
We've just moved lists so this is likely a different URL to the one
shown in your "Your message is on hold pending administrator approval"
email you'll have received from your original post.
'Twas brillig, and Damien DEJEAN at 25/05/11 19:25 did gyre and gimble:
> Hello,
>
> I'm working on a little sound server for small computers. I already have
> a server and a client library to send sound to this server. Now I wish
> write a pulseaudio module to redirect sound to the library and then send
> it to the little server.
>
> I read the tutorial about modules, but I was noat able to found some
> informations. For example, I need to get the bit width (8, 16 bits ...),
> the sample rate (22k, 44khz) and the sound data, but I don't where I can
> found it.
>
> There are very naive questions, but I don't really know where to begin
> :$, can you help me ?
Well, overall you'll be writing a "Sink" module. This is an output
device module and it will likely connect direct to your server.
The sink itself will advertise a fixed sample format and then PA will
internally handle any input stream remixing when the stream is connected
to that sink. It is then the sinks responsibility to process the actual
data. While it's certainly not perfect, this is how e.g. the ROAP sink
works, so it may be a good idea to look at the structure of that code
and just replace the RAOP/RTP things with calls to your library.
Can I ask what the small sound server is? For small computers
(especially those run off battery or where power saving is desirable)
PulseAudio is one of the only systems to do advanced driving of the alsa
devices using it's timer based scheduling... this approach can save up
to half a watt in power based on current tests. Why is PulseAudio itself
not appropriate for these small computers? (it's already used in several
embedded systems for the reasons of power saving listed above).
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/]
More information about the pulseaudio-discuss
mailing list