---
title: "seek(to:completion:)"
framework: phase
role: symbol
role_heading: Instance Method
path: "phase/phasesoundevent/seek(to:completion:)"
---

# seek(to:completion:)

Advances the sound event’s playback position to a specific time.

## Declaration

```swift
func seek(to time: Double, completion handler: (@Sendable (PHASESoundEvent.SeekHandlerReason) -> Void)? = nil)
```

```swift
func seek(to time: Double) async -> PHASESoundEvent.SeekHandlerReason
```

## Parameters

- `time`: The playback position to advance to. The framework scales this value by doc://com.apple.phase/documentation/PHASE/PHASEEngine/unitsPerSecond.

## Discussion

Discussion important: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: func seek(to time: Double) async -> PHASESoundEvent.SeekHandlerReason For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.

## See Also

### Seeking a Time

- [PHASESoundEvent.SeekHandlerReason](phase/phasesoundevent/seekhandlerreason.md)
