Advertisement Jump to content
Sign in to follow this  

Playing multimedia

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

i am looking for the best way to play multimedia in my game i am designing what someone here have a suggestion on playing AVI , and midi the avi should be played with sound that is why lesson 35 is not suitable and the midi is to be played in background and should not be affected by other sound effects thanks for the help BlackRyder

Share this post

Link to post
Share on other sites
something more simple????

i dont want to build right now a huge library... i mean it is really cool
the FMOD library it does alot of cool stuff but it is too complicated
i want something really easy... KIS type (Keep it simple :-) )

10x in advance

Share this post

Link to post
Share on other sites
FMOD is really super-easy to implement in a project, it just looks unduely complicated due to the huge array of things it can do. Here's a quick example of how to use it:

// include files
#include "./fmod.h"
#include "./fmod_errors.h"

/* initialise */

// initialise FMOD with 32 channels and 44100KHz
FSOUND_Init(44100, 32, 0);

/* stream */

// declare a stream

// load stream
stream = FSOUND_Stream_Open("foo.ogg", 0, 0, 0);

// play stream
FSOUND_Stream_Play(FSOUND_FREE, stream);

// free stream

/* sample */

// declare a sample

// load sample
FSOUND_Sample_Load(FSOUND_FREE, "bar.wav", 0, 0, 0);

// play sample
FSOUND_PlaySound(FSOUND_FREE, sample);

// free sample

/* de-initialise */

// kill FMOD

For MS Visual C++ you'll need to include 'fmodvc.lib' as well.

Hope that helped.

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!