#include "string.h"
#include "aac.h"
-/** the output buffer size */
-#define AAC_OUTBUF_SIZE (32 * 1024)
-
-/** give up decoding after that many errors */
+/** Give up decoding after that many errors. */
#define MAX_ERRORS 20
/**
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;
}
struct private_aacdec_data *padd = para_calloc(sizeof(*padd));
fn->private_data = padd;
- fn->bufsize = AAC_OUTBUF_SIZE;
- fn->buf = para_calloc(fn->bufsize);
fn->min_iqs = 2048;
padd->handle = aac_open();
}
struct private_aacdec_data *padd = fn->private_data;
NeAACDecClose(padd->handle);
- free(fn->buf);
- fn->buf = NULL;
free(padd);
fn->private_data = NULL;
}