Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

vijaykiran

OpenGL can i read audio files in opengl applications?

This topic is 6014 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

hi guys, I have a problem and I am unaware of whether this has been discussed before. I have my C program written using OpenGL and I require some audio files to be played along with my application. Is there any function that reads the audio file and gives me the output? I appreciate anyone giving me helpful suggestions. Thanks, Vijay Kiran.

Share this post


Link to post
Share on other sites
Advertisement
Open GL is only a graphics API, try looking up some sound API's like Direct Sound. Try searching for one.

-J

[edited by - jason2jason on June 25, 2002 3:00:25 PM]

Share this post


Link to post
Share on other sites
I''m not an OpenGL expert, but what i know is that OpenGL is for graphics, if u want to handle sounds then u need a sound API.

If u''r running windows then PlaySound() function should solve ur problem. For more documentation check MSDN.

Hope it helps

Share this post


Link to post
Share on other sites
sdl? see www.libsdl.org
libraries to play wav''s ogg mp3 etc

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Of course you can, because an OpenGL application is no different than any other application and any application should be able to read files, and audio files are not special files, just normal files.

So, yes, you can read audio files in OpenGL applications. Of course the audio will have ABSOLUTELY NOTHING to do with OpenGL, because OpenGL is strictly graphics.

In conclusion, this is not an OpenGL question.

Share this post


Link to post
Share on other sites
AP''s right, but people normally get flamed for making that kind of observation.

Anyway, PlaySound is not gonna be something you''ll want to use in a game, and DirectSound (as of DX8.1) doesn''t support mp3 playback without additional support. For noncommercial projects, libraries such as Midas, FMOD, and BASS are free and very well-suited to your needs. OpenAL''s documentation is nebulous as it never (or hasn''t yet?) caught on. I hear that Creative Labs'' implementation is useable though.

Later,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

Share this post


Link to post
Share on other sites
quote:
Original post by ZealousElixir
OpenAL's documentation is nebulous as it never (or hasn't yet?) caught on. I hear that Creative Labs' implementation is useable though.



I hope it has caught on, coz UT2003 uses OpenAL for its audio system

[edit: hehe, silly quote tags went mad]

[edited by - _the_phantom_ on June 26, 2002 8:26:16 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!