---
title: kCMSampleBufferAttachmentKey_SpeedMultiplier
framework: coremedia
role: symbol
role_heading: Global Variable
path: coremedia/kcmsamplebufferattachmentkey_speedmultiplier
---

# kCMSampleBufferAttachmentKey_SpeedMultiplier

The factor by which the sample buffer’s presentation should be accelerated (type CFNumber, default 1.0).

## Declaration

```swift
let kCMSampleBufferAttachmentKey_SpeedMultiplier: CFString
```

## Discussion

Discussion For normal playback the speed multiplier would be 1.0 (which is used if this attachment is not present);         for double-speed playback the speed multiplier would be 2.0, which would halve the output duration.        Speed-multiplication factors take effect after trimming; see CMSampleBufferGetOutputDuration(_:).        Note that this attachment principally provides information about the duration-stretching effect:        by default, it should be implemented by rate conversion, but other attachments may specify richer         stretching operations—for example, scaling without pitch shift, or pitch shift without changing duration.        Sequences of speed-multiplied sample buffers should have explicit time stamps        to clarify when each should be output (see CMSampleBufferSetOutputPresentationTimeStamp(_:newValue:)).

## See Also

### Sample Buffer Keys

- [kCMSampleBufferAttachmentKey_DisplayEmptyMediaImmediately](coremedia/kcmsamplebufferattachmentkey_displayemptymediaimmediately.md)
- [kCMSampleBufferAttachmentKey_DrainAfterDecoding](coremedia/kcmsamplebufferattachmentkey_drainafterdecoding.md)
- [kCMSampleBufferAttachmentKey_DroppedFrameReason](coremedia/kcmsamplebufferattachmentkey_droppedframereason.md)
- [kCMSampleBufferDroppedFrameReason_FrameWasLate](coremedia/kcmsamplebufferdroppedframereason_framewaslate.md)
- [kCMSampleBufferDroppedFrameReason_OutOfBuffers](coremedia/kcmsamplebufferdroppedframereason_outofbuffers.md)
- [kCMSampleBufferDroppedFrameReason_Discontinuity](coremedia/kcmsamplebufferdroppedframereason_discontinuity.md)
- [kCMSampleBufferAttachmentKey_DroppedFrameReasonInfo](coremedia/kcmsamplebufferattachmentkey_droppedframereasoninfo.md)
- [kCMSampleBufferDroppedFrameReasonInfo_CameraModeSwitch](coremedia/kcmsamplebufferdroppedframereasoninfo_cameramodeswitch.md)
- [kCMSampleBufferAttachmentKey_EmptyMedia](coremedia/kcmsamplebufferattachmentkey_emptymedia.md)
- [kCMSampleBufferAttachmentKey_EndsPreviousSampleDuration](coremedia/kcmsamplebufferattachmentkey_endsprevioussampleduration.md)
- [kCMSampleBufferAttachmentKey_FillDiscontinuitiesWithSilence](coremedia/kcmsamplebufferattachmentkey_filldiscontinuitieswithsilence.md)
- [kCMSampleBufferAttachmentKey_ForceKeyFrame](coremedia/kcmsamplebufferattachmentkey_forcekeyframe.md)
- [kCMSampleBufferAttachmentKey_GradualDecoderRefresh](coremedia/kcmsamplebufferattachmentkey_gradualdecoderrefresh.md)
- [kCMSampleBufferAttachmentKey_PermanentEmptyMedia](coremedia/kcmsamplebufferattachmentkey_permanentemptymedia.md)
- [kCMSampleBufferAttachmentKey_PostNotificationWhenConsumed](coremedia/kcmsamplebufferattachmentkey_postnotificationwhenconsumed.md)
