audio streams: getTime fix

This commit is contained in:
MihailRis
2024-03-06 20:01:24 +03:00
parent cea4867567
commit 6874e3c812
5 changed files with 56 additions and 4 deletions
+8
View File
@@ -182,6 +182,9 @@ namespace audio {
/// @param delta time elapsed since the last update
virtual void update(double delta) = 0;
/// @brief Get current stream time
virtual duration_t getTime() const = 0;
/// @brief Set playhead to the selected time
/// @param time selected time
virtual void setTime(duration_t time) = 0;
@@ -473,6 +476,11 @@ namespace audio {
/// @return channel or nullptr
extern Channel* get_channel(int index);
/// @brief Get stream associated with speaker
/// @param id speaker id
/// @return stream or nullptr
extern std::shared_ptr<Stream> get_associated_stream(speakerid_t id);
/// @brief Get alive speakers number (including paused)
extern size_t count_speakers();