Unix and Linux Discussions Tagged with length |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
10 |
65,180 |
Shell Programming and Scripting |
|
|
|
5 |
2,215 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
20,944 |
Programming |
|
|
|
5 |
2,205 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
1,299 |
UNIX for Beginners Questions & Answers |
|
|
|
14 |
23,942 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
1,226 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
2,032 |
Shell Programming and Scripting |
|
|
|
1 |
1,153 |
What is on Your Mind? |
|
|
|
8 |
11,513 |
Shell Programming and Scripting |
|
|
|
1 |
869 |
What is on Your Mind? |
|
|
|
2 |
2,014 |
Shell Programming and Scripting |
|
|
|
3 |
1,752 |
Shell Programming and Scripting |
|
|
|
3 |
1,225 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
2,575 |
Shell Programming and Scripting |
|
|
|
1 |
4,783 |
Shell Programming and Scripting |
|
|
|
2 |
1,453 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
5,094 |
Shell Programming and Scripting |
|
|
|
6 |
3,083 |
Shell Programming and Scripting |
|
|
|
4 |
3,192 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
15,239 |
UNIX for Dummies Questions & Answers |
|
|
|
10 |
25,121 |
Shell Programming and Scripting |
|
|
|
14 |
27,414 |
Shell Programming and Scripting |
|
|
|
5 |
4,008 |
Shell Programming and Scripting |
|
|
|
1 |
1,912 |
Shell Programming and Scripting |
|
|
|
1 |
4,273 |
Programming |
|
|
|
6 |
8,134 |
Programming |
|
|
|
7 |
38,928 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,469 |
Shell Programming and Scripting |
|
|
|
10 |
5,732 |
Shell Programming and Scripting |
|
|
|
3 |
2,828 |
Shell Programming and Scripting |
|
|
|
2 |
1,821 |
Shell Programming and Scripting |
|
|
|
2 |
4,018 |
IP Networking |
|
|
|
10 |
4,868 |
Programming |
|
|
|
7 |
13,216 |
Shell Programming and Scripting |
|
|
|
5 |
62,675 |
Shell Programming and Scripting |
|
|
|
2 |
2,053 |
Shell Programming and Scripting |
|
|
|
4 |
2,139 |
Shell Programming and Scripting |
|
|
|
6 |
2,424 |
Shell Programming and Scripting |
|
|
|
7 |
10,777 |
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)