]> code.delx.au - pulseaudio/commitdiff
solaris: Use real_volume for set/get volume
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Thu, 20 Oct 2011 09:16:23 +0000 (14:46 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Thu, 20 Oct 2011 09:35:04 +0000 (15:05 +0530)
This got missed when other bits were updated. Patch submitted by
Brian Cameron <brian.cameron@oracle.com>.

src/modules/module-solaris.c

index 61ea68c27cfafb047b3962cc81a87ae90d4d03be..5081ceb7bb759d5fbf2b46484819f2a8bf3c842b 100644 (file)
@@ -526,7 +526,7 @@ static void source_set_volume(pa_source *s) {
     if (u->fd >= 0) {
         AUDIO_INITINFO(&info);
 
-        info.play.gain = pa_cvolume_max(&s->volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
+        info.play.gain = pa_cvolume_max(&s->real_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
         assert(info.play.gain <= AUDIO_MAX_GAIN);
 
         if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) {
@@ -548,7 +548,7 @@ static void source_get_volume(pa_source *s) {
         if (ioctl(u->fd, AUDIO_GETINFO, &info) < 0)
             pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
         else
-            pa_cvolume_set(&s->volume, s->sample_spec.channels, info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN);
+            pa_cvolume_set(&s->real_volume, s->sample_spec.channels, info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN);
     }
 }