th = shairport_sync_get_frame_position(shairportSyncSkeleton);
if ((th == NULL) || (strcasecmp(th, argc->frame_position_string) != 0)) {
// debug(1, "Frame position string should be changed");
- shairport_sync_set_frame_position(shairportSyncSkeleton,
- argc->frame_position_string);
+ shairport_sync_set_frame_position(shairportSyncSkeleton, argc->frame_position_string);
}
}
}
static gboolean on_handle_set_frame_position_update_interval(ShairportSync *skeleton,
- GDBusMethodInvocation *invocation,
- const gdouble seconds,
- __attribute__((unused)) gpointer user_data) {
+ GDBusMethodInvocation *invocation,
+ const gdouble seconds,
+ __attribute__((unused))
+ gpointer user_data) {
debug(1, ">> set frame position update interval to %.6f.", seconds);
config.metadata_progress_interval = seconds;
shairport_sync_complete_set_frame_position_update_interval(skeleton, invocation);
return TRUE;
}
-
-
static void on_dbus_name_acquired(GDBusConnection *connection, const gchar *name,
__attribute__((unused)) gpointer user_data) {
NULL);
g_signal_connect(shairportSyncSkeleton, "handle-set-frame-position-update-interval",
- G_CALLBACK(on_handle_set_frame_position_update_interval),
- NULL);
+ G_CALLBACK(on_handle_set_frame_position_update_interval), NULL);
g_signal_connect(shairportSyncDiagnosticsSkeleton, "notify::verbosity",
G_CALLBACK(notify_verbosity_callback), NULL);
config.loudness_reference_volume_db);
shairport_sync_set_drift_tolerance(SHAIRPORT_SYNC(shairportSyncSkeleton), config.tolerance);
shairport_sync_set_volume(SHAIRPORT_SYNC(shairportSyncSkeleton), config.airplay_volume);
-
+
#ifdef CONFIG_APPLE_ALAC
if (config.use_apple_decoder == 0) {
shairport_sync_set_alacdecoder(SHAIRPORT_SYNC(shairportSyncSkeleton), "hammerton");
debug(2, "Play begin");
while (1) {
- int this_is_the_first_frame = 0; //will be set if it is
+ int this_is_the_first_frame = 0; // will be set if it is
// check a few parameters to ensure they are non-zero
if (config.output_rate == 0)
debug(1, "config.output_rate is zero!");
}
uint64_t should_be_time;
frame_to_local_time(inframe->given_timestamp, &should_be_time, conn);
-
+
config.output->play(conn->outbuf, play_samples, play_samples_are_timed,
inframe->given_timestamp, should_be_time);
#ifdef CONFIG_METADATA
- // debug(1,"config.metadata_progress_interval is %f.", config.metadata_progress_interval);
+ // debug(1,"config.metadata_progress_interval is %f.",
+ // config.metadata_progress_interval);
if (config.metadata_progress_interval != 0.0) {
char hb[128];
if (this_is_the_first_frame != 0) {
memset(hb, 0, 128);
- snprintf(hb, 127, "%" PRIu32 "/%" PRId64 "", inframe->given_timestamp, should_be_time);
+ snprintf(hb, 127, "%" PRIu32 "/%" PRId64 "", inframe->given_timestamp,
+ should_be_time);
send_ssnc_metadata('phbt', hb, strlen(hb), 1);
time_of_last_metadata_progress_update = local_time_now;
} else {
int64_t delta = iv - local_time_now;
if (delta <= 0) {
memset(hb, 0, 128);
- snprintf(hb, 127, "%" PRIu32 "/%" PRId64 "", inframe->given_timestamp, should_be_time);
+ snprintf(hb, 127, "%" PRIu32 "/%" PRId64 "", inframe->given_timestamp,
+ should_be_time);
send_ssnc_metadata('phbt', hb, strlen(hb), 1);
time_of_last_metadata_progress_update = local_time_now;
}
- }
+ }
}
#endif
}
config.output->play(conn->outbuf, play_samples, play_samples_are_timed,
inframe->given_timestamp, should_be_time);
#ifdef CONFIG_METADATA
- // debug(1,"config.metadata_progress_interval is %f.", config.metadata_progress_interval);
+ // debug(1,"config.metadata_progress_interval is %f.",
+ // config.metadata_progress_interval);
if (config.metadata_progress_interval != 0.0) {
char hb[128];
if (this_is_the_first_frame != 0) {
memset(hb, 0, 128);
- snprintf(hb, 127, "%" PRIu32 "/%" PRId64 "", inframe->given_timestamp, should_be_time);
+ snprintf(hb, 127, "%" PRIu32 "/%" PRId64 "", inframe->given_timestamp,
+ should_be_time);
send_ssnc_metadata('phbt', hb, strlen(hb), 1);
time_of_last_metadata_progress_update = local_time_now;
} else {
int64_t delta = iv - local_time_now;
if (delta <= 0) {
memset(hb, 0, 128);
- snprintf(hb, 127, "%" PRIu32 "/%" PRId64 "", inframe->given_timestamp, should_be_time);
+ snprintf(hb, 127, "%" PRIu32 "/%" PRId64 "", inframe->given_timestamp,
+ should_be_time);
send_ssnc_metadata('phbt', hb, strlen(hb), 1);
time_of_last_metadata_progress_update = local_time_now;
}
- }
+ }
}
#endif
}