X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod.c;h=8d152fa6dfeb4b6aeb9441be02287e163ebc90c2;hp=defd673d20ba0029aaa228e7d23545fd11a5ce54;hb=e0545fd978a9583f9583b9bb35e5c25cb78c78f4;hpb=f90e920b43eb4035ded061bb889c8e4d819a2a97 diff --git a/audiod.c b/audiod.c index defd673d..8d152fa6 100644 --- a/audiod.c +++ b/audiod.c @@ -1,8 +1,4 @@ -/* - * Copyright (C) 2005 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* Copyright (C) 2005 Andre Noll , see file COPYING. */ /** \file audiod.c The paraslash's audio daemon. */ @@ -666,6 +662,7 @@ static int open_receiver(int format) EMBRACE(.name = name, .context = rn)); ret = r->open(rn); if (ret < 0) { + PARA_ERROR_LOG("could not open %s receiver\n", name); btr_remove_node(&rn->btrn); free(rn); return ret; @@ -801,38 +798,38 @@ static int update_item(int itemnum, char *buf) { long unsigned sec, usec; - if (stat_task->clock_diff_count && itemnum != SI_CURRENT_TIME) + if (stat_task->clock_diff_count && itemnum != SI_current_time) return 1; free(stat_item_values[itemnum]); stat_item_values[itemnum] = para_strdup(buf); stat_client_write_item(itemnum); switch (itemnum) { - case SI_STATUS_FLAGS: + case SI_status_flags: stat_task->vss_status = 0; if (strchr(buf, 'N')) stat_task->vss_status |= VSS_STATUS_FLAG_NEXT; if (strchr(buf, 'P')) stat_task->vss_status |= VSS_STATUS_FLAG_PLAYING; break; - case SI_OFFSET: + case SI_offset: stat_task->offset_seconds = atoi(buf); break; - case SI_SECONDS_TOTAL: + case SI_seconds_total: stat_task->length_seconds = atoi(buf); break; - case SI_STREAM_START: + case SI_stream_start: if (sscanf(buf, "%lu.%lu", &sec, &usec) == 2) { stat_task->server_stream_start.tv_sec = sec; stat_task->server_stream_start.tv_usec = usec; } break; - case SI_CURRENT_TIME: + case SI_current_time: if (sscanf(buf, "%lu.%lu", &sec, &usec) == 2) { struct timeval tv = {sec, usec}; compute_time_diff(&tv); } break; - case SI_FORMAT: + case SI_format: stat_task->current_audio_format_num = get_audio_format_num(buf); } @@ -1384,10 +1381,10 @@ static int status_post_select(struct sched *s, void *context) client_open(argc, argv, &st->ct, NULL, NULL, st->btrn, s); set_stat_task_restart_barrier(5); } - free(stat_item_values[SI_BASENAME]); - stat_item_values[SI_BASENAME] = para_strdup( + free(stat_item_values[SI_basename]); + stat_item_values[SI_basename] = para_strdup( "no connection to para_server"); - stat_client_write_item(SI_BASENAME); + stat_client_write_item(SI_basename); st->last_status_read = *now; out: start_stop_decoders();