---
name: "midi_loop_start"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/midi_loop_start"
---

# midi\_loop\_start(3alleg)

Loop start and end points, set by play\_looped\_midi(). Allegro game programming library.

## NAME

midi\_loop\_start, midi\_loop\_end - Loop start and end points, set by play\_looped\_midi(). Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**extern long midi\_loop\_start;**

**extern long midi\_loop\_end;**

## DESCRIPTION

The loop start and end points, set by the play\_looped\_midi() function.  These may safely be altered while the music is playing, but you should be  sure they are always set to sensible values (start \< end). If you are  changing them both at the same time, make sure to alter them in the right  order in case a MIDI interrupt happens to occur in between your two  writes! Setting these values to -1 represents the start and end of the  file respectively.

## SEE ALSO

[**play\_looped\_midi**(3alleg)](/play_looped_midi/3alleg.md)
