Jump to content
  • Advertisement
Sign in to follow this  
bballmitch

Devices on all comps

This topic is 4435 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a device that exists on all computers? ALCdevice Device = alcOpenDevice((ALCchar*)"MMSYSTEM"); Thats what I'm using right now. On my computer that works correctly, but on EVERY other computer, Device returns NULL. What device works on all computers? If there is none, is there one that exists for all Windows? If not, again, then is there one that exists on all Windows XP? I can't figure out why that code doesn't work, but I know that that Device is returning NULL. Any ideas why? I know that this method has to do with OpenAL, but I thought being that I'm only talking about the device, that it would be safe to post it here.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by bballmitch
I know that this method has to do with OpenAL, but I thought being that I'm only talking about the device, that it would be safe to post it here.

I think you're just trying to get more audience [lol] I'm just kiddin !

Have you tried to call:
ALCdevice Device = alcOpenDevice(NULL);

I found this on openAL website:
Quote:

Connecting to a Device
The alcOpenDevice function allows the application (i.e. the client program) to connect to a device (i.e. the server).

ALCdevice * alcOpenDevice( const ubyte * deviceSpecifier);

If the function returns NULL, then no sound driver/device has been found. The argument is a null terminated string that requests a certain device or device configuration. If NULL is specified, the implementation will provide an implementation specific default.

At this point, system specific configuration, and operating system specific details, are handled by leaving the details of the string specifier to the implementation. The application coder has to determine how he wants to obtain this information from the OS or the user. If, at a later point, device enumeration and configuration requests are supported through ALC, the resulting string might still be operating system and implementation specific.


You probably already knew that, but just in case you didn't.

Good luck !
Janta

Edit: Tested, and that fails as well. So any other solution is welcome.

[Edited by - janta on May 28, 2006 11:03:21 PM]

Share this post


Link to post
Share on other sites
bump. Isn't there a universal device that I can use? Otherwise, it doesn't seem as if I will be able to play sound on many other computers. :(

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by bballmitch
bump. Isn't there a universal device that I can use? Otherwise, it doesn't seem as if I will be able to play sound on many other computers. :(


Janta told you to send NULL into the function. Is that not working or what?

Share this post


Link to post
Share on other sites
Once again, it worked on my computer, but its not working on anyone elses. Janta also said that it didn't work his computer either.

Share this post


Link to post
Share on other sites
Will someone please tell me how to change the following code so that it will work on the majority of computers? Its very important! Thanks.


ALCcontext *Context;
ALCdevice *Device;

//Open device
Device = alcOpenDevice((ALCchar*)"MMSYSTEM");
//Device = alcOpenDevice(NULL);

//Create context(s)
Context=alcCreateContext(Device,NULL);
//Set active context
alcMakeContextCurrent(Context);

// Clear Error Code
alGetError();

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!