[polypaudio-commits] r613 - /trunk/src/modules/module-solaris.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Mon Feb 27 01:20:25 PST 2006
Author: ossman
Date: Mon Feb 27 10:20:25 2006
New Revision: 613
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=613&root=polypaudio&view=rev
Log:
We have both sink and source in this module.
Modified:
trunk/src/modules/module-solaris.c
Modified: trunk/src/modules/module-solaris.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-solaris.c?rev=613&root=polypaudio&r1=612&r2=613&view=diff
==============================================================================
--- trunk/src/modules/module-solaris.c (original)
+++ trunk/src/modules/module-solaris.c Mon Feb 27 10:20:25 2006
@@ -221,17 +221,32 @@
struct userdata *u = userdata;
pa_cvolume old_vol;
- assert(u && u->sink && u->sink->get_hw_volume);
+ assert(u);
do_write(u);
- memcpy(&old_vol, &u->sink->hw_volume, sizeof(pa_cvolume));
- if (u->sink->get_hw_volume(u->sink) < 0)
- return;
- if (memcmp(&old_vol, &u->sink->hw_volume, sizeof(pa_cvolume)) != 0) {
- pa_subscription_post(u->sink->core,
- PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE,
- u->sink->index);
+ if (u->sink) {
+ assert(u->sink->get_hw_volume);
+ memcpy(&old_vol, &u->sink->hw_volume, sizeof(pa_cvolume));
+ if (u->sink->get_hw_volume(u->sink) < 0)
+ return;
+ if (memcmp(&old_vol, &u->sink->hw_volume, sizeof(pa_cvolume)) != 0) {
+ pa_subscription_post(u->sink->core,
+ PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE,
+ u->sink->index);
+ }
+ }
+
+ if (u->source) {
+ assert(u->source->get_hw_volume);
+ memcpy(&old_vol, &u->source->hw_volume, sizeof(pa_cvolume));
+ if (u->source->get_hw_volume(u->source) < 0)
+ return;
+ if (memcmp(&old_vol, &u->source->hw_volume, sizeof(pa_cvolume)) != 0) {
+ pa_subscription_post(u->source->core,
+ PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE,
+ u->source->index);
+ }
}
}
More information about the pulseaudio-commits
mailing list