[vorbis-dev] Modification requests / question

Frank Klemm pfk at fuchs.offl.uni-jena.de
Mon Dec 25 16:01:44 PST 2000

On Mon, Dec 25, 2000 at 09:43:34PM +0100, Attila Padar wrote:
> Hello!
> 1.
> You should modify the 'vorbis_ftoi(f)' for the undefinied OS/compiler
> in the 'os.h' on this way:
> old:
> static int vorbis_ftoi(double f){
>    return (int)(f+.5);
>   }
> new:
> #define vorbis_ftoi(f) ((int)(f+.5f))
Is f always >= 0 ?

If no, the function is works wrong.
If yes, the name of the function is dangerous.

May be someone can call it with vorbis_ftoi(-2.1) and gets a -1.

Frank Klemm

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

More information about the Vorbis-dev mailing list