Unix and Linux Discussions Tagged with length |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
10 |
112,275 |
Shell Programming and Scripting |
|
|
|
5 |
4,137 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
26,922 |
Programming |
|
|
|
5 |
4,087 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
2,971 |
UNIX for Beginners Questions & Answers |
|
|
|
14 |
29,090 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
2,008 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
3,311 |
Shell Programming and Scripting |
|
|
|
1 |
2,586 |
What is on Your Mind? |
|
|
|
8 |
13,763 |
Shell Programming and Scripting |
|
|
|
1 |
1,793 |
What is on Your Mind? |
|
|
|
2 |
2,672 |
Shell Programming and Scripting |
|
|
|
3 |
2,238 |
Shell Programming and Scripting |
|
|
|
3 |
1,634 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
2,986 |
Shell Programming and Scripting |
|
|
|
1 |
5,335 |
Shell Programming and Scripting |
|
|
|
2 |
1,965 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
6,274 |
Shell Programming and Scripting |
|
|
|
6 |
3,549 |
Shell Programming and Scripting |
|
|
|
4 |
3,939 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
16,044 |
UNIX for Dummies Questions & Answers |
|
|
|
10 |
26,535 |
Shell Programming and Scripting |
|
|
|
14 |
29,135 |
Shell Programming and Scripting |
|
|
|
5 |
4,403 |
Shell Programming and Scripting |
|
|
|
1 |
2,272 |
Shell Programming and Scripting |
|
|
|
1 |
4,984 |
Programming |
|
|
|
6 |
8,721 |
Programming |
|
|
|
7 |
40,605 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,845 |
Shell Programming and Scripting |
|
|
|
10 |
6,420 |
Shell Programming and Scripting |
|
|
|
3 |
3,179 |
Shell Programming and Scripting |
|
|
|
2 |
2,091 |
Shell Programming and Scripting |
|
|
|
2 |
4,724 |
IP Networking |
|
|
|
10 |
5,814 |
Programming |
|
|
|
7 |
13,868 |
Shell Programming and Scripting |
|
|
|
5 |
63,439 |
Shell Programming and Scripting |
|
|
|
2 |
2,337 |
Shell Programming and Scripting |
|
|
|
4 |
2,437 |
Shell Programming and Scripting |
|
|
|
6 |
2,783 |
Shell Programming and Scripting |
|
|
|
7 |
11,353 |
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)