On Tue, Mar 12, 2019 at 12:21:31PM +0000, Victor Lazzarini wrote: > Looks like there is a bug where negative values are not being accepted as sample formats. > ======================== > Prof. Victor Lazzarini > Dean of Arts, Celtic Studies, and Philosophy, > Maynooth University, > Maynooth, Co Kildare, Ireland > Tel: 00 353 7086936 > Fax: 00 353 1 7086952 > > > On 12 Mar 2019, at 11:37, John ff wrote: > > > > The change was heavily warned in the release notes. After a number of tries we settled on raw files needing a negative format to avoid the large number of errors that happened with the original scheme. Using libsndfile makes this area easier to use. There are only a few incompatible changes in the 30 years of development. > > > > ==John ff > > Yes, I suppose it does help to read the Release Notes (:-/) Unfortunately they really aren't much help when I did read them. Aside from a rather vague warning about backward compatibility, this is all I see: "GEN01 now uses format 0 to get the file type from the header; any other value indicates a raw file. THIS MAY BE INCOMPATIBLE. For most users the value of zero will be correct." No mention of negative values, or why they should be preferable. And I went to the source on github, and don't see any expectation of negative values in fgens.c: static const int gen01_format_table[10] = { 0, AE_CHAR, AE_ALAW, AE_ULAW, AE_SHORT, AE_LONG, AE_FLOAT, AE_UNCH, AE_24INT, AE_DOUBLE }; .... int fmt = (int) MYFLT2LRND(ff->e.p[7]); ...... if (UNLIKELY(fmt < 0 || fmt > 9)) return fterror(ff, Str("invalid sample format: %d"), fmt); p->format = gen01_format_table[fmt]; I feel that these changes were a bit hasty... Any chance of a reversion? -- Pete -- Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here