Error in pitchschmitt.c

Paul Dean PaulD at 4stlaw.com
Tue Mar 18 16:44:40 CET 2008


I'm working on getting AUBIO to compile on my VS2005 compiler. I run
into an error I have a question about.

In the aubio_pitchschmitt_detect() function, an array is declared with
an un-initiated size because we don't know what size input->length is.

Does input->length's value change during run-time or is it static? If
it's dynamic, we may have to use a vector here. 

 

 

***** pitchschmitt.c ******

.

.

.

 

smpl_t aubio_pitchschmitt_detect (aubio_pitchschmitt_t *p, fvec_t *
input)

{

  short buf[input->length];      <---- Compiler Error: cannot allocate
an array of unknown size.

  uint_t i;

  for (i=0; i<input->length; i++) {

    buf[i] = (short)(input->data[0][i]*32768.);

  }

  return aubio_schmittS16LE(p, input->length, buf);

}

.

.

.

 

 

 

 

Also.. in onsetdetection.c in the aubio_onsetdetection_kl() function,
this line give me a warning I'm not sure what to do with.

 

******* onsetdetection.c *********

.

.

.

if (isnan(onset->data[i][0])) onset->data[i][0] = 0.;   <---- Comiler
Warning: 'isnan' undefined; assuming extern returning int.

.

.

.

 

 

 

 

 
-aquawicket

 

P.S. I was able to get AUBIO to comple in VS2005 with the
aubio_pitchschmitt_detect() function commented out. 

     I'm using test-onsetdetection.c to create the executable. I'll test
it's functionality to see that everything works.

     Then I'll post a VS2005 Project along with a CMAKE script soon :-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.aubio.org/pipermail/aubio-user/attachments/20080318/862aa279/attachment.html>


More information about the aubio-user mailing list