# Play(ulong)

> Plays the AudioSource.clip.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.AudioModule

```csharp
public void Play(ulong delay)
```

### Parameters

**** (\[ulong]\(https\://learn.microsoft.com/dotnet/api/system.uint64)): Deprecated. Delay in number of samples, assuming a 44100Hz sample rate (meaning that Play(44100) will delay the playing by exactly 1 sec).

### Remarks

The delay parameter is deprecated, please use the newer [AudioSource.PlayDelayed](/engine/6000.0/script-reference/unityengine/audiosource/playdelayed.md) function instead which specifies the delay in seconds.

If [AudioSource.clip](/engine/6000.0/script-reference/unityengine/audiosource/clip.md) is set to the same clip that is playing then the clip will sound like it is re-started.  [AudioSource](/engine/6000.0/script-reference/unityengine/audiosource.md) will assume any [AudioSource.Play](/engine/6000.0/script-reference/unityengine/audiosource/play.md) call will have a new audio clip to play.

**Note:** The [AudioSource.PlayScheduled](/engine/6000.0/script-reference/unityengine/audiosource/playscheduled.md) API will give you more accurate control over when the audio clip is played.

For a list of audio file types Unity supports, refer to [Audio Clip](/engine/6000.0/manual/audio/reference/class-audio-clip.md).

```csharp
using UnityEngine;

// The Audio Source component has an AudioClip option.  The audio
// played in this example comes from AudioClip and is called audioData.

[RequireComponent(typeof(AudioSource))]
public class ExampleScript : MonoBehaviour
{
    AudioSource audioData;

    void Start()
    {
        audioData = GetComponent<AudioSource>();
        audioData.Play(0);
        Debug.Log("started");
    }

    void OnGUI()
    {
        if (GUI.Button(new Rect(10, 70, 150, 30), "Pause"))
        {
            audioData.Pause();
            Debug.Log("Pause: " + audioData.time);
        }

        if (GUI.Button(new Rect(10, 170, 150, 30), "Continue"))
        {
            audioData.UnPause();
        }
    }
}
```

Additional Resources: [AudioSource.Stop](/engine/6000.0/script-reference/unityengine/audiosource/stop.md), [AudioSource.Pause](/engine/6000.0/script-reference/unityengine/audiosource/pause.md), [AudioSource.clip](/engine/6000.0/script-reference/unityengine/audiosource/clip.md) and [AudioSource.PlayScheduled](/engine/6000.0/script-reference/unityengine/audiosource/playscheduled.md) functions.
