diff options
author | Artem Dyomin <artem.dyomin@qt.io> | 2023-04-28 15:09:06 +0200 |
---|---|---|
committer | Artem Dyomin <artem.dyomin@qt.io> | 2023-05-05 12:56:10 +0200 |
commit | 925138520fda18b83899e2d60afcbe0612cb5dd8 (patch) | |
tree | 6e1d10bac744f7334d75358da02a2a91a5569940 /src/plugins/multimedia/ffmpeg/playbackengine/qffmpegrenderer_p.h | |
parent | 04b4b08bc6bfb7d6afa6e729c01ae1bf50389904 (diff) | |
download | qtmultimedia-925138520fda18b83899e2d60afcbe0612cb5dd8.tar.gz |
Reduce choppy sound on audio playback if audio sink is almost empty
If audio sink buffer is almost empty, that happens on pause/play,
the sound pretty often has little gaps. The solution is using some
little samples compensation (slows down the playback on 1% for
1-2sec what allows to increase buffer loadig from 0-10% to 20%).
In other words, the patch implements slight "soft" audio samples
compensation in order to avoid having empty adio sink buffer.
Pick-to: 6.5
Change-Id: I6b963996eab8f8b8f610fcd4a566405aec3d13cf
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Diffstat (limited to 'src/plugins/multimedia/ffmpeg/playbackengine/qffmpegrenderer_p.h')
-rw-r--r-- | src/plugins/multimedia/ffmpeg/playbackengine/qffmpegrenderer_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/multimedia/ffmpeg/playbackengine/qffmpegrenderer_p.h b/src/plugins/multimedia/ffmpeg/playbackengine/qffmpegrenderer_p.h index 8949213a4..e0ff9072f 100644 --- a/src/plugins/multimedia/ffmpeg/playbackengine/qffmpegrenderer_p.h +++ b/src/plugins/multimedia/ffmpeg/playbackengine/qffmpegrenderer_p.h @@ -75,6 +75,8 @@ protected: float playbackRate() const; + std::chrono::microseconds frameDelay(const Frame &frame) const; + private: void doNextStep() override; |