---
title: "stepInDecodeOrder(byCount:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avsamplecursor/stepindecodeorder(bycount:)"
---

# stepInDecodeOrder(byCount:)

Moves the cursor a given number of samples in decode order.

## Declaration

```swift
func stepInDecodeOrder(byCount stepCount: Int64) -> Int64
```

## Parameters

- `stepCount`: The number of samples to move across. If positive, step forward this many samples. If negative, step backward this many samples.

## Return Value

Return Value The number of samples the cursor traversed. If the cursor reaches the beginning or the end of the sample sequence before the requested number of samples was traversed, the absolute value of the result will be less than the absolute value of the specified step count.

## See Also

### Navigating samples

- [step(byDecodeTime:wasPinned:)](avfoundation/avsamplecursor/step(bydecodetime:waspinned:).md)
- [step(byPresentationTime:wasPinned:)](avfoundation/avsamplecursor/step(bypresentationtime:waspinned:).md)
- [stepInPresentationOrder(byCount:)](avfoundation/avsamplecursor/stepinpresentationorder(bycount:).md)
