Quote:
I'm sorry, but I think I must revert the "media path" commit again ... Dandling pointers, memory leaks, win32 is broken (sound loading ends with a coredump). That's more than I can manage right now.
OK, my C is rusty (who said crappy?)
Quote:
IMHO, we should think about another way to do all this, and from my point of vue, the idea of vicente is probably the simpliest : a function resolving a correct path from a given filename.
I couldn't disagree more : It's the kind of things that drive programmers crazy (what happens if I forgot to use the path function?) and it is
ugly (IMHO).
About OGG, from the ogg vorbis library :
Code:
int ov_open(FILE *f, OggVorbis_File *vf,char *initial,long ibytes);
I don't see how your code will work, and, for the record, OGG worked perfectly well here...So I don't understand your problem with OGG (I know the code in file.c should be more polished, but I thought it was "well enough" for a sharing, testing, debugging cycle)
About the WAV loading problem under win32, sorry I can't test changes under win32. This may have to do with the second #ifdef block wich uses an older (and untested) API. Let's hope windows implements fread() correctly...
About strtok_r, maybe the non-reentrant strtok (not thread safe) or a more portable string tokenizer exists. BTW, the method you talk about hits the same problem.
Quote:
With this method, we need only very small changes in other subjects (sound, php, raydium_file_fopen, ...), avoiding current problem wich already takes me more than 2 hours today
I thought Mania Drive was ready for release when I tested it 2 months ago, I don't see why you're so in a hurry now ; Do as you want but I find sad to give up API's clarity for schedule proposes. So release Mania Drive, and let's work on issues after that.