X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=write.c;h=7dc9f85ce3223b24678214b526dd76e35c1d2dcf;hb=d4d37bb32a8d6219f9f52aa2ee3de55eb7e099c8;hp=416408a1f4cfe606d858ea833f4531225c3d90db;hpb=b0fe6d882dd35b01360a66e130d6714aff7b6a0d;p=paraslash.git diff --git a/write.c b/write.c index 416408a1..7dc9f85c 100644 --- a/write.c +++ b/write.c @@ -37,7 +37,7 @@ struct check_wav_task { /** Number of channels specified in wav header given by \a buf. */ unsigned channels; /** Sample rate specified in wav header given by \a buf. */ - unsigned samplerate; + unsigned sample_rate; /** The task structure used by the scheduler. */ struct task task; struct btr_node *btrn; @@ -72,10 +72,10 @@ static int check_wav_exec(struct btr_node *btrn, const char *cmd, char **result) struct check_wav_task *cwt = btr_context(btrn); - if (!strcmp(cmd, "samplerate")) { + if (!strcmp(cmd, "sample_rate")) { if (cwt->state != CWS_HAVE_HEADER) return -E_BTR_NAVAIL; - *result = make_message("%d", cwt->samplerate); + *result = make_message("%d", cwt->sample_rate); return 1; } if (!strcmp(cmd, "channels")) { @@ -107,7 +107,7 @@ static void check_wav_post_select(__a_unused struct sched *s, struct task *t) goto pushdown; cwt->min_iqs = 0; cwt->channels = 2; - cwt->samplerate = 44100; + cwt->sample_rate = 44100; if (a[0] != 'R' || a[1] != 'I' || a[2] != 'F' || a[3] != 'F') { PARA_NOTICE_LOG("wav header not found\n"); cwt->state = CWS_NO_HEADER; @@ -118,8 +118,8 @@ static void check_wav_post_select(__a_unused struct sched *s, struct task *t) cwt->state = CWS_HAVE_HEADER; sprintf(t->status, "check wav: have header"); cwt->channels = (unsigned) a[22]; - cwt->samplerate = a[24] + (a[25] << 8) + (a[26] << 16) + (a[27] << 24); - PARA_INFO_LOG("channels: %d, sample rate: %d\n", cwt->channels, cwt->samplerate); + cwt->sample_rate = a[24] + (a[25] << 8) + (a[26] << 16) + (a[27] << 24); + PARA_INFO_LOG("channels: %d, sample rate: %d\n", cwt->channels, cwt->sample_rate); btr_consume(btrn, WAV_HEADER_LEN); pushdown: btr_pushdown(btrn);