Unix and Linux Discussions Tagged with length |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
10 |
66,369 |
Shell Programming and Scripting |
|
|
|
5 |
2,237 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
21,038 |
Programming |
|
|
|
5 |
2,222 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
1,316 |
UNIX for Beginners Questions & Answers |
|
|
|
14 |
23,980 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
1,230 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
2,072 |
Shell Programming and Scripting |
|
|
|
1 |
1,163 |
What is on Your Mind? |
|
|
|
8 |
11,540 |
Shell Programming and Scripting |
|
|
|
1 |
879 |
What is on Your Mind? |
|
|
|
2 |
2,030 |
Shell Programming and Scripting |
|
|
|
3 |
1,762 |
Shell Programming and Scripting |
|
|
|
3 |
1,228 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
2,580 |
Shell Programming and Scripting |
|
|
|
1 |
4,793 |
Shell Programming and Scripting |
|
|
|
2 |
1,458 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
5,103 |
Shell Programming and Scripting |
|
|
|
6 |
3,085 |
Shell Programming and Scripting |
|
|
|
4 |
3,202 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
15,244 |
UNIX for Dummies Questions & Answers |
|
|
|
10 |
25,136 |
Shell Programming and Scripting |
|
|
|
14 |
27,432 |
Shell Programming and Scripting |
|
|
|
5 |
4,013 |
Shell Programming and Scripting |
|
|
|
1 |
1,916 |
Shell Programming and Scripting |
|
|
|
1 |
4,279 |
Programming |
|
|
|
6 |
8,138 |
Programming |
|
|
|
7 |
38,954 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,472 |
Shell Programming and Scripting |
|
|
|
10 |
5,733 |
Shell Programming and Scripting |
|
|
|
3 |
2,834 |
Shell Programming and Scripting |
|
|
|
2 |
1,824 |
Shell Programming and Scripting |
|
|
|
2 |
4,021 |
IP Networking |
|
|
|
10 |
4,876 |
Programming |
|
|
|
7 |
13,221 |
Shell Programming and Scripting |
|
|
|
5 |
62,681 |
Shell Programming and Scripting |
|
|
|
2 |
2,057 |
Shell Programming and Scripting |
|
|
|
4 |
2,141 |
Shell Programming and Scripting |
|
|
|
6 |
2,426 |
Shell Programming and Scripting |
|
|
|
7 |
10,786 |
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)