# SetAudioDuration

Changes duration of audio clock tick.

### Synopsis

`Err SetAudioDuration (Item Owner, uint32 Frames)`

### Description

This function changes the rate of the audio clock by specifying a duration for the clock's tick. The clock is driven by a countdown timer in the DSP. When the DSP timer reaches zero, it increments the audio clock by one. The DSP timer is decremented at the sample rate of 44,100 Hz. Thus tick duration is given in units of sample frames.

The current audio clock duration can be read with `GetAudioDuration()`.

You must own the audio clock before changing its rate or duration. See `OwnAudioClock()`.

### Arguments

Owner
  Item number of owner ID from `OwnAudioClock()`.

Duration
  Duration of one audio tick in sample frames at 44,100 Hz.

### Return Value

The function returns a non-negative value if successful or an error code (a negative value) if an error occurs.

### Implementation

SWI implemented in Audio folio V20.

### Associated Files

audio.h

### See Also

``OwnAudioClock`(), GetAudioRate(), SetAudioRate(), GetAudioDuration(), SignalAtTime(), SleepUntilTime(), GetAudioFolioInfo
`