#include <ProgressTimer.h>
|
| static std::chrono::milliseconds | getNoDelay () |
| | Static function member to get delay value for no ProgressReportDelayElapsed notifications.. More...
|
| |
| static std::chrono::milliseconds | getNoInterval () |
| | Static function member to get interval value for no ProgressReportIntervalElapsed notifications. More...
|
| |
|
| std::ostream & | operator<< (std::ostream &stream, ProgressTimer::State state) |
| | Friend declaration to allow streaming State values. More...
|
| |
Provides callbacks when ProgressReportDelayElapsed and ProgressReportIntervalElapsed events should be sent to AVS.
◆ ProgressTimer()
| alexaClientSDK::acsdkAudioPlayer::ProgressTimer::ProgressTimer |
( |
| ) |
|
◆ ~ProgressTimer()
| virtual alexaClientSDK::acsdkAudioPlayer::ProgressTimer::~ProgressTimer |
( |
| ) |
|
|
virtual |
◆ getNoDelay()
| static std::chrono::milliseconds alexaClientSDK::acsdkAudioPlayer::ProgressTimer::getNoDelay |
( |
| ) |
|
|
inlinestatic |
Static function member to get delay value for no ProgressReportDelayElapsed notifications..
◆ getNoInterval()
| static std::chrono::milliseconds alexaClientSDK::acsdkAudioPlayer::ProgressTimer::getNoInterval |
( |
| ) |
|
|
inlinestatic |
Static function member to get interval value for no ProgressReportIntervalElapsed notifications.
◆ init()
| void alexaClientSDK::acsdkAudioPlayer::ProgressTimer::init |
( |
const std::shared_ptr< ContextInterface > & |
context, |
|
|
std::chrono::milliseconds |
delay, |
|
|
std::chrono::milliseconds |
interval, |
|
|
std::chrono::milliseconds |
offset = std::chrono::milliseconds::zero() |
|
) |
| |
Initialize for sending notifications that it is time to send a progress report. init() must be called before start() (without an intervening stop()) for start() to deliver progress report callbacks.
- Parameters
-
| context | The context within which to operate. |
| delay | The offset (in milliseconds from the start of the track) at which to send the ProgressReportDelayElapsed event. If delay is ProgressTimer::getNoDelay(), no ProgressReportDelayElapsed notifications will be sent. |
| interval | The interval (in milliseconds from the start of the track) at which to send ProgressReportIntervalElapsed events. If interval is ProgressTimer::getNoInterval(), no ProgressReportIntervalElapsed notifications will be sent. |
| offset | The offset (in milliseconds from the start of the track) at which playback of the track will start. |
◆ onProgress()
| void alexaClientSDK::acsdkAudioPlayer::ProgressTimer::onProgress |
( |
std::chrono::milliseconds |
progress | ) |
|
Notification of the current progress.
- Parameters
-
| progress | The offset (in milliseconds from the start of the track) of playback. |
◆ pause()
| void alexaClientSDK::acsdkAudioPlayer::ProgressTimer::pause |
( |
| ) |
|
Pause sending notifications when it is time to send progress reports. pause() should be called after start() or resume() (without an intervening stop()) or it will do nothing.
◆ resume()
| void alexaClientSDK::acsdkAudioPlayer::ProgressTimer::resume |
( |
| ) |
|
Resume sending notifications when it is time to send progress reports. resume() should be called after pause() (without an intervening stop()) otherwise it will do nothing.
◆ start()
| void alexaClientSDK::acsdkAudioPlayer::ProgressTimer::start |
( |
| ) |
|
Start sending notifications when it is time to send progress reports. init() must be called before start() (without an intervening stop()) for start() to deliver progress report callbacks.
◆ stop()
| void alexaClientSDK::acsdkAudioPlayer::ProgressTimer::stop |
( |
| ) |
|
◆ updateInterval()
| void alexaClientSDK::acsdkAudioPlayer::ProgressTimer::updateInterval |
( |
const std::chrono::milliseconds & |
newInterval | ) |
|
Update interval to send ProgressReportIntervalElapsed events.
- Parameters
-
| newInterval | New interval in milliseconds from the start of the track. |
◆ operator<<
| std::ostream& operator<< |
( |
std::ostream & |
stream, |
|
|
ProgressTimer::State |
state |
|
) |
| |
|
friend |
Friend declaration to allow streaming State values.
The documentation for this class was generated from the following file:
- /workplace/avs-device-sdk/capabilities/AudioPlayer/acsdkAudioPlayer/include/acsdkAudioPlayer/ProgressTimer.h
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0