Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IAudioStreamPlayback4

interface IAudioStreamPlayback4
Extends IAudioStreamPlayback3 New AudioStreamPlayback interface to add methods to control playback speed with desired speed level

Methods

setSpeed()

void setSpeed(float playbackSpeed)
Set playback speed for this stream instance. Set the playback speed of the stream instance to a desired rate. It’s only applicable to PCM format streams in an active playback state. If stream unable to configure desired speed, an exception will be thrown and stream continues to render with normal(1.0) playback speed.

Parameters

playbackSpeed
float — Required speed rate applied for current stream(range: 0.25 to 4)

Throws

  • InvalidArgumentError — If stream config not supported ForeignError(Unknown Error) If unable to switch to desirted speed rate

getSpeed()

float getSpeed()
Get playback stream speed rate Query current playback rate for stream

Returns

float playback speed value for current stream 1.0(default) for non PCM streams. For PCM streams most recent successful speed level
Last modified on October 29, 2026