Hi,
I have a really old application that uses oss interfaces, and noticed that
when attempting to run via padsp it would fail ( as opposed to with aoss ).
After talking with Ford_Prefect in #pulseaudio, we narrowed down the problem
to protocol-native.c
Attached is a patch which allows padsp's get_sink_info call to success on
the server side ( drop-invalid-check ).
He mentioned that name is allowed to be null; which makes me think it might
be less confusing to just do a *name check and then no others.
Additionally, I noticed that in padsp.c it was recieving two callbacks in
both sink and source_info_cb. As this appears to be the desired behavior in
introspect.c, I modified the _cb functions to only notify if success was not
already set.
-drew
diff -udPr --exclude=orig pulseaudio-0.9.21/orig/src/pulsecore/protocol-native.c pulseaudio-0.9.21/src/pulsecore/protocol-native.c
--- pulseaudio-0.9.21/orig/src/pulsecore/protocol-native.c 2009-11-22 22:57:07.000000000 -0500
+++ pulseaudio-0.9.21/src/pulsecore/protocol-native.c 2011-04-07 16:28:09.000000000 -0400
@@ -3125,7 +3125,6 @@
(command == PA_COMMAND_GET_SOURCE_INFO &&
pa_namereg_is_valid_name_or_wildcard(name, PA_NAMEREG_SOURCE)) ||
pa_namereg_is_valid_name(name), tag, PA_ERR_INVALID);
- CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || name, tag, PA_ERR_INVALID);
CHECK_VALIDITY(c->pstream, idx == PA_INVALID_INDEX || !name, tag, PA_ERR_INVALID);
CHECK_VALIDITY(c->pstream, !name || idx == PA_INVALID_INDEX, tag, PA_ERR_INVALID);
diff -udPr --exclude=orig pulseaudio-0.9.21/orig/src/utils/padsp.c pulseaudio-0.9.21/src/utils/padsp.c
--- pulseaudio-0.9.21/orig/src/utils/padsp.c 2009-09-18 16:21:44.000000000 -0400
+++ pulseaudio-0.9.21/src/utils/padsp.c 2011-04-07 17:14:26.000000000 -0400
@@ -1205,8 +1205,8 @@
fd_info *i = userdata;
if (!si || eol < 0) {
- i->operation_success = 0;
- pa_threaded_mainloop_signal(i->mainloop, 0);
+ if( ! i->operation_success )
+ pa_threaded_mainloop_signal(i->mainloop, 0);
return;
}
@@ -1227,8 +1227,8 @@
fd_info *i = userdata;
if (!si || eol < 0) {
- i->operation_success = 0;
- pa_threaded_mainloop_signal(i->mainloop, 0);
+ if( ! i->operation_success )
+ pa_threaded_mainloop_signal(i->mainloop, 0);
return;
}
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss