# Sound

> Aego 0.12.5 · development; docs build `4a32b816933e02930662f6a443cb25abe6050d090c55e237cbff5c44ae9b25f8`. [Build manifest](/docs-build.json).

```
type Sound
```

Sound is a playing sound. yield s waits until it ends; a nil or finished sound is done. It is a presentation event: wait for game logic with a timer, not a sound.

## Sound.Done

```
func (Sound) Done() bool
```

Reports whether the sound ended, was stopped or is nil.

## Sound.Pause

```
func (Sound) Pause()
```

Holds the sound where it is.

## Sound.Playing

```
func (Sound) Playing() bool
```

Reports whether the sound is audible now: not done, not stopping and not paused.

## Sound.Position

```
func (Sound) Position() float
```

Returns the seconds played, within the loop for a looping sound.

## Sound.Resume

```
func (Sound) Resume()
```

Continues a paused sound.

## Sound.SetPan

```
func (Sound) SetPan(pan float)
```

Pans a sound that is not spatial, -1 to 1.

## Sound.SetPitch

```
func (Sound) SetPitch(pitch float)
```

Changes speed and pitch, 0.25 to 4.

## Sound.SetVolume

```
func (Sound) SetVolume(volume float)
```

Changes the volume with a short ramp.

## Sound.Stop

```
func (Sound) Stop()
```

Ends the sound with a short fade.

## Sound.StopFade

```
func (Sound) StopFade(seconds float)
```

Fades the sound out over seconds.

## Sound.Completed

```
signal Completed(finished bool)
```

Runs once when the sound ends: finished is false after Stop, when it was cut off, or when its node died.
