int audiod_status = AUDIOD_ON;
struct gengetopt_args_info conf;
-static char *af_status, /* the audio format announced in server status */
- *socket_name;
+static char *socket_name;
static FILE *logfile;
static struct audio_format_info afi[NUM_AUDIO_FORMATS];
int i;
struct timeval diff;
- if (!af_status)
+ if (!stat_task->af_status)
return 0;
- i = get_audio_format_num(af_status);
+ i = get_audio_format_num(stat_task->af_status);
if (i < 0)
return 0;
if (decoder_running(i))
stat_task->playing = strstr(line, "playing")? 1 : 0;
break;
case SI_FORMAT:
- free(af_status);
- af_status = para_strdup(line + ilen + 1);
+ free(stat_task->af_status);
+ stat_task->af_status = para_strdup(line + ilen + 1);
break;
case SI_OFFSET:
stat_task->offset_seconds = atoi(line + ilen + 1);