diff options
author | Jøger Hansegård <joger.hansegard@qt.io> | 2023-06-07 14:38:22 +0200 |
---|---|---|
committer | Jøger Hansegård <joger.hansegard@qt.io> | 2023-06-12 23:11:39 +0200 |
commit | c06008c8b17d9d0d28810f29038cd038061649f1 (patch) | |
tree | 0ecfc71dda92111568ea1e458d15b5318151a6f5 /src/multimedia/windows/qwindowsaudiosource_p.h | |
parent | 186d9b5a8d452bbc79274db04fedfb4647240964 (diff) |
Replace QComPtr with Microsoft's WRL::ComPtr in QtMultimedia
This way we can rely on a 'standard' implementation that behaves the
same way as other COM smart pointers, and we don't have to maintain our
own implementation any longer.
This also fixes a latent bug that could cause double release when facing
circular dependencies between COM objects.
Change-Id: I339faac2f5045c0379b61ad72be033510eca4958
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
(cherry picked from commit a93ee88315035c366d87e1bc2e07ddd24e67ffb9)
Diffstat (limited to 'src/multimedia/windows/qwindowsaudiosource_p.h')
-rw-r--r-- | src/multimedia/windows/qwindowsaudiosource_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/multimedia/windows/qwindowsaudiosource_p.h b/src/multimedia/windows/qwindowsaudiosource_p.h index 56355d525..68d57bbe1 100644 --- a/src/multimedia/windows/qwindowsaudiosource_p.h +++ b/src/multimedia/windows/qwindowsaudiosource_p.h @@ -43,7 +43,7 @@ class QWindowsAudioSource : public QPlatformAudioSource { Q_OBJECT public: - QWindowsAudioSource(QComPtr<IMMDevice> device, QObject *parent); + QWindowsAudioSource(ComPtr<IMMDevice> device, QObject *parent); ~QWindowsAudioSource(); qint64 read(char* data, qint64 len); @@ -72,9 +72,9 @@ private: QByteArray readCaptureClientBuffer(); QTimer *m_timer = nullptr; - QComPtr<IMMDevice> m_device; - QComPtr<IAudioClient> m_audioClient; - QComPtr<IAudioCaptureClient> m_captureClient; + ComPtr<IMMDevice> m_device; + ComPtr<IAudioClient> m_audioClient; + ComPtr<IAudioCaptureClient> m_captureClient; QWindowsResampler m_resampler; int m_bufferSize = 0; qreal m_volume = 1.0; |