[vorbis-dev] Adding RC3 support to GoldWave

Segher Boessenkool segher at chello.nl
Fri Jan 4 20:35:58 PST 2002



> > The constant is _not_ negative (-1 isn't part of the number
> > token).  Yes, returning -1 as an unsigned is dirty.
> 
> Borland reports it as a warning.  Could -1L be used instead since a
> signed long is being returned, or is that a cross-platform problem?
> 
> > Some other compilers warn _without_ it.
> 
> I did not know that.

No, we are assigning to an unsigned long.  -1UL is an unsigned long;
-1L is a signed long.  We only care about  (signed long)-1UL < 0
by the way; so this is all fully valid, but your compiler is quite correct
in that negating an unsigned number is a weird thing to do, and probably
won't do what you expect (we only care about the sign bit being set, what
is exactly what we want).

> 
> > What's wrong with this?
> 
> Borland CodeGuard reports an access overrun of 4 bytes where it claims
> only 3 bytes exist. :-)  I just wanted to make sure that returning a
> pointer to an empty string is correct.

I think it is...  I'll look at it again, tomorrow morning.

> 
> I take it from Jack Moffitt's reply that no one is having trouble with
> the vorbis_encode_init() function?  For example:

The RC3 vorbis_encode_XXX interface is not the same as RC2's;  look at
encoder_example.c to see what other changes you need.  (I think you need to
call some extra functions; see a recent post by Monty about this, also).

<p>Segher

<p>--- >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