Unix and Linux Discussions Tagged with length |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
10 |
98,716 |
Shell Programming and Scripting |
|
|
|
5 |
2,773 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
22,852 |
Programming |
|
|
|
5 |
2,661 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
1,707 |
UNIX for Beginners Questions & Answers |
|
|
|
14 |
25,412 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
1,440 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
2,906 |
Shell Programming and Scripting |
|
|
|
1 |
1,308 |
What is on Your Mind? |
|
|
|
8 |
12,669 |
Shell Programming and Scripting |
|
|
|
1 |
974 |
What is on Your Mind? |
|
|
|
2 |
2,335 |
Shell Programming and Scripting |
|
|
|
3 |
1,909 |
Shell Programming and Scripting |
|
|
|
3 |
1,321 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
2,707 |
Shell Programming and Scripting |
|
|
|
1 |
4,982 |
Shell Programming and Scripting |
|
|
|
2 |
1,549 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
5,519 |
Shell Programming and Scripting |
|
|
|
6 |
3,224 |
Shell Programming and Scripting |
|
|
|
4 |
3,449 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
15,441 |
UNIX for Dummies Questions & Answers |
|
|
|
10 |
25,744 |
Shell Programming and Scripting |
|
|
|
14 |
28,043 |
Shell Programming and Scripting |
|
|
|
5 |
4,152 |
Shell Programming and Scripting |
|
|
|
1 |
2,036 |
Shell Programming and Scripting |
|
|
|
1 |
4,448 |
Programming |
|
|
|
6 |
8,248 |
Programming |
|
|
|
7 |
39,480 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,566 |
Shell Programming and Scripting |
|
|
|
10 |
5,938 |
Shell Programming and Scripting |
|
|
|
3 |
2,951 |
Shell Programming and Scripting |
|
|
|
2 |
1,920 |
Shell Programming and Scripting |
|
|
|
2 |
4,132 |
IP Networking |
|
|
|
10 |
5,088 |
Programming |
|
|
|
7 |
13,442 |
Shell Programming and Scripting |
|
|
|
5 |
62,905 |
Shell Programming and Scripting |
|
|
|
2 |
2,155 |
Shell Programming and Scripting |
|
|
|
4 |
2,236 |
Shell Programming and Scripting |
|
|
|
6 |
2,558 |
Shell Programming and Scripting |
|
|
|
7 |
10,941 |
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)