On Sun, Apr 23, 2006 at 10:46:47AM +1000, Erik de Castro Lopo wrote: > Paul Brossier wrote: > > > hi, > > > > i can reproduce this with 1.0.15-2 with pretty much any sound file, > > for instance /usr/share/sounds/KDE_Beep_Ahem.wav. > > Ok, if this fails for all files then the original bug report > was rather misleading.
yes indeed, sorry for the confusion. actually, it seems that the behavior of sndfile is slightly different on powerpc64 G5 and powerpc ibook G4 [1]. sndfile-play from 1.0.15-3 plays that file correctly on the G4. unfortunately i don't have physical access to the G5 at the moment, so I can only confirm that for the ibook. many thanks, paul [1] not sure why yet, but i found the following code successfull on all files on g5, but failing for some (rare) files on g4 with the message: Unable to open input file /tmp/double_bass_pizz1.wav. Error. Bad format field in SF_INFO struct when openning a RAW file for read. -- 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)); if (! (f->handle = sf_open (outputname, SFM_READ, &sfinfo))) { AUBIO_ERR("Unable to open input file %s.\n", outputname); AUBIO_ERR("%s\n",sf_strerror (NULL)); /* libsndfile err msg */ return NULL; } //... return f; } -- correcting this, according to the example in sndfile-info.c, seems to be more robust: -- aubio_sndfile_t * new_aubio_sndfile_ro(const char* outputname) { aubio_sndfile_t * f = AUBIO_NEW(aubio_sndfile_t); SF_INFO sfinfo; sfinfo.format = 0; f->handle = sf_open (outputname, SFM_READ, &sfinfo); if (f->handle == NULL) { AUBIO_ERR("Unable to open input file %s.\n", outputname); AUBIO_ERR("%s\n",sf_strerror (NULL)); /* libsndfile err msg */ return NULL; } //... return f; } -- > > I have a rather crusty old G3 iBook and just did an upgrade on > and installed sndfile-programs version 1.0.15-2. I find that > this version uses OSS for sound playback instead of using ALSA. > > I suspect (and have seen this before) that the OSS driver for > PPC doesn't do the right endswapping. > > There are two possible fixes for this: > > - Fix the OSS driver. > - Get Anand to make the ALSA stuff a build depend for > sndfile-programs. > > It would probably be best if both things were done. > > Cheers, > Erik > -- > +-----------------------------------------------------------+ > Erik de Castro Lopo > +-----------------------------------------------------------+ > "Any verbose and tedious solution is error-prone because programmers > get bored" -- Bjarne Stroustrup > So what about C++? > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]