Audio-Mad
view release on metacpan or search on metacpan
length = mad_resample_block(THIS, &THIS->state[0], old_length, data, resampled);
PUSHs(sv_2mortal(newSVpvn((char *)resampled, sizeof(mad_fixed_t) * length)));
if (right != &PL_sv_undef) {
if (!SvPOK(right)) {
XSRETURN_UNDEF;
}
old_length = SvLEN(right) / sizeof(mad_fixed_t);
bufsize = old_length * ((int)((double)1 / fscale) + 1);
/* ugh.. that always looks ugly.. but it works */
data = (mad_fixed_t *)SvPV_nolen(right);
Renew((void *)resampled, bufsize, mad_fixed_t);
length = mad_resample_block(THIS, &THIS->state[1], old_length, data, resampled);
PUSHs(sv_2mortal(newSVpvn((char *)resampled, sizeof(mad_fixed_t) * length)));
}
Safefree((void *)resampled);
( run in 0.362 second using v1.01-cache-2.11-cpan-64827b87656 )