summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/audiosource
Commit message (Collapse)AuthorAgeFilesLines
* Improve examples CMakeLists.txtKai Köhne2022-02-171-11/+5
| | | | | | | | | | | | | | | | | | - Remove "# generated from xyz.pro" comment from pro2cmake - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Change-Id: I9f60da23df1547d685439b0263fa5bf533b7c69e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 236eec9cbe35f018f0c0617d4a0d707dea85b0ac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't crash if system has no audio deviceDoris Verria2022-01-131-0/+3
| | | | | | | | Fixes: QTBUG-97838 Change-Id: I355958b99f62fc85228b3dd3afd06aa01005008c Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit e95f7256fb534c3dd03b3091dd9835cd2f33d327) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* audiosource example: Refactor push modeFriedemann Kleint2021-12-222-10/+16
| | | | | | | | | | | | Factor out a function to calculate the level from the data to make it clearer that push does not require reimplementing a QIODevice. Complements a71362d9ef7098c1d7869b3768a0990a61474980. Change-Id: I4899b96d1e8d0336f960e514bfd355a894522aa8 Reviewed-by: André de la Rocha <andre.rocha@qt.io> (cherry picked from commit 28932bcc4c40a6c5f96bf2beb860c916c1161056) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Polish the audiosource exampleFriedemann Kleint2021-12-203-51/+42
| | | | | | | | | | | | | - Use a QWidget instead of a QMainWindow since no QMainWindow functionality is used and the controls are wrongly parented - Change the update signal of AudioInfo to levelChanged(level), removing the need for a lamba - Streamline the code Change-Id: Ic03a5414ee5da4841532ad23db112d0594f458e5 Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit a71362d9ef7098c1d7869b3768a0990a61474980) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix assertion in audio source exampleLars Knoll2021-10-041-1/+0
| | | | | | | | | | | There is no need for the assertion. If we receive partial samples, we can simply ignore that partial sample for the max volume calculation. Fixes: QTBUG-95063 Pick-to: 6.2 Change-Id: Ia1022f87ac4f23e154fc7627ace477c07ecef55a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Raise cmake_minimum_required to VERSION 3.16 in examplesJoerg Bornemann2021-08-171-1/+1
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-95636 Change-Id: I67a136d4437269f9afea9bf71d424d46132f4fa4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Restore qmake project files for examplesJoerg Bornemann2021-08-061-0/+13
| | | | | | | | | | | | We regression-test in the CI by building examples with qmake. This partly reverts commit 7b28765dd0898e0638555e990308dc2fa09b79da. Pick-to: 6.2 Fixes: QTBUG-95065 Change-Id: Ib146eeb974d4e94d580597dbaae93378aa5561a9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Tag Qt Multimedia Widgets examples with 'widgets'Kai Köhne2021-08-021-0/+1
| | | | | | | | | | | The QML examples have QML in the name, and therefore are tagged with 'qml'. Make sure that the examples using MultimediaWidgets are also tagged with 'widgets'. Pick-to: 6.2 Change-Id: I02495f6d08b24e1f84a975d1d7bd9118bf1c4e7a Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Rename example to audiosourceKai Köhne2021-07-152-5/+3
| | | | | | | | Amends 1c4dd0c23c0a Pick-to: 6.2 Change-Id: Id84a6b12b5e15b20be265858446a4fca1517f77e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Part 1 Fix Qt Multimedia documentation issuesTopi Reinio2021-07-091-4/+4
| | | | | | | | | | | | | TODO: * src/multimedia/audio/qaudiobuffer.cpp:333: (qdoc) warning: Cannot find 'QAudioBuffer::StereoFrame' * multimediaquick/camerafocus.qdoc content refers to now-removed classes * multimediawidgets module doc needs CMake build instructions/snippet * Lots of undocumented parameters, enum values, other minor things Pick-to: 6.2 Change-Id: I4861aa0edf2904e5e43783f5167c5d2ba575b91b Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QCameraInfo/QAudioDeviceInfo to QCamera/AudioDeviceLars Knoll2021-06-082-5/+5
| | | | | | | | | Those classes represent the physical device and it's properties, thus that name fits best. Change-Id: I0f45fc875ae6110452c1f2fb17f32adbe5155d01 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QAudioInput to QAudioSourceLars Knoll2021-06-046-0/+571
The renaming is a part of some changes coming from an API review that tries to solve the problem of not having API symmetry between QCameraInfo/QCamera and QAudioDeviceInfo where QAudioDevice is missing (so you can't select a nullptr as the input/output device to disable it). One issue is that QAudioInput/QAudioOutput are there for reading and writing low level PCM data from an audio device. They as such are not quite suitable as classes to use together with QMediaPlayer or QMediaCaptureSession, as they allow direct writing of data bypassing the player or capture pipeline. To solve this, we renamve those classes to QAudioSource/Sink (making it a bit more symmetric with QVideoSink). That opens up our API space for a QAudioDevice class avoiding names that feel like they are doing the same thing. The patch also renames things on the backend side to keep API and implementation consistent. Change-Id: I9f6b4892d3eee4e252cb3782e681b0c3824f27e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>