Problems with GME.mod on Win8.1

BlitzMax Forums/Brucey's Modules/Problems with GME.mod on Win8.1

Adam Novagen(Posted 2015) [#1]
I'm going to preface this by saying that I only have a very vague "follow instructions" understanding of what I'm doing regarding modules, so bear with me on this one.

A while ago I nabbed GME.mod, thrilled to find something that could play genuine, raw VGM files without needing to convert them to OGG or the like. On Windows 7 and under, all my tests were successful and everything was hunky-dory. However, I recently got a Windows 8.1 laptop, and for some reason this is where the good times end.

Whenever I try to compile the included example_openal.bmx, it throws the following exception:
Attempt to call uninitialized function pointer

I unfortunately have absolutely zero idea what this means. I can at least say that according to BLIde's debugger, the exception is being thrown by the alGenBuffers() call in the TOpenALGMEPlayer.new() method, if that helps. I've tried the few things I could think of to sort this out but right now I'm stumped. The exact same file still works perfectly on my Win7 desktop; I have my BlitzMax installation folder synchronized between laptop and desktop via a NAS drive. Both systems are 64-bit, if that's relevant.


ziggy(Posted 2015) [#2]
Are you sure you're getting this error when you try to compile and not when you try to run it? It looks like you're trying to call a function from a DLL, and maybe the DLL is missing.


Adam Novagen(Posted 2015) [#3]
Pardon, yes. Blitz got me so spoiled with "F5 to do the thing" that I often forget there's a difference between compile and compile-and-run. To clarify, this happens when I use F5 to compile-and-run, about three lines down the example file. Not sure if it's during the compile time or runtime, the compiling is so quick it's hard to tell.


Brucey(Posted 2015) [#4]
I just tried to run the example without OpenAL installed. It crashed.
After copying the OpenAL32.dll into the examples folder, it ran okay. As ziggy says, it's probably a DLL issue you are having.

OpenAL tends to install itself into the system. I personally prefer dlls for my apps in the same folder as the app...


Adam Novagen(Posted 2015) [#5]
That made an enormous amount of sense, so I checked my laptop for the DLL and sure enough, nowhere to be found; a scan of my desktop found four instances, two of which were game bundles and the other two being in system32 and SysWOW64, respectively.

However, some interesting results. I first tried copying the DLL directly into the GME examples directory. Still threw the same pointer error. So, I tried copying it into the gmeopenal directory, thinking that perhaps since gmeopenal.bmx was the file ultimately throwing the exception, the DLL needed to be there (a silly thought in retrospect). Still the same error. Then, I tried copying the DLL into system32 and SysWOW64, and even rebooted. Still the same error.

The only thing that finally worked was when I grabbed the actual OpenAL32 installer directly from creative.com. Once I ran this, everything worked exactly as expected, without even needing a reboot. This now solves everything for my work environment, but raises some concerns for me regarding the end user when this game is eventually complete. No ordinary consumer is going to want to be told "go to this site and download this thing before you can play this game." Will I need to bundle this installer (which is, to my knowledge, total freeware as per the nature of Open** stuff) with the game? Will writing a simple registry key do the job? Clearly the installer does something extra besides copying the DLL, but if a simple file copy worked in your test then I'm still not quite sure what's going on at my (or the the consumer's) end. Any thoughts on this?


Adam Novagen(Posted 2015) [#6]
Ah! Finally, success. Turns out there was one more DLL I didn't know about, namely wrap_oal.dll, which is essential to making things work. On the one hand I feel like a fool for not thinking of something that simple, but on the other hand I've never worked with OpenAL directly before so I honestly didn't know what to expect. Anyway, problem completely solved, no more worries about the end user, things can continue on cheerfully. Thanks for the help folks!