[vorbis-dev] BeOS on PPC compile, thread question.
David Mitchell
mitchell at ucar.edu
Wed Nov 15 16:34:00 PST 2000
Monty wrote:
>
> > 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++?
In fact I am compiling as C++. Under BeOS, these functions will
eventually end up inside of a C++ class. So, I'm kind of stuck.
It's not the end of the world.
>
> > 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.
That's good to know. Since I still haven't gotten to the point of
having a working binary yet (just started last night), it's nice
to know that I'm not doing anything horrible to the code.
>
> > 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.
It's actually not available in older versions of the BeOS. I'd
use a newer version, but the media stuff in the new releases
overpowers my poor old 133MHz BeBox.
>
> > 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.
Cool. Thanks for the help.
-David Mitchell
>
> 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.
--- >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