Curious linux behavior re: analysis files

Started by soundfun, June 06, 2014, 04:24:30 PM

Previous topic - Next topic

soundfun

This post is following up on another one of my posts that concerns compiling the tools under linux.

I thought that I had been able to compile the CDP tools correctly because the more simple tools worked without a problem. When I tried running the pvoc programme to create analysis files I bumped into a problem.

Running the following (and assuming that an analysis file ends in ana or is user specified) I received the following errors:

./pvoc anal 1 ./shsyn.wav output.ana
ERROR: INVALID DATA
ERROR: Cannot open output file output.ana
*** Error in `./pvoc': double free or corruption (top): 0x08872c60 ***

I have removed some of the memory dump here.


Though I have little c programming skills, I went digging with a debugger. I the problem seemed to be a problem in line 4574, file sfsys.c which does:

if((ext = getenv("CDP_SOUND_EXT")) == NULL) { /* error handing code that I omitted */ }

In the terminal I set the environment variable CDP_SOUND_EXT and run the command:

./pvoc anal 1 ./shsyn.wav output.wav

The .wav file is rather odd being 344hz file with 1024 channels. I think it worked! If I set the environment variable to ana, it does not work.

Still have to tinker to see if I can use the commands that require analysis files.

This does leave me with the question though - is this request for the environment variable necessary? Is this the intended behaviour? Is this indicated somewhere in the documentation that I have not seen?

Also, is there some sense in creating a git repository? I have been tinkering with the linux Makefiles (the ordering of some of libraries is wrong for gcc on Ubuntu anyway). Is there a good way to make code contributions? I could provide a diff?

rwdobson

Yes, at present the environment variable CDP_SOUND_EXT does need to be set. This is documented for OS X and Windows, but I failed to write equivalent install documentation fort linux, partly as it was something of a tentative release anyway.

This is an inheritance dating way back to the first version of the CDP system on PC, where everything including all the frequency domain files was/is based on either WAVE or AIFF, with custom extra header chunks, depending on platform. With this variable set, the software knows which format in which to write pvoc and other frequency domain files (formant, transposition, etc) . With the steady attrition over the years of big-endian architectures (e.g. old Apple machines based on the PowerPC) the only reasonable format is now WAVE, and the next (imminent) release will define this internally by default, so that the variable will not need to be set by the user (but still can should they want to).

A new source release is under final testing, using CMake build files written by John Fitch. One we are confident that it all builds on all platforms, etc, we will indeed look at setting up a site on github. This will also make it easier to post updates and new programs etc; which are already starting to appear from the pen of Trevor Wishart!