diff options
author | Pavel Dubsky <pavel.dubsky@qt.io> | 2023-05-26 12:51:02 +0200 |
---|---|---|
committer | Pavel Dubsky <pavel.dubsky@qt.io> | 2023-05-30 20:08:41 +0200 |
commit | 5aa899abb67ebdbcc9d0feb994385f1ab12656f7 (patch) | |
tree | b66a5a27b8c38d154edd2abbe06cc0c5e0dfbcbf /src/multimedia/platform/qplatformmediadevices.cpp | |
parent | cfc5b97daee9ac38b6fa8ec52be292e0790220ce (diff) |
Add audio engine warm-up on Windows
Current implementation has the following audio problem on Windows: if
any of the classes that support audio playback are used (QMediaPlayer
or QSoundEffect) sound is cutting off (part of the sound is missing
usually beginning). If there're some other applications playing sounds
in the system while we try to play our sound then everyting works fine.
Apparently this happens due to warm up delays for system audio engine
and if there're other applications available they're simply keeping it
alive and it's already fully initialized and ready to be used by us
when we need it.
As a workaround to this problem an unused audio device is created that
is fully initialized and set to play (nothing) but is actually present
for any subsequently created audio devices that are ready from the
start without any delays.
Pick-to: 6.5
Task-number: QTBUG-112512
Change-Id: I660a48e8ac1a1ebd1cfb6a9ff76605c3b4742e17
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Diffstat (limited to 'src/multimedia/platform/qplatformmediadevices.cpp')
-rw-r--r-- | src/multimedia/platform/qplatformmediadevices.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/multimedia/platform/qplatformmediadevices.cpp b/src/multimedia/platform/qplatformmediadevices.cpp index 03f1af75e..95cf3b7a0 100644 --- a/src/multimedia/platform/qplatformmediadevices.cpp +++ b/src/multimedia/platform/qplatformmediadevices.cpp @@ -153,5 +153,6 @@ void QPlatformMediaDevices::videoInputsChanged() const emit m->videoInputsChanged(); } +void QPlatformMediaDevices::prepareAudio() { } QT_END_NAMESPACE |