diff --git a/src/components/ble/MusicService.cpp b/src/components/ble/MusicService.cpp index 83b26a78..60747e91 100644 --- a/src/components/ble/MusicService.cpp +++ b/src/components/ble/MusicService.cpp @@ -199,7 +199,7 @@ float Pinetime::Controllers::MusicService::getPlaybackSpeed() const { return playbackSpeed; } -int Pinetime::Controllers::MusicService::getProgress() { +int Pinetime::Controllers::MusicService::getProgress() const { if (isPlaying()) { return trackProgress + static_cast((static_cast(xTaskGetTickCount() - trackProgressUpdateTime) / 1024.0f) * getPlaybackSpeed()); } diff --git a/src/components/ble/MusicService.h b/src/components/ble/MusicService.h index 6c1a6edb..047d0d26 100644 --- a/src/components/ble/MusicService.h +++ b/src/components/ble/MusicService.h @@ -47,7 +47,7 @@ namespace Pinetime { std::string getAlbum() const; - int getProgress(); + int getProgress() const; int getTrackLength() const;