Sign in to follow this  

Playing multimedia

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this