get_midi_length man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

get_midi_length(3)		Allegro manual		    get_midi_length(3)

NAME
       get_midi_length	- Determines the total playing time of a midi, in sec‐
       onds. Allegro game programming library.

SYNOPSIS
       #include <allegro.h>

       int get_midi_length(MIDI *midi);

DESCRIPTION
       This function will simulate playing the given MIDI, from start to  end,
       to  determine  how  long it takes to play. After calling this function,
       midi_pos will contain the negative number of beats, and	midi_time  the
       length of the midi, in seconds.

       Note  that  any	currently  playing  midi is stopped when you call this
       function.  Usually you would call  it  before  play_midi,  to  get  the
       length of the midi to be played, like in this example:

	  length = get_midi_length(my_midi);
	  play_midi(my_midi);
	  do {
	     pos = midi_time;
	     textprintf_ex(screen, font, 0, 0, c, -1, "%d:%02d / %d:%02d\n",
		pos / 60, pos % 60, length / 60, length % 60);
	     rest(100);
	  } while(pos <= length);

RETURN VALUE
       Returns the value of midi_time, the length of the midi.

SEE ALSO
       load_midi(3), midi_time(3), midi_pos(3), exmidi(3)

Allegro				 version 4.4.2		    get_midi_length(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net