summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.11' into ↵v5.15.11-lts-lgplTarja Sundqvist2023-06-091-3/+3
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I3279e8339e4fadcc6d5aaafa01e4b15a92168a6c
| * QAudioHelpers: fix C++20 -Werror,-Wdeprecated-enum-float-conversionMarc Mutz2022-08-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Says Clang 10.0.0 -std=c++20: qaudiohelpers.cpp:71:44: error: arithmetic between enumeration type 'QAudioHelperInternal::signedVersion<unsigned char>::(anonymous enum at /home/marc/Qt/qt5/qtmultimedia/src/multimedia/audio/qaudiohelpers.cpp:63:5)' and floating-point type 'double' is deprecated [-Werror,-Wdeprecated-enum-float-conversion] pDst[i] = signedVersion<T>::offset + ((typename signedVersion<T>::TS)(pSrc[i] - signedVersion<T>::offset) * factor); ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix by turning the enum { offset } into a static constexpr int instead. Manual conflict resolutions: - extended the fix to the Qt5-only quint{16,32} specializations which are missing from the Qt 6 code. For the quint32 code, chose uint as decltype(offset), because 0x8000'0000 is not a proper value for int, and the subtraction for which offset is used doesn't promote its arguents to int, like for quint{8,16}, but stays in uint space, so an uint offset is suitable. Task-number: QTBUG-104172 Change-Id: I92a22583fc5e1fc524364b64701aa8d416b82671 Reviewed-by: Lars Knoll <lars.knoll@gmail.com> (cherry picked from commit 94d43085b3f3327b2bf2d644c5f984391f608d3a) Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.7' into ↵v5.15.7-lts-lgplTarja Sundqvist2022-09-121-1/+3
|\| | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I725962188e023f6a05333eca71cd14aa48ab7506
| * PulseAudio: Call pa_stream_flush() with PulseDaemonLocker lock heldAndreas Holzammer2021-10-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | The pa_stream_flush() must be called with pa_threaded_mainloop_lock() held, otherwise it is possible to corrupt internal PA state. The PulseDaemonLocker implements this lock and other pa_stream_flush() instances within qsoundeffect_pulse_p.cpp already instantiate the PulseDaemonLocker to claim the pa_threaded_mainloop_lock(). Add the missing locking to ::setVolume pa_stream_flush() call too. Change-Id: I667b1df669f839737c6cedb62ff66b612bdd65a0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-2538-784/+784
|/ | | | | | | | | | | This reverts commit 80d46e3a5f64ff2456c40bdba63b6d5c69a32cdd. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I5c64ffa120f916711e5cf01c828774f8456dec06 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Update commercial license headersTarja Sundqvist2021-01-2738-784/+784
| | | | | | | | | | | | | | | | Updated header.COMM to files in tqtc-qtmultimedia. Examples, tests or documentation files are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reaso for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4171 Change-Id: I86ebf7c3653b55983cefff246c0cb019cbcda8c4 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* QNetworkReply: Fix use of deprecated error signalMårten Nordheim2020-03-251-1/+1
| | | | | | | | | Update it to use the new errorOccurred Task-number: QTBUG-82605 Change-Id: Ia7f4f51917ac4694e54e47318cb477aa05c2929e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* PulseAudio: Discard buffer with outdated volume in QSoundEffectVaL Doroshchuk2020-03-131-0/+17
| | | | | | | | | | | | | When the sample is ready, the volume is applied to it and written back to pulse's buffer. When the volume is changed again, need to discard buffer with outdated volume, and rewrite. Change-Id: I51a6ab3ee1a5c799643a43c5628439c2d659f9fc Fixes: QTBUG-79687 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-211-12/+1
|\ | | | | | | Change-Id: I2ba97d82a57172656f6549f368ee51f718f9cdf8
| * Extract QAudioProbe code snippetMariana Meireles2019-09-111-12/+1
| | | | | | | | | | | | | | Adding the code to a snippet file Change-Id: Iee3a24a1d2f28bc8863cf321b0b55c0459708995 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-121-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstvideorenderersink.cpp src/gsttools/qgstvideorenderersink_p.h Change-Id: I7fe29161d568fa3f7688abfd2f993d1b16ac3fb9
| * Include moc files after QT_END_NAMESPACEVal Doroshchuk2019-09-091-1/+1
| | | | | | | | | | | | Fixes: QTBUG-76574 Change-Id: I69ef47bbd01967c3d7a0c5d1554fcdd29619ebfa Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Port from QMutex::Recursive to QRecursiveMutexMarc Mutz2019-08-012-9/+11
| | | | | | | | | | | | | | | | Also port from QMutexLocker to std::lock_guard or std::unique_lock, as the former will not support QRecursiveMutex going forward. Change-Id: I1ed1a129e2b9b77aa0a729e8cab03c673566a345 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Make QAudioDeviceInfo::realm() publicVal Doroshchuk2019-07-192-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Since there could be multiple audio plugins, sometimes it is useful to filter devices per a plugin or avoid duplicates if any. QAudioDeviceInfo::realm() returns a key of the audio plugin that was used to retrieve the device info. Change-Id: Ie786c2c0f5bf181f08ee9be544f20eb41a264e26 Fixes: QTBUG-75781 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-161-4/+8
|\| | | | | | | Change-Id: I7ca7fb6143ec296c16a37a7be236470dbd1742a7
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-111-4/+8
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ic700bdddc5b4ae663af0daae54feb2420c8a1730
| | * Fix crash when app is destroyed before QSample::load is finishedVaL Doroshchuk2019-07-051-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSample objects live and handled in loading thread (which uses QNetworkAccessManager). When the app is finished and going to be destroyed, all static objects are destroying as well. In case if static QNetworkConfigurationManagerPrivate (which is used by QNetworkAccessManager) is destroyed before static QSampleCache, and loading of the resource is not finished yet (still executing QNetworkAccessManager::get()), this produces a crash. Since the loading thread is started only when loading of new QSample is requested, (and all events are also handled by this thread) proposing a fix to wait before loading thread is finished when a sample is requested to be released. This postpones deleting of the QSample either when new sample is requested to load or when QSampleCache is destroyed. This makes sure that no loading thread exists when all QSoundEffects objects and afterwards QNetworkConfigurationManagerPrivate are already deleted. Change-Id: I55669ea4c2796a48cae4f0465f7f74d89e393675 Fixes: QTBUG-76090 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | Eradicate Java-style iterators and mark the module free of themMarc Mutz2019-07-041-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Java-style iterators are scheduled to be deprecated, or at the very least banned from use in Qt's own implementation. Ditto for QLinkedList. Change-Id: I5471c293a7a050b92db47f7aeac15dd05bd46650 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | | Port towards load/storeRelaxed atomicsFriedemann Kleint2019-06-251-3/+3
|/ / | | | | | | | | | | | | | | Plain load() / store() have been deprecated, so port away to their straight replacements. Change-Id: Id5d0cfc97336618e444126278630decf581f3b6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Doc: Fix multiple documentation issuesv5.13.0-beta3Topi Reinio2019-04-161-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - GstTools has some (internal) documentation, but was causing a number of warnings with QDoc's clang parser - exclude it from the documentation build. - Remove direct links from example documentation to individual example files; they no longer work. - Fix navigation for QML types; The main QML types pages did not list types for QtAudioEngiine. - Use \QtMinorVersion macro to make the documented import versions follow the minor Qt version. - Fix \since usage to be consistent throughout. - Fix linking issues for QML properties/methods - Minor language fixes Change-Id: I735cd13fa6dedd6bf06d6b6ef50ce2e0d69a545b Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-272-2/+2
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ie0a7534d518cd5758119edc77d8275ac3da2037c
| * Add source url to 'decoding error' warningRoland Rossgotterer2019-03-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | Previously, QSoundEffect logged a warning if the source could not be decoded, but without mentioning the source it tried to decode. When using multiple QSoundEffects in one application, adding the source to the warning will help to find the one causing the decode error. Change-Id: I4c6bbdfe4a62f650b64ab951bcc637febedae98e Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | multimedia: modernize by using nullptrJochen Seemann2019-01-048-38/+38
| | | | | | | | | | | | Change-Id: Id1084fec084b972aaa1d2389ee56ee831a821172 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-171-1/+1
|\| | | | | | | Change-Id: Iaf74b2b0f03af46942beaa5aa1fc61296a66ec47
| * Alsa: Do not open device twice in QSoundEffectVaL Doroshchuk2018-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When either QSoundEffect::loadedChanged or QSoundEffect::statusChanged is emitted QSoundEffect::play() can be called which results to call QAudioOutput::start() twice. Added a fix to call QAudioOutput::start() only if QAudioOutput::state() is QAudio::StoppedState. Flow trace: 1. PrivateSoundSource::sampleReady() 2. QSoundEffectPrivate::setStatus(QSoundEffect::Ready) and emits statusChanged() or loadedChanged() 3. If there is a connection to QSoundEffect::loadedChanged/statusChanged and QSoundEffect::play() is called there. 4. QSoundEffect::play() calls QAudioOutput::start() because sample is ready 5. QAudioOutput::start() is called again within PrivateSoundSource::sampleReady() when QSoundEffectPrivate::setStatus exited. Change-Id: I7ad8e9126b6006e1972356c80a7fd2e5c6a5ea04 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Add a support for selecting the output device used by QSoundEffectOtto Ryynänen2018-10-306-18/+54
|/ | | | | | | | | | | | | The QSoundEffect can be forced to use a specific audio output device. This is useful on a system with multiple output devices as individual QSoundeffects can use separate output devices. Due to way QAudioOutput (alternate implementation behind QSoundEffect) is implemented, QAudioDeviceInfo is used as a method of defining the output device to be used. Task-number: QTBUG-63596 Change-Id: Ibfb9894fec914726faee4e31c42ab08832693cf6 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Fix warning on deleteLater on nullptr in QSampleCachePierre Hallot2018-07-241-2/+4
| | | | | | | | | | | | | | It is possible to have a loading thread running, but with no network manager. In that case, calling deleteLater() on m_networkAccessManager results in a warning: postEvent: Unexpected null receiver. Fix this issue by checking whether the network manager exists before calling deleteLater() on it. Task-number: QTBUG-66910 Change-Id: I818a87a605b4e906dee47c6c815a6b8112b16829 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* QSampleCache: Fix memory leakOrgad Shaneh2018-07-051-2/+1
| | | | | | | | | | | | | | and a warning on termination: QCoreApplication::postEvent: Unexpected null receiver During static deinit it is not possible to use deleteLater, as there is no event loop running at this stage. The crash that was described in QTBUG-30630 doesn't reproduce with Qt 5.10, so I guess it should be safe to just delete. Change-Id: I0c404d71e9f102018e314c890ff679f8c0952b07 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* QSoundEffect: Check if network access manager is already releasedVal Doroshchuk2018-05-111-1/+2
| | | | | | | | | In case if network access manager is already released need to prevent using it in dtor. Task-number: QTBUG-66754 Change-Id: I9f61e284b39e920dadf771d807a4b7dce2a353f7 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* QSoundEffect: Release QAudioOutput when new source url appliedVal Doroshchuk2018-05-091-0/+7
| | | | | | | | | | | | When sample is ready QAudioOutput is created with sample's format. In case when new source url is applied old format is reused in QAudioOutput instance which might lead incorrect playback. Task-number: QTBUG-54262 Change-Id: I84af167412cb53726593a3bfd4193fc7cd71f332 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* QSound(Effect): Cleanup coding styleAndre Hartmann2018-04-264-11/+11
| | | | | Change-Id: Ie8589bb55388c1f41b1706b6571e2eec401fc415 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* QSound: Allow to play files with qrc schemaAndre Hartmann2018-04-251-1/+10
| | | | | | | | It was possible to play resource files only by prefix ":/". Added support of qrc schema in filenames. Change-Id: I9e538422828ad2107ab5567d172dca8728cbc64d Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Doc: Fix documentation warningsTopi Reinio2018-04-196-19/+13
| | | | | | | | | | | | Add a custom module header, used only for documentation builds, that pulls in also the QtMultimediaWidgets module. Several documentation fixes to clean up warnings from clang. Task-number: QTBUG-67790 Change-Id: I6c1013798a648250c8555eb92684ec3b33ff7531 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QSound(Effect): Use C++11 member initializationv5.11.0-beta3Andre Hartmann2018-03-276-77/+48
| | | | | Change-Id: Iec7442f4621ad131bf6291e0f5d013ee379c5e3b Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* QSound: Fix comment typosAndre Hartmann2018-03-271-3/+3
| | | | | Change-Id: I13cf879be6fc6225552990b8196aeb39299b8e3f Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* QSound(Effect): Convert to functor-style connectAndre Hartmann2018-03-274-31/+38
| | | | | Change-Id: Ie58ee30b1ace836c620812b8063246c0d01d7214 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* QSoundEffectPrivate: Use nullptr instead 0 or NULLAndre Hartmann2018-03-232-37/+39
| | | | | | Change-Id: I62e3d4d1284adeea457d754d63650b5c9b81e276 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Support changing of volume in 24-bit audio samplesVaL Doroshchuk2018-03-221-0/+49
| | | | | | | | Introduced a fix to support changing of volume for 3 bytes samples audio stream. Task-number: QTBUG-60579 Change-Id: I4ba4a9a1cf65812ccbc46b40c78546875d5e4d73 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-121-1/+2
|\ | | | | | | Change-Id: I397c78d33594f4b64d9718cd1b180fa0cee1e5bc
| * Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-02-021-1/+2
| |\ | | | | | | | | | Change-Id: I0564f22f9001d373ad03426dd6d9f584fbab7115
| | * PulseAudio: Prevent crash when a sound device cannot be createdAndy Shaw2018-01-241-1/+2
| | | | | | | | | | | | | | | Change-Id: I74436b9e8903dd3d38926497594ee195f31c81e6 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Doc: Fix clang-qdoc diagnostic warningsVenugopal Shivashankar2018-01-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - qtmultimedia/src/multimedia/audio/qaudiobuffer.cpp:533: (qdoc) warning: clang found diagnostics parsing \fn QAudioBuffer::StereoFrame::StereoFrame() - qtmultimedia/src/multimedia/audio/qaudiobuffer.cpp:540: (qdoc) warning: clang found diagnostics parsing \fn QAudioBuffer::StereoFrame::StereoFrame(T leftSample, T rightSample) - qtmultimedia/src/multimedia/audio/qaudiobuffer.cpp:546: (qdoc) warning: clang found diagnostics parsing \fn QAudioBuffer::StereoFrame::operator=(const StereoFrame &other) - qtmultimedia/src/multimedia/audio/qaudiobuffer.cpp:553: (qdoc) warning: clang found diagnostics parsing \fn QAudioBuffer::StereoFrame::average() const - qtmultimedia/src/multimedia/audio/qaudiobuffer.cpp:559: (qdoc) warning: clang found diagnostics parsing \fn QAudioBuffer::StereoFrame::clear() - qtmultimedia/src/multimedia/audio/qaudiobuffer.h:120: (qdoc) warning: No documentation for 'QAudioBuffer::StereoFrame::average() const' - qtmultimedia/src/multimedia/audio/qaudiobuffer.h:121: (qdoc) warning: No documentation for 'QAudioBuffer::StereoFrame::clear()' Change-Id: Icd06a43d4684b2106a74d2bc408f9ab8b7572d7b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-063-8/+15
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I5acdc7e0bd3729b80522dfff0f388cf2507fb111
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-061-1/+4
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I3d6e69f3f99b2f0a0e2c29ffdd02176e1f22304e
| | * Fix memory leak in QSoundEffectVaL Doroshchuk2017-12-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | If qthread is being exited all objects that belong to it also should be cleaned up. Task-number: QTBUG-64407 Change-Id: Ida09fcfac7e1ee2741c6e1b76a672a7a5775addc Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * | PulseAudio: Fix deadlock for QSoundEffect in setMuted, setVolumeVaL Doroshchuk2017-12-192-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The deadlock would happen when one of the protected functions were reentered, as the lock used was not recursive. Since reading and writing to the volume and muted properties don't happen that often, the rw-mutex was replaced by a normal non-recursive mutex, which is now unlocked before the property changed signal is emitted. Task-number: QTBUG-65220 Change-Id: I1a224e9ff03f14593a854a7c1049c8a0445e29e6 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-191-13/+16
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h Change-Id: Ic6e27742ef6d1af0532ad05902a1431ebd5f449d
| * | PulseAudio: Support 24 bit framesVaL Doroshchuk2017-09-261-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Applied 24 bits frames support and also stronger restrictions for supported formats: https://freedesktop.org/software/pulseaudio/doxygen/sample.html Task-number: QTBUG-63427 Change-Id: If5372217cbf16c1152db55748adcfbd61263403d Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Replace Q_NULLPTR with nullptrKevin Funk2017-09-277-9/+9
| | | | | | | | | | | | | | | Change-Id: I3b7601b4a97f8a2b1d2da6ef134f1577846ba713 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Add custom audio role API to QMediaPlayerJames McDonnell2017-09-062-1/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | Allows use of audio roles beyond those known to Qt. [ChangeLog][QMediaPlayer] Added customAudioRole string property to enable use of audio roles beyond those available via the audioRole enum property. Change-Id: Id7ed5d7bc1af0c15910e699f25c97cfed2d48243 Reviewed-by: Christian Stromme <christian.stromme@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>