Getting the volume properties to work without feedback -- not there yet...

This commit is contained in:
Mike Brady
2018-03-09 09:25:49 +00:00
parent 722505dd2d
commit 47fff82dd2
4 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ int dacp_send_command(const char *command, char **body, ssize_t *bodysize) {
// to do it.
struct timespec mutex_wait_time;
mutex_wait_time.tv_sec = 0;
mutex_wait_time.tv_nsec = 20000000; // 20 ms
mutex_wait_time.tv_nsec = 100000000; // 100 ms
struct addrinfo hints, *res;
int sockfd;
+1
View File
@@ -16,6 +16,7 @@
void dbus_metadata_watcher(struct metadata_bundle *argc, __attribute__((unused)) void *userdata) {
// debug(1, "DBUS metadata watcher called");
debug(1,"Set volume to %d.",argc->speaker_volume);
shairport_sync_set_volume(shairportSyncSkeleton, argc->speaker_volume);
}
+1 -1
View File
@@ -143,7 +143,7 @@ void mpris_metadata_watcher(struct metadata_bundle *argc, __attribute__((unused)
// debug(1,"Set metadata");
media_player2_player_set_metadata(mprisPlayerPlayerSkeleton, dict);
media_player2_player_set_volume(mprisPlayerPlayerSkeleton, metadata_store.speaker_volume);
// media_player2_player_set_volume(mprisPlayerPlayerSkeleton, metadata_store.speaker_volume);
}
static gboolean on_handle_next(MediaPlayer2Player *skeleton, GDBusMethodInvocation *invocation,
+2
View File
@@ -2512,6 +2512,8 @@ void player_volume(double airplay_volume, rtsp_conn_info *conn) {
#ifdef HAVE_DACP_CLIENT
int32_t actual_volume;
if (dacp_get_volume(&actual_volume) == 200) {
conn->dacp_volume = actual_volume; // store this as the actual volume
debug(1,"Got volume of %d.",actual_volume);
metadata_hub_modify_prolog();
if (metadata_store.speaker_volume == actual_volume)
metadata_hub_modify_epilog(0); // no change