[Openal-devel] Bug in alut

neXyon nexyon at gmail.com
Thu Feb 5 13:17:24 PST 2009


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
-------------- next part --------------
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;


More information about the Openal-devel mailing list