0
0

um, hello everyone. we’re making a game for school and need to install fmod to get sound working. we’re using codewarrior 8.3 with cmu graphics 2.0. we downloaded the correct files, but aren’t exactly sure what to do with them.

um, thanks to anyone who helps!

  • You must to post comments
0
0

Are you trying to install FMOD?

All you do is slap the ‘fmod.dll’ file in your System directory or your App’s
directory and use the API Calls in the examples to play sounds.

  • You must to post comments
0
0

oh yeaa, i think we got it installed right, cause when we include fmod.h it doesn’t go all erroneous or anything, we just don’t know how to use the functions to play music and stuff

  • You must to post comments
0
0

You should look in the samples/ directory for some help. Also you can view documentation at http://52.88.2.202/docs/ .

  • You must to post comments
0
0

ok i think i got most of the functions, i just don’t understand what i do with them.

say for example i wanted to play a long mp3 file. would i do it like this:

[b:1avskt13]FSOUND_Stream_OpenFile (C://Sean!/blah.mp3, 1, 1);[/b:1avskt13]
[b:1avskt13]FSOUND_Stream_Play (int channel, FSOUND_STREAM *stream);[/b:1avskt13]

um, i’m not sure what to put in the numbers in the first function there, or what to put AT ALL in the second one.. a little help please?

here’s a copy of my code:
[b:1avskt13]

include <iostream>

include <sstream>

include <cmath>

include <CMUgraphics.h>

include “C://Sean!/SBHT!2/FMOD Sound Library/api/inc/fmod.h”

int main()
{
// setup all sounds
FSOUND_Init (44100, 32, 0);

// loads MUSIC to memory (MOD, S3M, XM, IT, or MID)
FMUSIC_MODULE * F_API FMUSIC_LoadSong (const char *name);

// plays MUSIC
signed char F_API FMUSIC_PlaySong (FMUSIC_MODULE *mod);

// loads SOUND EFFECT (small file) to memory for (WAV, MP2, MP3, OGG or RAW)
FSOUND_SAMPLE * F_API FSOUND_Sample_Load (int index, const char *name_or_data, unsigned int inputmode, int memlength);

// plays SOUND EFFECT
int F_API FSOUND_PlaySound (int channel, FSOUND_SAMPLE *sptr);

// loads MUSIC (big file) to memory for (WAV, MP2, MP3, OGG or RAW)
FSOUND_STREAM * F_API FSOUND_Stream_OpenFile (const char *filename, unsigned int mode, int memlength);

// plays MUSIC
int F_API FSOUND_Stream_Play (int channel, FSOUND_STREAM *stream);

return 0;
}[/b:1avskt13]

  • You must to post comments
0
0

Let me fix that code for you.

[code:1hu4rej0]
FSOUND_STREAM* pStream;

FSOUND_Init(44100,32,0);
pStream = FSOUND_Stream_OpenFile("C:/Sean!/blah.mp3",1,1);
FSOUND_Stream_Play(FSOUND_FREE,pStream);
[/code:1hu4rej0]

“int channel” = anything you like up to the value of the second parameter of FSOUND_Init(); preferably FSOUND_FREE to autoselect.
“FSOUND_STREAM* stream” = pointer to loaded stream, returned by FSOUND_Stream_OpenFile.

A little tip: looking at the source code for the FMOD samples may help.

  • You must to post comments
0
0

WOOOOO!! thank you soo much!! it actually works!!!

  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.