Skip to main content
gamedev.net
🔒 Locked

OpenAL error when run

Started by BloodLust666 5 replies 700+ views
Original Post
BloodLust666
BloodLust666
my project and engine and whatnot compiles fine, but when i go to run it, as soon as it gets to my Init() for the audio part, a box comes up with this error: "An unhandled exception of type 'System.TypeLoadException' occurred in Drawing.exe Additional information: Could not load type ALCdevice_struct from assembly Drawing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null." what's that mean? I have the openal.dll in the same folder and i'm linking the openal.lib
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
CrazyCdn
CrazyCdn
Since there is no code, have you looked at devmasters site (under articles and at the very bottom for OpenAL example code?)

Other then that I think we need some code. Remember to use source tags too! :)
"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin
BloodLust666
BloodLust666
class cWAudio{private:	ALCdevice		*m_SoundDevice;// ... other stuffpublic:bool Init();// ... other stuff};bool cWAudio::Init(){	alGetError();	alutGetError();	// Create the device	m_SoundDevice = alcOpenDevice( NULL );	if (m_SoundDevice == NULL)				return cWUtility::ErrorLog.Write("cWAudio::Init() No device open");	// Check for EAX 2.0 support	m_bEAX2 = (alIsExtensionPresent("EAX2.0") == 1) ? true : false;	alutInitWithoutContext(NULL, NULL);	CheckALError();	return true;}
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
BloodLust666
BloodLust666
tha's the code (only including the stuff that pertains (sp?) to OpanAL). what could be giving that error?
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
BloodLust666
BloodLust666
ok, there seems to be an error with the ALCdevice object.. when i took i out of my engine, it ran fine; none of the sound worked but everything ran fine, no errors.

Also, when i try to right click it and go to definitions, it says it hasn't been defined, so that could be it. In the alc.h the object isn't defined.. do i have an earlier version or something? y isn't the ALCdevice object defined? and y is it giving me that error?
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
BloodLust666
BloodLust666
does anyone know why this is happened? or know a solution?
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.