[libdmapsharing] Send proper volume on /1/getspeakers request Signed-off-by: W. Michael Petullo <mike flyn org>



commit 47a7222a05523df4b359c1d313ffa1aca9fc8128
Author: W. Michael Petullo <mike flyn org>
Date:   Wed May 18 01:15:32 2011 -0500

    Send proper volume on /1/getspeakers request
    Signed-off-by: W. Michael Petullo <mike flyn org>

 libdmapsharing/dacp-share.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libdmapsharing/dacp-share.c b/libdmapsharing/dacp-share.c
index 9bc1bfd..daed469 100644
--- a/libdmapsharing/dacp-share.c
+++ b/libdmapsharing/dacp-share.c
@@ -782,7 +782,6 @@ dacp_share_ctrl_int (DMAPShare * share,
 
 				g_object_get (dacp_share->priv->player,
 					      "volume", &volume, NULL);
-				//g_debug ("Sending volume: %lu", volume);
 				dmap_structure_add (cmgt, DMAP_CC_CMVO,
 						    volume);
 			} else {
@@ -807,6 +806,7 @@ dacp_share_ctrl_int (DMAPShare * share,
 		soup_message_set_status (message, SOUP_STATUS_NO_CONTENT);
 	} else if (g_ascii_strcasecmp ("/1/getspeakers", rest_of_path) == 0) {
 		GNode *casp;
+		gulong volume;
 
 		casp = dmap_structure_add (NULL, DMAP_CC_CASP);
 		dmap_structure_add (casp, DMAP_CC_MSTT,
@@ -818,7 +818,9 @@ dacp_share_ctrl_int (DMAPShare * share,
 		dmap_structure_add (casp, DMAP_CC_CAIV, 1);
 		dmap_structure_add (casp, DMAP_CC_MINM, "Computer");
 		dmap_structure_add (casp, DMAP_CC_MSMA, (gint32) 0);
-		dmap_structure_add (casp, DMAP_CC_CMVO, 1); // FIXME
+
+		g_object_get (dacp_share->priv->player, "volume", &volume, NULL);
+		dmap_structure_add (casp, DMAP_CC_CMVO, volume);
 
 		_dmap_share_message_set_from_dmap_structure (share, message,
 							     casp);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]