0
0

I can get a wav file to play just fine.. However, when i play a mp3 it claims its playing (isPlaying is true) but it doesnt actually make a sound. Audibility is 1 and so is volume. Here’s the working code for a wav, but if i change it to .mp3 i hear nothing at all. Wont even play the wave.mp3 from fmod’s media folder (and similarly, the playStream example will increase the timer but will not make sound.. even if i run the precompiled one in the bin folder, because it opens an mp3).

[code:3dyr6zfk]

include <fmod.hpp>

include <fmod_errors.h>

include <iostream>

include <stdio.h>

using namespace std;

void ERRCHECK(FMOD_RESULT result)
{
if (result != FMOD_OK)
{
printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
exit(-1);
}
}
int main(int argc, char *argv[])
{
FMOD::System *system;
FMOD::Sound *sound1, *sound2, *sound3;
FMOD::Channel *channel = 0;
FMOD_RESULT result;
int key;
unsigned int version;

/*
    Create a System object and initialize.
*/
result = FMOD::System_Create(&amp;system);
ERRCHECK(result);

result = system-&gt;getVersion(&amp;version);
ERRCHECK(result);

if (version &lt; FMOD_VERSION)
{
    printf(&quot;Error!  You are using an old version of FMOD %08x.  This program requires %08x\n&quot;, version, FMOD_VERSION);
    return 0;
}

result = system-&gt;init(32, FMOD_INIT_NORMAL, 0);
ERRCHECK(result);

result = system-&gt;createSound(&quot;drumloop.wav&quot;, FMOD_SOFTWARE, 0, &amp;sound1);
ERRCHECK(result);

result = sound1-&gt;setMode(FMOD_LOOP_NORMAL);
ERRCHECK(result);

result = system-&gt;playSound(FMOD_CHANNEL_FREE, sound1, false, &amp;channel);
ERRCHECK(result);
while (1)
{
//  system-&gt;update();
}
return 0;

}
[/code:3dyr6zfk][/code]

Note: Yes, wave.mp3 is in the same folder as the program is being ran from, so when i swap from drumloop.wav to wave.mp3, it doesnt make sound anymore. Not that stupid of a mistake 😉 Also, I downloaded the most recent version last friday.

  • You must to post comments
0
0

Exactly the same problem ! Just download the previous version of FMOD (4.04.28 ) and it works perfectly ;).

  • You must to post comments
0
0

Please get the latest .31 version. It has been updated due to this bug.

  • You must to post comments
0
0

Where can we get the 0.31 version ? The latest available is 0.29 !

  • You must to post comments
0
0

Yeah.. where do we get the latest one if the website doesnt provide it?

  • You must to post comments
0
0

Apologies, the intermeddiate versions are located at

http://52.88.2.202/upload/development/

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.