if (!strcmp(cmd, "samplerate")) {
if (padd->samplerate == 0)
- return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+ return -E_BTR_NAVAIL;
*result = make_message("%u", padd->samplerate);
return 1;
}
if (!strcmp(cmd, "channels")) {
if (padd->channels == 0)
- return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+ return -E_BTR_NAVAIL;
*result = make_message("%u", padd->channels);
return 1;
}
#define BUFFER_TREE_ERRORS \
PARA_ERROR(BTR_EOF, "buffer tree: end of file"), \
PARA_ERROR(BTR_NO_CHILD, "btr node has no children"), \
+ PARA_ERROR(BTR_NAVAIL, "btr node: value currently unavailable"), \
#define STDOUT_ERRORS \
PARA_ERROR(STDOUT_EOF, "stdout: end of file"), \
if (!strcmp(cmd, "samplerate")) {
if (pmd->samplerate == 0)
- return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+ return -E_BTR_NAVAIL;
*result = make_message("%u", pmd->samplerate);
return 1;
}
if (!strcmp(cmd, "channels")) {
if (pmd->channels == 0)
- return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+ return -E_BTR_NAVAIL;
*result = make_message("%u", pmd->channels);
return 1;
}
if (!strcmp(cmd, "samplerate")) {
if (pod->samplerate == 0)
- return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+ return -E_BTR_NAVAIL;
*result = make_message("%u", pod->samplerate);
return 1;
}
if (!strcmp(cmd, "channels")) {
if (pod->channels == 0)
- return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+ return -E_BTR_NAVAIL;
*result = make_message("%u", pod->channels);
return 1;
}
if (!strcmp(cmd, "samplerate")) {
if (pwd->ahi.sample_rate == 0)
- return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+ return -E_BTR_NAVAIL;
*result = make_message("%u", pwd->ahi.sample_rate);
return 1;
}
if (!strcmp(cmd, "channels")) {
if (pwd->ahi.channels == 0)
- return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+ return -E_BTR_NAVAIL;
*result = make_message("%u", pwd->ahi.channels);
return 1;
}
if (!strcmp(cmd, "samplerate")) {
if (cwt->state != CWS_HAVE_HEADER)
- return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+ return -E_BTR_NAVAIL;
*result = make_message("%d", cwt->samplerate);
return 1;
}
if (!strcmp(cmd, "channels")) {
if (cwt->state != CWS_HAVE_HEADER)
- return -ERRNO_TO_PARA_ERROR(ENAVAIL);
+ return -E_BTR_NAVAIL;
*result = make_message("%d", cwt->channels);
return 1;
}