[pulseaudio-discuss] HELP REQUIRED: pre-emptive streams
Justin Tulloss
jmtulloss at gmail.com
Thu Jul 12 10:34:52 PDT 2007
Here's a patch that adds the idea of a stream "class" to alsa-streams. It's
against alsa-plugins-1.0.14a. All it does is prepend the name of the ALSA
stream with the class that you indicated. You can put a default class in the
asound.conf file, and also reconfigure it on the fly.
Asound.conf example:
pcm.pulse{
type pulse
class app
}
Runtime configuration example:
* 1:* int err;
* 2:* snd_config_t* classconf;
* 3:*
* 4:* snd_config_update();
* 5:* //you can replace "pulse" with "default" if pulse is set up
as your default device
* 6:* err=snd_config_search(snd_config, "pcm.pulse.class", &classconf);
* 7:*
* 8:* if(!err)
* 9:* snd_config_set_string(classconf, "alert");
*10:* else
*11:* {
*12:* snd_config_make(&classconf, "pcm.pulse.class",
SND_CONFIG_TYPE_STRING);
*13:* snd_config_set_string(classconf, "alert");
*14:* snd_config_add(snd_config, classconf);
*15:* }
Let me know if you have any problems or questions.
Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20070712/3bddcc02/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: classsupport.patch
Type: text/x-patch
Size: 3451 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20070712/3bddcc02/attachment.bin>
More information about the pulseaudio-discuss
mailing list