Bug in alut

View: New views
2 Messages — Rating Filter:   Alert me  

Bug in alut

by neXyon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: Bug in alut

by Jason Daly :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

neXyon wrote:

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

Thanks for the patch!  It's committed

--"J"

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