Speech-Swift
view release on metacpan or search on metacpan
void
swift_waveform_get_samples(_wave)
swift_waveform *_wave
INIT:
int16_t *buffer = NULL;
int samples = 0;
int bytes_per_sample = 0;
int i = 0;
PPCODE:
if (SWIFT_FAILED(swift_waveform_get_samples(_wave, (const void**)&buffer, &samples, &bytes_per_sample)))
{
croak("failed to get samples from waveform object");
}
if ( (samples > 0) && (bytes_per_sample > 0) )
{
for(i=0; i<samples; i++)
{
XPUSHs(sv_2mortal(newSVnv(buffer[i])));
( run in 0.531 second using v1.01-cache-2.11-cpan-5511b514fd6 )