[polypaudio-commits] r612 - /trunk/src/modules/module-solaris.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Mon Feb 27 01:18:19 PST 2006
Author: ossman
Date: Mon Feb 27 10:18:18 2006
New Revision: 612
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=612&root=polypaudio&view=rev
Log:
Catch volume update events.
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=612&root=polypaudio&r1=611&r2=612&view=diff
==============================================================================
--- trunk/src/modules/module-solaris.c (original)
+++ trunk/src/modules/module-solaris.c Mon Feb 27 10:18:18 2006
@@ -219,8 +219,20 @@
static void sig_callback(pa_mainloop_api *api, pa_signal_event*e, int sig, void *userdata) {
struct userdata *u = userdata;
- assert(u);
+ pa_cvolume old_vol;
+
+ assert(u && u->sink && u->sink->get_hw_volume);
+
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);
+ }
}
static pa_usec_t sink_get_latency_cb(pa_sink *s) {
More information about the pulseaudio-commits
mailing list