From 7e48870c182e66a8408bbcb4c9469d751a777daa Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Wed, 23 Nov 2016 13:53:51 +0100 Subject: Remove support for WinRT 8.1 and Windows Phone 8.1 Task-number: QTBUG-57288 Change-Id: I29eb9e6fa20702fc5571b9eb184ab80ca38e137d Reviewed-by: Oliver Wolff --- src/plugins/wasapi/qwasapiaudioinput.cpp | 10 ---------- src/plugins/wasapi/qwasapiaudioinput.h | 2 -- src/plugins/wasapi/qwasapiaudiooutput.cpp | 10 ---------- src/plugins/wasapi/qwasapiaudiooutput.h | 2 -- src/plugins/wasapi/wasapi.pro | 5 +---- 5 files changed, 1 insertion(+), 28 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/wasapi/qwasapiaudioinput.cpp b/src/plugins/wasapi/qwasapiaudioinput.cpp index 22a77df38..561584e83 100644 --- a/src/plugins/wasapi/qwasapiaudioinput.cpp +++ b/src/plugins/wasapi/qwasapiaudioinput.cpp @@ -143,9 +143,7 @@ qint64 WasapiInputDevicePrivate::writeData(const char* data, qint64 len) QWasapiAudioInput::QWasapiAudioInput(const QByteArray &device) : m_deviceName(device) -#if defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 , m_volumeCache(qreal(1.)) -#endif , m_currentState(QAudio::StoppedState) , m_currentError(QAudio::NoError) , m_bufferFrames(0) @@ -165,7 +163,6 @@ QWasapiAudioInput::~QWasapiAudioInput() void QWasapiAudioInput::setVolume(qreal vol) { qCDebug(lcMmAudioInput) << __FUNCTION__ << vol; -#if defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 // Volume is only supported MSVC2015 and beyond m_volumeCache = vol; if (m_volumeControl) { quint32 channelCount; @@ -175,17 +172,12 @@ void QWasapiAudioInput::setVolume(qreal vol) RETURN_VOID_IF_FAILED("Could not set audio volume."); } } -#endif // defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 } qreal QWasapiAudioInput::volume() const { qCDebug(lcMmAudioInput) << __FUNCTION__; -#if defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 // Volume is only supported MSVC2015 and beyond return m_volumeCache; -#else - return qreal(1.0); -#endif } void QWasapiAudioInput::process() @@ -317,11 +309,9 @@ bool QWasapiAudioInput::initStart(bool pull) hr = m_interface->m_client->GetService(IID_PPV_ARGS(&m_capture)); EMIT_RETURN_FALSE_IF_FAILED("Could not acquire render service.", QAudio::OpenError) -#if defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 // Volume is only supported MSVC2015 and beyond for WinRT hr = m_interface->m_client->GetService(IID_PPV_ARGS(&m_volumeControl)); if (FAILED(hr)) qCDebug(lcMmAudioInput) << "Could not acquire volume control."; -#endif // defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 hr = m_interface->m_client->GetBufferSize(&m_bufferFrames); EMIT_RETURN_FALSE_IF_FAILED("Could not access buffer size.", QAudio::OpenError) diff --git a/src/plugins/wasapi/qwasapiaudioinput.h b/src/plugins/wasapi/qwasapiaudioinput.h index 3fd7315c1..34ede06b7 100644 --- a/src/plugins/wasapi/qwasapiaudioinput.h +++ b/src/plugins/wasapi/qwasapiaudioinput.h @@ -97,10 +97,8 @@ private: QByteArray m_deviceName; Microsoft::WRL::ComPtr m_interface; Microsoft::WRL::ComPtr m_capture; -#if defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 Microsoft::WRL::ComPtr m_volumeControl; qreal m_volumeCache; -#endif QMutex m_mutex; QAudio::State m_currentState; QAudio::Error m_currentError; diff --git a/src/plugins/wasapi/qwasapiaudiooutput.cpp b/src/plugins/wasapi/qwasapiaudiooutput.cpp index 1b0f64451..79548011c 100644 --- a/src/plugins/wasapi/qwasapiaudiooutput.cpp +++ b/src/plugins/wasapi/qwasapiaudiooutput.cpp @@ -157,9 +157,7 @@ qint64 WasapiOutputDevicePrivate::writeData(const char* data, qint64 len) QWasapiAudioOutput::QWasapiAudioOutput(const QByteArray &device) : m_deviceName(device) -#if defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 , m_volumeCache(qreal(1.)) -#endif , m_currentState(QAudio::StoppedState) , m_currentError(QAudio::NoError) , m_interval(1000) @@ -180,7 +178,6 @@ QWasapiAudioOutput::~QWasapiAudioOutput() void QWasapiAudioOutput::setVolume(qreal vol) { qCDebug(lcMmAudioOutput) << __FUNCTION__ << vol; -#if defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 // Volume is only supported MSVC2015 and beyond for WinRT m_volumeCache = vol; if (m_volumeControl) { quint32 channelCount; @@ -190,17 +187,12 @@ void QWasapiAudioOutput::setVolume(qreal vol) RETURN_VOID_IF_FAILED("Could not set audio volume."); } } -#endif // defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 } qreal QWasapiAudioOutput::volume() const { qCDebug(lcMmAudioOutput) << __FUNCTION__; -#if defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 // Volume is only supported MSVC2015 and beyond for WinRT return m_volumeCache; -#else - return qreal(1.0); -#endif } void QWasapiAudioOutput::process() @@ -316,11 +308,9 @@ bool QWasapiAudioOutput::initStart(bool pull) hr = m_interface->m_client->GetService(IID_PPV_ARGS(&m_renderer)); EMIT_RETURN_FALSE_IF_FAILED("Could not acquire render service.", QAudio::OpenError) -#if defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 // Volume is only supported MSVC2015 and beyond hr = m_interface->m_client->GetService(IID_PPV_ARGS(&m_volumeControl)); if (FAILED(hr)) qCDebug(lcMmAudioOutput) << "Could not acquire volume control."; -#endif // defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 hr = m_interface->m_client->GetBufferSize(&m_bufferFrames); EMIT_RETURN_FALSE_IF_FAILED("Could not access buffer size.", QAudio::OpenError) diff --git a/src/plugins/wasapi/qwasapiaudiooutput.h b/src/plugins/wasapi/qwasapiaudiooutput.h index 118731af9..02974071b 100644 --- a/src/plugins/wasapi/qwasapiaudiooutput.h +++ b/src/plugins/wasapi/qwasapiaudiooutput.h @@ -98,10 +98,8 @@ private: QByteArray m_deviceName; Microsoft::WRL::ComPtr m_interface; Microsoft::WRL::ComPtr m_renderer; -#if defined(CLASSIC_APP_BUILD) || _MSC_VER >= 1900 Microsoft::WRL::ComPtr m_volumeControl; qreal m_volumeCache; -#endif QMutex m_mutex; QAudio::State m_currentState; QAudio::Error m_currentError; diff --git a/src/plugins/wasapi/wasapi.pro b/src/plugins/wasapi/wasapi.pro index 11dfd8abe..63409ce72 100644 --- a/src/plugins/wasapi/wasapi.pro +++ b/src/plugins/wasapi/wasapi.pro @@ -20,10 +20,7 @@ OTHER_FILES += \ LIBS += Mmdevapi.lib -win32-* { - DEFINES += CLASSIC_APP_BUILD - LIBS += runtimeobject.lib -} +win32-*: LIBS += runtimeobject.lib PLUGIN_TYPE = audio PLUGIN_CLASS_NAME = QWasapiPlugin -- cgit v1.2.3