[vorbis-dev] BeOS on PPC compile, thread question.

Monty xiphmont at xiph.org
Wed Nov 15 14:43:54 PST 2000



> The main one is that there are hundreds of implicit casts in the
> code that the Metrowerks compiler stops at. Unfortunately, it
> isn't happy with just giving warnings but insists on calling them
> errors. I'm cleaning them up, and was wondering if I put together
> a patch which changes the implicit casts to explicit casts, would
> it be accepted? 

No.  This is incorrect behavior in the compiler.  Are you sure you're
telling it to compile C and not C++?

> Also, while most of them are changing the void
> *'s from mallocs and reallocs (and hence probably harmless), some
> of them are telling me that I'm taking void * pointers from
> internal structures and having to cast them, which doesn't seem
> quite right.

It's correct.  Using void * is one way of doing a poor man's OO in C;
the casts are explicit and correct.

> I'm also getting bit by the lack of alloca on older BeOS's, but I
> don't expect anyone to change that since every OS including
> current rev's of BeOS provide alloca. Oh well. I'm putting in
> malloc/free pairs instead, which should speed things up quite a
> bit ;-)>

I'm sure that's there somewhere... if it isn't, it's a few lines of
assembly.

> On a related note, is the current libvorbis considered
> thread-safe? Since I'm going to be running this on a
> dual-processor box I would like to be able to initialize two
> separate streams in different threads so that I can encode two
> songs at once.

Yes, that works fine.

Monty

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