On Jun 01 12:36:38, martinw...@gmail.com wrote: > On 6/1/24 11:31, Jan Stary wrote: > > Would it be sensible to restrict the rate to audio frequencies? > > Would there be any loss in requiring them to be integers? > > I once needed to oversample a seismic recording sampled at 27.27Hz for a > client so you never know what people might need.
Right, so having non-ntegral values has its use. Out of curiosity, how does the 27.27 come about? (Guessing naively, it's 27.27 * 60 * 60 = 98172.00 times an hour, an integral number.) > However, limiting it so > that known possible internal overflows can't occur would make sense. > As to what that range should be... hard to analyse. 5 Hz to 192 kHz. Not that it would prevent the counterexample present in the file linked to the bugreport, but you couldn't make such a counterexample without getting huge (as opposed to a rate of e-6). > Is there any way to guard globally against integer overflows in a large C > code base? Using https://man.openbsd.org/strtonum everywhere would be a start. https://github.com/janstary/sox/issues/47 Jan _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel