Paul Brossier wrote: > On Fri, May 26, 2006 at 10:25:57PM +1000, Erik de Castro Lopo wrote: > > karsten wiese wrote: > > > > > > > > > > As usual, the source code can be found at http://aubio.piem.org/ , > > > > and Debian packages are available from http://piem.org/debian/ . > > > > Errm, this looks really weird. > > > > @@ -41,7 +41,7 @@ > > aubio_sndfile_t * new_aubio_sndfile_ro(const char* outputname) { > > aubio_sndfile_t * f = AUBIO_NEW(aubio_sndfile_t); > > SF_INFO sfinfo; > > - AUBIO_MEMSET(&sfinfo, 0, sizeof (sfinfo)); > > + AUBIO_MEMSET(&sfinfo, 0, sfinfo); > > sfinfo.format = 0; > > > > f->handle = sf_open (outputname, SFM_READ, &sfinfo); > > > > Are you sure you don't have diff direction wrong? > > no, stefan's patch is correct. the macro reads: > > #define AUBIO_MEMSET(_dst,_src,_t) memset(_dst,_src,sizeof(_t))
!!!!!!!! What compiler are you using that didn't call SF_INFO sfinfo; memset (&sfinfo, 0, sfinfo) ; an error? Even without any warnings turned on, gcc-3.3 and gcc-4.0 refuse to compile this and give an error "incompatible type for argument 3 of `memset'". > this also explains the 'strange' > sndfile behavior i found on powerpc, wrongly 'fixed' with the > sfinfo.format = 0 line. No it doesn't. Every compiler I can find refuses to compile the above line because it simply doesn't make sense. Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ Moore's Law: hardware speed doubles every 18 months Gates' Law: software speed halves every 18 months