struct sound_pulse_data_s {
Lisp_Object stream; /* media has to deal with this actually */
Lisp_Object client;
+ Lisp_Object role;
Lisp_Object sink;
Lisp_Object source;
Lisp_Object server;
Lisp_Object opt_sink = Qnil;
Lisp_Object opt_source = Qnil;
Lisp_Object opt_client = Qnil;
+ Lisp_Object opt_role = Qnil;
Lisp_Object opt_stream = Qnil;
Lisp_Object opt_immediate = Qnil;
Lisp_Object opt_threaded = Qnil;
return NULL;
}
+ opt_role = Fplist_get(pulse_options, intern(":role"), Qnil);
+ if (!NILP(opt_role) && !STRINGP(opt_role)) {
+ wrong_type_argument(Qstringp, opt_role);
+ return NULL;
+ }
+
opt_stream = Fplist_get(pulse_options, intern(":stream"), Qnil);
if (!NILP(opt_stream) && !STRINGP(opt_stream)) {
wrong_type_argument(Qstringp, opt_stream);
spd = xnew_and_zero(struct sound_pulse_data_s);
spd->server = opt_server;
spd->client = opt_client;
+ spd->role = opt_role;
spd->sink = opt_sink;
spd->source = opt_source;
spd->stream = opt_stream;
spd->stream = Qnil;
spd->server = Qnil;
spd->client = Qnil;
+ spd->role = Qnil;
spd->sink = Qnil;
spd->source = Qnil;
}
const char *server =
(NILP(spd->server) ? NULL :
(const char*)XSTRING_DATA(spd->server));
+ const char *role =
+ (NILP(spd->role) ? "event" :
+ (const char*)XSTRING_DATA(spd->role));
int threadedp = spd->ml_threaded_p;
/* cannot use Pulse on incomplete or corrupt audio devices */
SXE_SEMAPH_INIT(&(spd->ctxsem));
+ setenv("PULSE_PROP_media.role", role, 1);
+
/* Set up a new main loop */
if (threadedp)
spd->tml = pa_threaded_mainloop_new();
:sink - the name of the sink to connect to (e.g. "output")
:source - the name of the source to record from (e.g. "mic_in")
:client - how to call the client on the server (default "SXEmacs")
+:role - a one-word description of the "type" of media to be played
+ on the server. It can be one of:
+ "video" - for movie/video streams
+ "music" - for music streams (like mp3's, oga's etc)
+ "game" - for audio from games
+ "event" - for event sounds (this is the default)
+ "phone" - for VoIP and Instant Messaging audio
+ "animation" - for animations
+ "production" - for audio production applications
+ "a11y" - for accessibility applications
:stream - how to call the stream on the server (e.g. "fancy-sound")
:immediate - connect to sink immediately and keep the connection
alive as long as the audio device exists (default `t')