0
0

Hey, I would like to get the current playing position in a MIDI file… but I can’t get any info function from fmusic to work with midi!
here is a quick example:

FSOUND_Init(44100, 32, 0);
FMUSIC_MODULE*mod = FMUSIC_LoadSong(“file.mid”);
FMUSIC_PlaySong(mod);
do
{
cout << FMUSIC_GetOrder(mod);
cout << FMUSIC_GetPattern(mod);
cout << FMUSIC_GetPatternLength(mod, 0);
cout << FMUSIC_GetRow(mod);
cout << FMUSIC_GetSpeed(mod);
} while (! _kbhit() );
FSOUND_Close();

This example plays (loops) my MIDI-file, but displays only zero’s…
Thanks for any help.

  • You must to post comments
0
0

FMUSIC_GetOrder, FMUSIC_GetPattern, FMUSIC_GetPatternLength, FMUSIC_GetRow and FMUSIC_GetSpeed are not for midis or sgt file. They only works with module file like mod, s3m, xm, it …
However, you can load a midi file as a stream and then call the appropriate functions. ( FSOUND_Stream_GetTimeMS for example works great ).

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.