summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2021-06-03 13:13:31 +0300
committerTomi Korpipaa <tomi.korpipaa@qt.io>2021-06-03 13:41:10 +0300
commitd54b10e4b9f5b9252993cd7b1c4a124751014db4 (patch)
treef3e7c2c936defd6fd15a3133d5fe0cb5bccd3c0f
parent9d72a4172abde18a8eb0e6db89e1d6ec95fc62ad (diff)
Remove audiolevels example
QtMultimedia module has changed significantly between Qt 5 and Qt 6.2, so it is best to just remove this example and create a new one later on, if necessary. Fixes: QTBUG-94182 Change-Id: I21c6a342d294bec70b15fc702dd6d3749f3c0884 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--examples/datavisualization/CMakeLists.txt3
-rw-r--r--examples/datavisualization/audiolevels/CMakeLists.txt39
-rw-r--r--examples/datavisualization/audiolevels/audiolevels.cpp116
-rw-r--r--examples/datavisualization/audiolevels/audiolevels.h57
-rw-r--r--examples/datavisualization/audiolevels/audiolevels.pro23
-rw-r--r--examples/datavisualization/audiolevels/audiolevelsiodevice.cpp112
-rw-r--r--examples/datavisualization/audiolevels/audiolevelsiodevice.h53
-rw-r--r--examples/datavisualization/audiolevels/doc/images/audiolevels-example.pngbin120978 -> 0 bytes
-rw-r--r--examples/datavisualization/audiolevels/doc/src/audiolevels.qdoc98
-rw-r--r--examples/datavisualization/audiolevels/main.cpp55
-rw-r--r--examples/datavisualization/datavisualization.pro2
11 files changed, 0 insertions, 558 deletions
diff --git a/examples/datavisualization/CMakeLists.txt b/examples/datavisualization/CMakeLists.txt
index b90ca103..4c46ac6f 100644
--- a/examples/datavisualization/CMakeLists.txt
+++ b/examples/datavisualization/CMakeLists.txt
@@ -24,6 +24,3 @@ if(NOT ANDROID AND NOT IOS AND NOT WINRT)
add_subdirectory(texturesurface)
add_subdirectory(volumetric)
endif()
-if(TARGET Qt::Multimedia AND NOT ANDROID AND NOT IOS AND NOT WINRT)
- add_subdirectory(audiolevels)
-endif()
diff --git a/examples/datavisualization/audiolevels/CMakeLists.txt b/examples/datavisualization/audiolevels/CMakeLists.txt
deleted file mode 100644
index 8c5ba61c..00000000
--- a/examples/datavisualization/audiolevels/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-cmake_minimum_required(VERSION 3.14)
-project(audiolevels LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Multimedia)
-
-qt_add_executable(audiolevels
- audiolevels.cpp audiolevels.h
- audiolevelsiodevice.cpp audiolevelsiodevice.h
- main.cpp
-)
-set_target_properties(audiolevels PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(audiolevels PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Multimedia
-)
-
-install(TARGETS audiolevels
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/datavisualization/audiolevels/audiolevels.cpp b/examples/datavisualization/audiolevels/audiolevels.cpp
deleted file mode 100644
index 39ef44c7..00000000
--- a/examples/datavisualization/audiolevels/audiolevels.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "audiolevelsiodevice.h"
-#include "audiolevels.h"
-
-#include <QtDataVisualization/qbardataproxy.h>
-#include <QtDataVisualization/qvalue3daxis.h>
-#include <QtDataVisualization/q3dscene.h>
-#include <QtDataVisualization/q3dcamera.h>
-#include <QtDataVisualization/qbar3dseries.h>
-#include <QtDataVisualization/q3dtheme.h>
-#include <QtDataVisualization/qcustom3dlabel.h>
-
-#include <QtMultimedia/QAudioDeviceInfo>
-#include <QtMultimedia/QAudioInput>
-
-AudioLevels::AudioLevels(Q3DBars *graph, QObject *parent)
- : QObject(parent),
- m_graph(graph),
- m_device(0),
- m_audioInput(0)
-{
- // Set up the graph
- m_graph->setBarThickness(0.5f);
- m_graph->setBarSpacing(QSizeF(0.0, 1.0));
- m_graph->valueAxis()->setRange(-100.0f, 100.0f);
- m_graph->valueAxis()->setSegmentCount(20);
- m_graph->valueAxis()->setLabelFormat(QStringLiteral("%d%%"));
- m_graph->setShadowQuality(QAbstract3DGraph::ShadowQualityNone);
- m_graph->setSelectionMode(QAbstract3DGraph::SelectionNone);
- m_graph->scene()->activeCamera()->setCameraPosition(-25.0f, 10.0f, 190.0f);
- m_graph->activeTheme()->setType(Q3DTheme::ThemeIsabelle);
- m_graph->activeTheme()->setGridEnabled(true);
- m_graph->activeTheme()->setBackgroundEnabled(false);
- QFont font = m_graph->activeTheme()->font();
- font.setPointSize(10);
- m_graph->activeTheme()->setFont(font);
- QBar3DSeries *series = new QBar3DSeries;
- series->setMesh(QAbstract3DSeries::MeshBar);
- m_graph->addSeries(series);
-
- //! [0]
- QAudioDeviceInfo inputDevice = QAudioDeviceInfo::defaultInputDevice();
-
- if (inputDevice.supportedSampleRates().size() > 0
- && inputDevice.supportedChannelCounts().size() > 0
- && inputDevice.supportedSampleSizes().size() > 0
- && inputDevice.supportedCodecs().size() > 0) {
- QAudioFormat formatAudio;
- formatAudio.setSampleRate(inputDevice.supportedSampleRates().at(0));
- formatAudio.setChannelCount(inputDevice.supportedChannelCounts().at(0));
- formatAudio.setSampleSize(inputDevice.supportedSampleSizes().at(0));
- formatAudio.setCodec(inputDevice.supportedCodecs().at(0));
- formatAudio.setByteOrder(QAudioFormat::LittleEndian);
- formatAudio.setSampleType(QAudioFormat::UnSignedInt);
-
- m_audioInput = new QAudioInput(inputDevice, formatAudio, this);
-#ifdef Q_OS_MAC
- // OS X seems to wait for entire buffer to fill before calling writeData, so use smaller buffer
- m_audioInput->setBufferSize(256);
-#else
- m_audioInput->setBufferSize(1024);
-#endif
-
- m_device = new AudioLevelsIODevice(m_graph->seriesList().at(0)->dataProxy(), this);
- m_device->open(QIODevice::WriteOnly);
-
- m_audioInput->start(m_device);
- } else {
- // No graph content can be shown, so add a custom warning label
- QCustom3DLabel *titleLabel = new QCustom3DLabel("No valid audio input device found",
- QFont(),
- QVector3D(0.2f, 0.2f, 0.0f),
- QVector3D(1.0f, 1.0f, 0.0f),
- QQuaternion());
- titleLabel->setPositionAbsolute(true);
- titleLabel->setFacingCamera(true);
- m_graph->addCustomItem(titleLabel);
- }
- //! [0]
-}
-
-AudioLevels::~AudioLevels()
-{
- if (m_audioInput)
- m_audioInput->stop();
- if (m_device)
- m_device->close();
-}
diff --git a/examples/datavisualization/audiolevels/audiolevels.h b/examples/datavisualization/audiolevels/audiolevels.h
deleted file mode 100644
index 6d417100..00000000
--- a/examples/datavisualization/audiolevels/audiolevels.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef AUDIOLEVELS_H
-#define AUDIOLEVELS_H
-
-#include <QtDataVisualization/q3dbars.h>
-
-class AudioLevelsIODevice;
-
-QT_BEGIN_NAMESPACE
-class QAudioInput;
-QT_END_NAMESPACE
-
-class AudioLevels : public QObject
-{
- Q_OBJECT
-
-public:
- AudioLevels(Q3DBars *graph, QObject *parent = 0);
- ~AudioLevels();
-
-private:
- //! [0]
- Q3DBars *m_graph;
- AudioLevelsIODevice *m_device;
- QAudioInput *m_audioInput;
- //! [0]
-};
-
-#endif
diff --git a/examples/datavisualization/audiolevels/audiolevels.pro b/examples/datavisualization/audiolevels/audiolevels.pro
deleted file mode 100644
index de40e636..00000000
--- a/examples/datavisualization/audiolevels/audiolevels.pro
+++ /dev/null
@@ -1,23 +0,0 @@
-android|ios|winrt {
- error( "This example is not supported for android, ios, or winrt." )
-}
-
-requires(qtHaveModule(multimedia))
-
-!include( ../examples.pri ) {
- error( "Couldn't find the examples.pri file!" )
-}
-
-TARGET = audiolevels
-
-QT += multimedia
-
-SOURCES += main.cpp \
- audiolevels.cpp \
- audiolevelsiodevice.cpp
-
-HEADERS += audiolevels.h \
- audiolevelsiodevice.h
-
-OTHER_FILES += doc/src/* \
- doc/images/*
diff --git a/examples/datavisualization/audiolevels/audiolevelsiodevice.cpp b/examples/datavisualization/audiolevels/audiolevelsiodevice.cpp
deleted file mode 100644
index 60d2de3d..00000000
--- a/examples/datavisualization/audiolevels/audiolevelsiodevice.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "audiolevelsiodevice.h"
-#include <QtCore/QDebug>
-
-//! [1]
-static const int resolution = 8;
-static const int rowSize = 800;
-static const int rowCount = 7; // Must be odd number
-static const int middleRow = rowCount / 2;
-//! [1]
-
-AudioLevelsIODevice::AudioLevelsIODevice(QBarDataProxy *proxy, QObject *parent)
- : QIODevice(parent),
- m_proxy(proxy),
- m_array(new QBarDataArray)
-{
- // We reuse the existing array for maximum performance, so construct the array here
- //! [0]
- m_array->reserve(rowCount);
- for (int i = 0; i < rowCount; i++)
- m_array->append(new QBarDataRow(rowSize));
- //! [0]
-
- qDebug() << "Total of" << (rowSize * rowCount) << "items in the array.";
-}
-
-// Implementation required for this pure virtual function
-qint64 AudioLevelsIODevice::readData(char *data, qint64 maxSize)
-{
- Q_UNUSED(data);
- Q_UNUSED(maxSize);
- return -1;
-}
-
-//! [2]
-qint64 AudioLevelsIODevice::writeData(const char *data, qint64 maxSize)
-{
- // The amount of new data available.
- int newDataSize = maxSize / resolution;
-
- // If we get more data than array size, we need to adjust the start index for new data.
- int newDataStartIndex = qMax(0, (newDataSize - rowSize));
-
- // Move the old data ahead in the rows (only do first half of rows + middle one now).
- // If the amount of new data was larger than row size, skip copying.
- if (!newDataStartIndex) {
- for (int i = 0; i <= middleRow; i++) {
- QBarDataItem *srcPos = m_array->at(i)->data();
- QBarDataItem *dstPos = srcPos + newDataSize;
- memmove((void *)dstPos, (void *)srcPos, (rowSize - newDataSize) * sizeof(QBarDataItem));
- }
- }
-
- // Insert data in reverse order, so that newest data is always at the front of the row.
- int index = 0;
- for (int i = newDataSize - 1; i >= newDataStartIndex; i--) {
- // Add 0.01 to the value to avoid gaps in the graph (i.e. zero height bars).
- // Also, scale to 0...100
- float value = float(quint8(data[resolution * i]) - 128) / 1.28f + 0.01f;
- (*m_array->at(middleRow))[index].setValue(value);
- // Insert a fractional value into front half of the rows.
- for (int j = 1; j <= middleRow; j++) {
- float fractionalValue = value / float(j + 1);
- (*m_array->at(middleRow - j))[index].setValue(fractionalValue);
- }
- index++;
- }
-
- // Copy the front half of rows to the back half for symmetry.
- index = 0;
- for (int i = rowCount - 1; i > middleRow; i--) {
- QBarDataItem *srcPos = m_array->at(index++)->data();
- QBarDataItem *dstPos = m_array->at(i)->data();
- memcpy((void *)dstPos, (void *)srcPos, rowSize * sizeof(QBarDataItem));
- }
-
- // Reset the proxy array now that data has been updated to trigger a redraw.
- m_proxy->resetArray(m_array);
-
- return maxSize;
-}
-//! [2]
-
-
diff --git a/examples/datavisualization/audiolevels/audiolevelsiodevice.h b/examples/datavisualization/audiolevels/audiolevelsiodevice.h
deleted file mode 100644
index 97fb7b4e..00000000
--- a/examples/datavisualization/audiolevels/audiolevelsiodevice.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef AUDIOLEVELSIODEVICE_H
-#define AUDIOLEVELSIODEVICE_H
-
-#include <QtDataVisualization/qbardataproxy.h>
-#include <QtCore/QIODevice>
-
-class AudioLevelsIODevice : public QIODevice
-{
- Q_OBJECT
-public:
- explicit AudioLevelsIODevice(QBarDataProxy *proxy, QObject *parent = nullptr);
-
-protected:
- qint64 readData(char *data, qint64 maxSize);
- qint64 writeData(const char *data, qint64 maxSize);
-
-private:
- //! [0]
- QBarDataProxy *m_proxy;
- QBarDataArray *m_array;
- //! [0]
-};
-
-#endif
diff --git a/examples/datavisualization/audiolevels/doc/images/audiolevels-example.png b/examples/datavisualization/audiolevels/doc/images/audiolevels-example.png
deleted file mode 100644
index ec79eb5a..00000000
--- a/examples/datavisualization/audiolevels/doc/images/audiolevels-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/datavisualization/audiolevels/doc/src/audiolevels.qdoc b/examples/datavisualization/audiolevels/doc/src/audiolevels.qdoc
deleted file mode 100644
index 460715b3..00000000
--- a/examples/datavisualization/audiolevels/doc/src/audiolevels.qdoc
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example audiolevels
- \title Audiolevels Example
- \ingroup qtdatavisualization_examples
- \brief Simple application showing real time audio data.
-
- The audiolevels example shows how feed real-time dynamic data to a graph using Q3DBars.
-
- This example reads the audio levels from a microphone and displays those levels
- in a bar graph. To increase the load for demonstration purposes, and to make the
- graph little fancier, slightly modified data is used to fill multiple rows.
-
- \image audiolevels-example.png
-
- The interesting stuff happens in \c AudioLevels and \c AudioLevelsIODevice classes, so we
- concentrate on those and skip explaining the basic Q3DBars functionality - for that see
- \l{Bars Example}.
-
- \include examples-run.qdocinc
-
- \section1 Visualizing Audio Levels
-
- \c AudioLevelsIODevice subclasses QIODevice and is given as input device for QAudioInput
- class, so it receives microphone data.
-
- In the header file for \c AudioLevels class we declare necessary members:
-
- \snippet audiolevels/audiolevels.h 0
-
- And initialize the microphone listening in the source:
-
- \snippet audiolevels/audiolevels.cpp 0
-
- In the header file for \c AudioLevelsIODevice class we store pointers to the data proxy and
- also the data array we give to the proxy, because we reuse the same array to keep memory
- reallocations to the minimum:
-
- \snippet audiolevels/audiolevelsiodevice.h 0
-
- In the source file we define some static constants to define size of the data array and
- the middle row index, as well as the resolution of the visualization. You may need to adjust
- these values to get decent performance in low-end devices:
-
- \snippet audiolevels/audiolevelsiodevice.cpp 1
-
- The \c resolution constant indicates the sample rate, for example, value 8 means every eighth
- byte from audio input is visualized. This is necessary to make the data readable, as it would
- otherwise make the graph scroll too fast.
-
- In the \c AudioLevelsIODevice class constructor we initialize the data array:
-
- \snippet audiolevels/audiolevelsiodevice.cpp 0
-
- The \c AudioLevelsIODevice::writeData function is called whenever there is new audio data
- available to be visualized. There we move the old data along the rows and insert new
- data in the beginning of the rows:
-
- \snippet audiolevels/audiolevelsiodevice.cpp 2
-
- We use a couple of techniques here to improve performance. First, we reuse
- the existing data array, as this allows us to avoid any extra memory allocations in our
- application code. This also means the data array dimensions do not change, which further
- improves efficiency in the bar graph renderer.
- Secondly, since each row is a QList of bar data items, which do not allocate any data that needs
- deletion, we can utilize \c memmove and \c memcpy functions to quickly move and copy data around.
-
- \note In the future versions of Qt Data Visualization, QBarDataItem might get extended so that
- it does allocate some memory to store other optional bar properties besides the value.
- In use cases where those optional properties are used, using \c memmove and \c memcpy could lead to
- memory leaks, so use them with care.
-*/
diff --git a/examples/datavisualization/audiolevels/main.cpp b/examples/datavisualization/audiolevels/main.cpp
deleted file mode 100644
index c6f373c6..00000000
--- a/examples/datavisualization/audiolevels/main.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "audiolevels.h"
-
-#include <QtGui/QGuiApplication>
-#include <QtMultimedia/QAudio>
-
-int main(int argc, char *argv[])
-{
- qputenv("QSG_RHI_BACKEND", "opengl");
- QGuiApplication app(argc, argv);
-
- Q3DBars window;
-
- if (!window.hasContext()) {
- qWarning() << QStringLiteral("Couldn't initialize the OpenGL context.") ;
- return -1;
- }
-
- window.setFlags(window.flags() ^ Qt::FramelessWindowHint);
- window.resize(800, 500);
- window.setTitle("Qt Data Visualization - Microphone audio levels visualizer");
- window.show();
-
- AudioLevels audioLevels(&window);
-
- return app.exec();
-}
diff --git a/examples/datavisualization/datavisualization.pro b/examples/datavisualization/datavisualization.pro
index ca01bace..558d4ace 100644
--- a/examples/datavisualization/datavisualization.pro
+++ b/examples/datavisualization/datavisualization.pro
@@ -25,7 +25,5 @@ qtHaveModule(quick) {
customitems \
texturesurface \
volumetric
-
- qtHaveModule(multimedia): SUBDIRS += audiolevels
}