[vorbis-dev] Error in psytune.c

Jonathan Blow jon at bolt-action.com
Fri Apr 28 23:12:57 PDT 2000



When I was doing my compilation under win32 the compiler complained
that the definition of _psy_set0 in psytune.c was wrong.  I looked
and surely enough it was the wrong size for the data structure
it wanted to occupy.

It looked kinda like the version that was defined in modes.h, and
I assumed they were supposed to be the same thing, and the modes.h
one was right.  Since code duplication is a very bad thing I just
included modes.h, like so:

cvs diff psytune.c (in directory C:\code\vorbis\vorbis\lib)
Index: psytune.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psytune.c,v
retrieving revision 1.2
diff -r1.2 psytune.c
25a26
> #include "vorbis/modes.h"
30,35d30
< 
< static vorbis_info_psy _psy_set0={
<   {-20, -20, -14, -14, -14, -14, -14, -14, -14, -14,
<    -14, -14, -16, -16, -16, -16, -18, -18, -16, -16,
<    -12, -10, -6, -3, -1, -1, -0}, 0., (.6/1024), 10,4
< };

*****CVS exited normally with code 1*****

I guess gcc does not complain about this kind of thing.  I suppose
this could be one of those insidious bugs that manifests itself as
lower encoding quality?

   -Jonathan.

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/



More information about the Vorbis-dev mailing list