0
0

Hy,
im very desperated because i couldnt play midi-files with my fmodex-application. Ive read a
lot of different pages and also the documentation but i dont understand how to play.
I need the midi-support very fast and hope that someone could help me
thx Kante

  • You must to post comments
0
0

It’s same than using streams (FMOD_System_CreateSound with flags 80C9 (hex) should do).
Ensure a recend directx is installed (for Gm(16).dls)

  • You must to post comments
0
0

I am in the same case. I am trying to compile a midi player (very simple) and I have an error: "Unsupported file or Audio Format". This problem did not resolved: in a post by hotlips, Jun, 2006. (I took a piece of code)

Hoping your help, this is my midi player:

include <fmodex/fmod.h>

include <fmodex/fmod_errors.h>

include <cstdio>

include <cstdlib>

define ERRCHECK(result) if (result != FMOD_OK)\

{\
    printf(&quot;FMOD error! (%d) %s\n&quot;, result, FMOD_ErrorString(result));\
    exit(-1);\
}

int main(int argc, char *argv[])
{
FMOD_RESULT result;
FMOD_SYSTEM *system;

result = FMOD_System_Create(&amp;system);  // Create the main system object.
ERRCHECK(result);
result = FMOD_System_Init(system,100, FMOD_INIT_NORMAL, 0); // Initialize FMOD.
ERRCHECK(result);

FMOD_CREATESOUNDEXINFO exinfo;
FMOD_SOUND *sound;

exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
exinfo.dlsname = &quot;gm.dls&quot;;

//I have already test with 0x80C9 and with 0x100 instead of FMOD_DEFAULT but no improvement
result = FMOD_System_CreateSound(system,"flourish.mid", FMOD_DEFAULT, &exinfo, &sound);
ERRCHECK(result);
FMOD_CHANNEL *channel;
result = FMOD_System_PlaySound(system,FMOD_CHANNEL_FREE, sound, false, 0);
ERRCHECK(result);
getchar();
FMOD_System_Release(system);
return 0;
}

Thanks Charles
(OS: Suse Linux 10.1)

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.