-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, While trying to build the current vorbis libraries and examples on MacOS with CodeWarrior 6, I stumbled on some problems, for which I've made some patches. The first problem was the static function bark_noise_median() in vorbis/lib/psy.c (r1.49), which has as a second parameter a "const long *". It is only called once in _vp_compute_mask() in psy.c, but with a "unsigned long *" parameter (it's the bark member of the vorbis_look_psy structure). This causes CW6 to complain with: Error : illegal implicit conversion from 'unsigned long *' to 'const long *' psy.c line 696 p->vi->noisewindowfixed); To get rid of this error, there are two possibilities: either change the bark_noise_median() function to have a "const unsigned long *" as second parameter (as in vorbis1.diff), or change the vorbis_look_psy structure's bark member to a "long *" (as in vorbis2.diff). I'm not sure which is best, but the first solution seems to have the least impact on other files. Note that some other compilers only give a warning for such an implicit conversion (for example the Intel compiler on Win32) and others say nothing at all (for example the Microsoft VC++ compiler). I'm not sure what the C standard(s) say about this. :) The second problem was with the examples in vorbis/examples, where stdin and stdout are used for I/O. For Win32, there is some code (and a "Damn Windows" comment :) to switch stdin and stdout to binary mode, since by default these streams are opened in text mode. However, on MacOS the EOL convention is also different from Unix... Therefore another such kludge is needed, at least with CodeWarrior, since the CW command line support opens stdin and stdout in text mode. So I put in some code which switches stdin and stdout to binary mode, just as with Win32; see examples.diff. Cheers, - -- Dimitry Andric <dim@xs4all.nl> PGP Key: http://www.xs4all.nl/~dim/dim.asc Fingerprint: 7AB462D2CE35FC6D42394FCDB05EA30A2E2096A3 -----BEGIN PGP SIGNATURE----- Version: PGP 6.5i Comment: http://www.gn.apc.org/duncan/stoa_cover.htm iQA/AwUBO1LbXrBeowouIJajEQKH6QCfYUhSa24w/IEOwHm12OK1iD4gESAAoLOQ 3KWkGqdfUnDy9SSTJ/8QC3JQ =a12D -----END PGP SIGNATURE----- <HR NOSHADE> <UL> <LI>application/octet-stream attachment: vorbis1.diff </UL> -------------- next part -------------- A non-text attachment was scrubbed... Name: vorbis1.diff Type: application/octet-stream Size: 516 bytes Desc: not available Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20010716/2012a56f/vorbis1-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: vorbis2.diff Type: application/octet-stream Size: 421 bytes Desc: not available Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20010716/2012a56f/vorbis2-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: examples.diff Type: application/octet-stream Size: 1524 bytes Desc: not available Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20010716/2012a56f/examples-0001.obj