# PlayMusic

## Description

Plays the given music file only and loops it if desired. This is a change from previous versions where AGK would continue playing the next music track after this one. Now you must use the additional parameters of PlayMusic to play tracks one after the other.
Only one music file may be playing at any one time.

## Definition

PlayMusic( iID, bLoop )

void agk::PlayMusic( UINT iID, int bLoop )

PlayMusic( iID )

void agk::PlayMusic( UINT iID )

PlayMusic()

void agk::PlayMusic()

PlayMusic( iID, bLoop, iStartID, iEndID )

void agk::PlayMusic( UINT iID, int bLoop, UINT iStartID, UINT iEndID )

## Parameters

- iID - The music file to start with.
- bLoop - 1 to loop forever, 0 to stop after the last ID.
- iStartID - The ID to return to when looping from the end to the beginning of the file list.
- iEndID - The ID after which it should loop back to the beginning.