aubio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error in pitchschmitt.c
- To: Paul Dean <PaulD@4stlaw.com>
- Subject: Re: Error in pitchschmitt.c
- From: Paul Brossier <piem@piem.org>
- Date: Mon, 31 Mar 2008 23:25:04 +0100
- Cc: aubio@piem.org
- In-reply-to: <EE64007B4FB4A84EB912EE2369F845BA0117BBDB@seals2000.sealstenenbaum.internal>
- References: <EE64007B4FB4A84EB912EE2369F845BA0117BBDB@seals2000.sealstenenbaum.internal>
- User-agent: Mutt/1.5.13 (2006-08-11)
hi again, On Tue, Mar 18, 2008 at 08:44:40AM -0700, Paul Dean wrote: > 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. thanks, not something gcc ever complained about, but not something to do either! > 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. you mean a c++ vector? i'd rather not use them in C :-) the fvec buf does have a fixed size, and should really be moved in the private structure of pitchschmitt. i opened a ticket and will get this fixed it for the next release: http://trac.aubio.org/ticket/8 as for the other problem about isnan, it sounds more like a linker warning. maybe you are missing a library, or a header? let us know if you find out more. thanks, Paul > > > > > > ***** 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 :-) > -- To unsubscribe, send mail to aubio-unsubscribe@piem.org.
- References:
- Error in pitchschmitt.c
- From: "Paul Dean" <PaulD@4stlaw.com>
- Error in pitchschmitt.c
- Prev by Date: Re: Real-Time Onset Detection
- Next by Date: [patch] compile fix for examples/tests/
- Previous by thread: Error in pitchschmitt.c
- Next by thread: Audio mailinglist still up?
- Index(es):