Ok guys I have question pertaining to OpenAL. There is this nice tutorial entitled "Programming 3D Sound with OpenAL in Windows" located
here on GD. I have read it and the accompanying forum. What I do not understand is what the point of the code segment is:
ALCcontext *Context;
ALCdevice *Device;
Device = alcOpenDevice((ALubyte*)"DirectSound3D");
if (Device == NULL)
{
exit(-1);
}
//Create context(s)
Context=alcCreateContext(Device,NULL);
//Set active context
alcMakeContextCurrent(Context);
// Clear Error Code
alGetError();
The only place it is used is in the cleanup code!
//Get active context
Context=alcGetCurrentContext();
//Get device for active context
Device=alcGetContextsDevice(Context);
//Disable context
alcMakeContextCurrent(NULL);
//Release context(s)
alcDestroyContext(Context);
//Close device
alcCloseDevice(Device);
I know he says -
Quote:For my application I am going to use the basic method of setting it up for DirectSound3D but it is also possible to make use of EAX by checking for its availability. |
But I had never done this in the AL audio wrapper I had made and it worked fine. Can someone please enlighten me? I have also looked at the provided source code for the tutorial and have not found anything different other than those segments. I have even found a different tutorial that used:
Context = alcCreateContext(Device, NULL);
Instead - so why the DirectSound3D if you choose to use OpenAL as your audio library? I actually added in that code and my audio class no longer works; that is why I am asking about it. There is also a beginning tutorial on OpenAL
here which also makes no refrence to the alcCreateContext and company. One last thing is that I even consulted the
OpenAL documentations on this topic, but ehh.... I'm still lost. Thank you for your time[attention] - Drew
[Edited by - Drew_Benton on May 25, 2005 9:48:39 PM]