Unix and Linux Discussions Tagged with length |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
10 |
71,337 |
Shell Programming and Scripting |
|
|
|
5 |
2,307 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
21,249 |
Programming |
|
|
|
5 |
2,265 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
1,352 |
UNIX for Beginners Questions & Answers |
|
|
|
14 |
24,133 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
1,254 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
2,176 |
Shell Programming and Scripting |
|
|
|
1 |
1,177 |
What is on Your Mind? |
|
|
|
8 |
11,600 |
Shell Programming and Scripting |
|
|
|
1 |
889 |
What is on Your Mind? |
|
|
|
2 |
2,070 |
Shell Programming and Scripting |
|
|
|
3 |
1,773 |
Shell Programming and Scripting |
|
|
|
3 |
1,240 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
2,593 |
Shell Programming and Scripting |
|
|
|
1 |
4,815 |
Shell Programming and Scripting |
|
|
|
2 |
1,473 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
5,140 |
Shell Programming and Scripting |
|
|
|
6 |
3,102 |
Shell Programming and Scripting |
|
|
|
4 |
3,220 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
15,267 |
UNIX for Dummies Questions & Answers |
|
|
|
10 |
25,209 |
Shell Programming and Scripting |
|
|
|
14 |
27,499 |
Shell Programming and Scripting |
|
|
|
5 |
4,030 |
Shell Programming and Scripting |
|
|
|
1 |
1,925 |
Shell Programming and Scripting |
|
|
|
1 |
4,296 |
Programming |
|
|
|
6 |
8,149 |
Programming |
|
|
|
7 |
38,998 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,482 |
Shell Programming and Scripting |
|
|
|
10 |
5,760 |
Shell Programming and Scripting |
|
|
|
3 |
2,857 |
Shell Programming and Scripting |
|
|
|
2 |
1,832 |
Shell Programming and Scripting |
|
|
|
2 |
4,039 |
IP Networking |
|
|
|
10 |
4,893 |
Programming |
|
|
|
7 |
13,247 |
Shell Programming and Scripting |
|
|
|
5 |
62,710 |
Shell Programming and Scripting |
|
|
|
2 |
2,074 |
Shell Programming and Scripting |
|
|
|
4 |
2,158 |
Shell Programming and Scripting |
|
|
|
6 |
2,447 |
Shell Programming and Scripting |
|
|
|
7 |
10,798 |
Shell Programming and Scripting |
get_midi_length(3alleg4) Allegro manual get_midi_length(3alleg4)
NAME
get_midi_length - Determines the total playing time of a midi, in seconds. 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
",
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(3alleg4), midi_time(3alleg4), midi_pos(3alleg4), exmidi(3alleg4)
Allegro version 4.4.2 get_midi_length(3alleg4)