« Return to Thread: Bug in alut

Bug in alut

by neXyon :: Rate this Message:

Reply to Author | View in Thread

Hi there!

I've found a bug that prevents older applications using the depricated
alut function alutLoadWAVMemory of the current freealut version to load
the sound.

In the file alutLoader.c in the function mentioned above you have the
bug on line 478, where it says

_alutLoadMemoryFromInputStream (stream, format, size, &freq);

which should be

*data = _alutLoadMemoryFromInputStream (stream, format, size, &freq);

to actually use the loaded sample data.

I attached a patch which fixes the bug.

Regards,

neXyon

Index: alut/src/alutLoader.c
===================================================================
--- alut/src/alutLoader.c (Revision 1619)
+++ alut/src/alutLoader.c (Arbeitskopie)
@@ -475,7 +475,7 @@
 
   /* ToDo: Can we do something less insane than passing 0x7FFFFFFF? */
   stream = _alutInputStreamConstructFromMemory (buffer, 0x7FFFFFFF);
-  _alutLoadMemoryFromInputStream (stream, format, size, &freq);
+  *data = _alutLoadMemoryFromInputStream (stream, format, size, &freq);
   if (*data == NULL)
     {
       return;

_______________________________________________
Openal-devel mailing list
Openal-devel@...
http://opensource.creative.com/mailman/listinfo/openal-devel

 « Return to Thread: Bug in alut