Thread: Wavpack
View Single Post
  #43  
Old 2005-05-08, 08:45 PM
jazzbo jazzbo is offline
 
Join Date: Nov 2004
Re: Wavpack

Quote:
Originally Posted by uhclem
I had a look at the source code for the shntool wavpack module. From what I can tell, the only think in there preventing shntool from using the new wavpack is that there is a line of code that tells shntool to exit if wavpack has a version number greater than 3.

Unfortunately I am not good enough with C++ to be sure that this is the only thing stopping shntool, or to change this and make a new compile. Perhaps some intrepid soul here could have a look at the source code and help us out.
When I took a look at the code -- it's all just C, btw -- yes, the version number was the major issue. But to be honest I didn't spend enough time figuring out an elegant solution. Here are the lines (168-170 in src/format_wv.c) uhclem was referring to:


if (tagcmp(wph.ckID,WAVPACK_MAGIC) || wph.version < 1 || wph.version > 4 || (wph.flags & RAW_FLAG)) {
return NOT_WV_FILE;
}


One of the problems is that the code isn't returning a wavpack version of 4 either -- it is in the thousands if I remember right. So my concern is that something else in the header format has changed as well, or the shntool code isn't interpreting the header correctly. I didn't see anything obvious on the wavpack site to document any changes. But changing the second check to like 10000 is enough to make it work.
Reply With Quote Reply with Nested Quotes