({{, (RefLink[AudioLooping, paclet:ref/AudioLooping]) 
is an option for (RefLink[AudioStream, paclet:ref/AudioStream]) and related functions to specify the playback looping.}})

OpenersNotesSection(Spacer1)Details

(RefLink[AudioLooping, paclet:ref/AudioLooping]) specifies whether to loop the playback of an audio signal or how many times to loop.

Typical settings include:

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Control the number of loops an audio signal is played:

a=Audio["ExampleData/rule30.wav"]

Specify the number of loops:

AudioPlay[a,AudioLooping->2]

Play indefinitely:

AudioPlay[a,AudioLooping->True]

AudioStop[%]

OpenersExampleSection1(Spacer1)Scope  (1)

The value of (RefLink[AudioLooping, paclet:ref/AudioLooping]) does not need to be an integer:

a=Audio["ExampleData/rule30.wav"];
AudioPlay[a,AudioLooping->1.5]

OpenersExampleSection3(Spacer1)Possible Issues  (1)

If both (RefLink[AudioLooping, paclet:ref/AudioLooping]) and (RefLink[MaxDuration, paclet:ref/MaxDuration]) are specified, the one that corresponds to the minimal playing time is respected:

a=Audio["ExampleData/rule30.wav"];
Duration[a]

AudioPlay[a,AudioLooping->3,MaxDuration->(Quantity[3, "s", seconds, "Seconds"])]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Audio, paclet:ref/Audio])  ▪  (RefLink[AudioStream, paclet:ref/AudioStream])  ▪  (RefLink[AudioPlay, paclet:ref/AudioPlay])  ▪  (RefLink[AudioChannelAssignment, paclet:ref/AudioChannelAssignment])  ▪  (RefLink[MaxDuration, paclet:ref/MaxDuration])  ▪  (RefLink[AnimationRepetitions, paclet:ref/AnimationRepetitions])}})}})