summaryrefslogtreecommitdiff
path: root/src/multimedia/audio/qsoundeffect_pulse_p.h
Commit message (Collapse)AuthorAgeFilesLines
* PulseAudio: Fix deadlock for QSoundEffect in setMuted, setVolumeVaL Doroshchuk2017-12-191-2/+3
| | | | | | | | | | | | | 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>
* Cleanup all maemo/meego specific codeLars Knoll2016-11-141-1/+0
| | | | | Change-Id: I6c6f28084c6b030928eebc53c5d0009b168ede6a Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-271-2/+8
|\ | | | | | | Change-Id: I639d42e78a2b85e939c9f8e9dd5da70cdc058857
| * PulseAudio: flush stream before loading a new source in a sound effectYoann Lopes2016-08-151-2/+8
| | | | | | | | | | | | | | | | | | When loading a new QSoundEffect source, the data in the stream must be flushed to avoid that the old source plays right before the new one. Task-number: QTBUG-48982 Change-Id: Iff14884edb2fb4851f93e67ff8191b77ebb16359 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-211-8/+5
|\ \ | |/ | | | | Change-Id: Ieb1a3081907093e31e8c8b7f95993bb3b2173672
| * PulseAudio: change the way volume is applied.Yoann Lopes2016-03-161-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to change the PulseAudio sink input volume. Doing so had some potential unwanted side effects depending on the PulseAudio server configuration. When flat volumes were enabled, it would affect the global system volume. It could also affect the volume of other streams having the same audio role. Volumes in Qt Multimedia are supposed to be relative to the application volume and should not affect anything else than the object on which it was changed. To guarantee that, PulseAudio volume APIs are not used anymore. Instead, software-based volume attenuation is applied on the audio samples before being passed to PulseAudio. Applies to QSoundEffect, QAudioOutput and QAudioInput. Task-number: QTBUG-40823 Task-number: QTBUG-49461 Change-Id: I690716976bda8fe666969ca2cbdf6d8d0b419733 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-191-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I324f65c61171f36641472964d095d72e452afb3a Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersAntti Kokko2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I1c6faa4f59f8eca54f01ef20941fa60161dd7872 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Remove unused private membersThiago Macieira2014-11-251-7/+0
| | | | | | | | | | | | | One is not used, the others are not even initialized, so don't use the memory. qsoundeffect_pulse_p.h:172:20: warning: private field 'm_resourceStatus' is not used [-Wunused-private-field] qvideowidget_p.h:211:25: warning: private field 'm_aspectRatioMode' is not used [-Wunused-private-field] qalsaaudioinput.h:156:22: warning: private field 'timestamp' is not used [-Wunused-private-field] qalsaaudiooutput.h:135:22: warning: private field 'timestamp' is not used [-Wunused-private-field] Change-Id: I7c9f50d57c4d29ee0dfd7dc086771d721cdb5b05 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Update license headers and add new license filesAntti Kokko2014-08-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Ied06887225df341064c12bcc14c259ae74116f2e Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Set volume only if volume was explicitly set.Robin Burchell2014-08-041-0/+4
| | | | | | Change-Id: I0d5abab0ffbf61a74c59ce240fd39e756479026b Done-with: Juho Hämäläinen <juho.hamalainen@tieto.com> Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Resource policy support for QSoundEffect.Robin Burchell2014-08-041-0/+17
| | | | | | | | | | | | | | | | | | Since sound effects are something short and mixed with other audio, do not acquire resources explicitly. Follow the resources availability information to determine when it is ok to play the sound effects. When client has registered itself to resource manager, client's streams are classified properly. If no higher priority client has acquired the resources, isAvailable() is true, and sound effects can be played. We do not explicitly acquire the resources, since then other clients with the same resource class would lose the resources, thus not possible to have second client play music with QMediaPlayer class while our client would just want to play simple sound effects. Change-Id: Ib5589349dca6900a8bee616b8ad77e7cb5ec9533 Done-with: Juho Hämäläinen <juho.hamalainen@tieto.com> Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Don't use integers to describe volume internally in QSoundEffect.Christian Strømme2013-11-281-3/+3
| | | | | | | | | The public api takes floating point values and so does most of the back- ends. Conversion should be done in the back-ends that expect other value types to avoid unnecessary float -> int -> float conversions. Change-Id: I0ee1bfbe350f985294c20f897ffa3bd55288b4c9 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Make PulseAudio implementation of QSoundEffect more robust.Yoann Lopes2013-07-251-0/+1
| | | | | | | | | | | | | It was crashing when the PulseAudio daemon was not running or was killed. When the connection to the daemon fails (or is terminated), it now tries to reconnect every 30 seconds. Sounds created before a connection loss will be recreated after reconnection. Task-number: QTBUG-32487 Change-Id: Ia63707aa5c70434b834b3079a9950a9b35057b26 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-191-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/multimedia/doc/qtmultimedia.qdocconf src/plugins/blackberry/mediaplayer/bbmetadata.cpp src/plugins/blackberry/mediaplayer/bbmetadata.h tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp Change-Id: I447c297ea15a94d1d2feb0fb5f9edac8c5d4505a
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | | | | | | | Change-Id: Ia8c1c38aba1544603fada8c414cc856f365fd15b Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-281-4/+0
|/ | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id95d10f5d9c146d9eb496119af6a8b8501ffcb17 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Remove stale QT_MODULE() usage casesSergio Ahumada2012-10-251-2/+0
| | | | | | | As of Qt5, this macro is defined to be empty; simply get rid of these leftovers. Change-Id: Id24056c0afd013904b1e098dc49e502038fd77a4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-241-24/+24
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Id77334cfb15de096941c88e32d04ca07b4eb4709 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Do not try to complete flush operation if stream has changed.Lev Zelenskiy2012-04-251-1/+1
| | | | | | | | | | | | | | | There is a problem when sound effect already has a sound loaded and we try to load new sound with setSource(). When sampleReady() is called between emptyStream() and emptyComplete() it unloads the current stream and creates a new stream. As a result pulse audio crashed in emptyComplete() while calling pa_operation_unref(pa_stream_cork( m_pulseStream, 1, stream_cork_callback, m_ref->getRef())) with the new m_pulseStream. Change-Id: Idff4fe6037d3f3f116734dc0facabaafa3db14a2 Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Ling Hu <ling.hu@nokia.com>
* Expose the audio category information for streams.Michael Goddard2012-04-161-0/+6
| | | | | | | | | | | QAudioOutput and QSoundEffect now have a category property so that system volume mixing or processing can be applied. Initially just pulseaudio supports this but Windows Vista etc should also work. Change-Id: I6855b08367e5a055ac7dfcffd644c98bfd7c5a4e Reviewed-by: Ling Hu <ling.hu@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I20e5215108c6ebd5f8474fed5c3665118e4791e6 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Ie8cd560b6d9a2c6e552b6be1ad8bc96c80a6535c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update year in Nokia copyright headers.Jason McDonald2012-01-121-1/+1
| | | | | | | Update headers from before 2011 that were missed in the previous commit. Change-Id: Ib0fd91a39ffc57117fe01280e34519c3f914fac0 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Restructure the source code a little.Michael Goddard2012-01-051-0/+170
Change-Id: I995b0fb33bdda7f01bf6266c1c50a1b17eba6760 Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>