Interface ISoundPlayer
interface ISoundPlayer
Extends com.amazon.apmf.IStandard
Interface for encapsulating ISoundPlayer module
Methods
play()
void play()
Plays the stream of the associated sound
pause()
void pause()
Pause the stream of the associated sound
stop()
void stop()
Stops the stream of the associated sound
setRepeatCount()
Sets number of iterations to repeat the associated sound during Play API call.voidsetRepeatCount(i32repeatCount)
Parameters
repeatCount
i32 — Required
number of iterations to play sound
setVolume()
Sets volume of the stream for the associated soundvoidsetVolume(i32volume)
Parameters
volume
i32 — Required
volume to be applied for the stream. Valid range is 0-100.
Throws
InvalidArgumentError— if volume is not between 0-100.
setPlaybackRate()
Sets playback rate for given soundvoidsetPlaybackRate(floatplaybackRate)
Parameters
playbackRate
float — Required
to play sound at. This rate should correspond to a rate provided
by getSupportedPlaybackRates.
Throws
InvalidArgumentError— if getSupportedPlaybackRates does contain playbackRate.

