summaryrefslogtreecommitdiffstats
path: root/src/plugins/opensles
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into 5.8Yoann Lopes2016-09-011-2/+29
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/multimedia/audio/qaudiosystemplugin.cpp src/plugins/directshow/helpers/directshowobject.cpp src/plugins/directshow/player/directshowiosource.cpp src/plugins/directshow/player/directshowiosource.h Change-Id: I0e4632c7705128f81429ddbcb0d4abbc04858a8b
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-271-2/+29
| |\ | | | | | | | | | Change-Id: I639d42e78a2b85e939c9f8e9dd5da70cdc058857
| | * OpenSL ES: Fix EOS handlingChristian Strømme2016-08-251-2/+11
| | | | | | | | | | | | | | | | | | | | | This fixes the remaining auto tests that were failing. Change-Id: I3b31263e7912422407cb98b4bf2db7080bcfc1a8 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| | * OpenSL ES: Release audio device source in push modeChristian Strømme2016-08-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The IO device was leaking in push mode, as a new one was created each time start was called. Change-Id: I78bb45e9e4e801772e88104b11d7baedc9e91ba8 Reviewed-by: Michael Dippold <michael.dippold@us.thalesgroup.com> Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| | * OpenSL ES: Stop the device if it's not stopped alreadyChristian Strømme2016-08-241-0/+7
| | | | | | | | | | | | | | | | | | Change-Id: I4a9906d2d5aa1eaf8e67773f79ca217150a53ce5 Reviewed-by: Michael Dippold <michael.dippold@us.thalesgroup.com> Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| | * OpenSL ES: Reset states before startingChristian Strømme2016-08-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Some of the state variables were not reset correctly. Change-Id: I22113072320dd1812529c598cda1a5f6cc8c780b Reviewed-by: Michael Dippold <michael.dippold@us.thalesgroup.com> Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| | * OpenSL ES: Fix buffer corruptionMichael Dippold2016-08-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When start is called, the buffer is always filled starting from index 0 without regard to m_nexBuffer. m_nextBuffer could be set to 1 from the previous playback which causes the second buffer to be filled first, which is now the currently playing buffer. This is causing an audible hiccup right after starting in cases where m_nextBuffer starts at 1. Change-Id: Ia0d73638350d5258a51943d7a1c7cd6f22d068ee Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | OpenSL ES: use QAudio::convertVolume().Yoann Lopes2016-06-091-3/+1
| | | | | | | | | | | | | | | Change-Id: Iba1c8c050162646a3cdbe75928a6ebd0a1b17e30 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Improve QAudioDeviceInfo::defaultDevice().Christian Stromme2016-05-204-2/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation of QAudioDeviceInfo::defaultXDevice() would always report the first available device as the "default" one, making the order, in which devices were listed, a hidden requirement when implementing audio plugins. To make it easier and more reliable to retrieve the default device, all new plugins should implement the new QAudioSystemPluginExtension interface as well as the QAudioSystemPlugin. Devices will be chosen in the following order (first match wins): default plugin -> default device -> first available device plugins -> default device -> first available device Task-number: QTBUG-51292 Change-Id: I8ace78858976fe7c60a2c4a117ef15c4e1bb177f Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | Remove the traces of the discontinued android-no-sdk platformv5.7.0-beta1Eirik Aavitsland2016-04-121-3/+3
| | | | | | | | | | Change-Id: Ib9ba913543270e25e9c8deff492b98b0525c9219 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/avfoundation/mediaplayer/mediaplayer.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin5/mockserviceplugin5.pro Change-Id: I5742596230dc510ba2a09eba624429bb67179194
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-4/+4
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: I8e1554b648327ea2fb342b882ce8e439bd6f271d Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-1/+1
|\| | | | | | | Change-Id: I2e4e9cca01d63ed0d1e7f71c7a58322390696036
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-211-1/+1
| |\ | | | | | | | | | Change-Id: I6d88b17f44479a522d181374023648dd007112bd
| | * OpenSL ES: fix QAudioOutput state after resume().Yoann Lopes2016-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In push mode, the state must be IdleState after resume(), and only change to ActiveState once it receives some data. Task-number: QTBUG-50390 Change-Id: Iaf47363196ee94b80ac4ebe58a588929af8d3fad Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
* | | Updated license headersAntti Kokko2016-01-1910-140/+200
|/ / | | | | | | | | | | | | | | | | | | | | 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>
* / Android: Improve detection of optimal settings for QAudioOutput.Christian Strømme2016-01-085-9/+184
|/ | | | | | | | | | | | | | | | | This change will try to detect the optimal buffer size and sample-rate on Android (requires API level 17+). If the device supports low-latency playback, then it's recommended that application developers check the preferred sample-rate through QAudioDeviceInfo::preferredFormat(). On most devices the preferred sample rate seems to be 48 KHz, so this is now the default instead of 44.1 KHz. Note that not all devices supports "proper" low-latency playback, and there are no APIs to retrieve information about how many devices that can be active at the same time; The only remotely quantitative value I've found is "a few"... Change-Id: I0708738b4a31f6bf9e88e9a816679cb688e023f3 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Update copyright headersAntti Kokko2015-02-1210-70/+70
| | | | | | | | | 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>
* Add missing includes for QDataStream/QIODevice.Friedemann Kleint2015-01-071-0/+1
| | | | | | | | After qtbase/90e7cc172a7521396bb2d49720ee4ceb9a9390b3, QStringList no longer includes QDataStream. Change-Id: Ibe3e1e6542e1b592adaabe3f8ffd3268efaf289b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* OpenSL ES: volume support for QAudioInput.Yoann Lopes2014-12-032-5/+17
| | | | | | | | | The OpenSL volume interface is not available for audio inputs on Android so we apply the volume ourselves on the PCM data. Task-number: QTBUG-42159 Change-Id: If43d8aa576bc70a925681f0db1ca8b40e71f7b29 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* OpenSL ES: improve buffer logicChristian Strømme2014-11-042-8/+27
| | | | | | | | | | | | | Don't use relaxed load and stores, we need to be stricter to avoid problems with high frequency re-fills of the buffer. If we don't enforce ordering we might end-up spending more time trying to acquire an open slot in the buffer. Updating processes bytes is also moved off the "OpenSL" thread. Added some comments for improved readability. Change-Id: Ie27965fc6bf4b8394081ae6419f4933522ada98e Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* OpenSL ES: Don't store or return the adjusted volume level.Christian Strømme2014-11-042-4/+2
| | | | | | | | | | According to our own docs we should always return 1.0 (MAX) volume level if the device doesn't support setting the volume, which is the case for OpenSL ES on Android. Task-number: QTBUG-42159 Change-Id: I9144e9e2cd84cc80633c68c5d6fa32b8dbd0fcd5 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Sergio Ahumada2014-09-262-2/+2
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Iad73368a22c6d4662188e6f357a265d0c26756d0
| * Fix integer overflow in several audio plugins.Yoann Lopes2014-09-092-2/+2
| | | | | | | | | | | | Task-number: QTBUG-40804 Change-Id: If006cb7db319bb6fda4ce7eb4f907e897b5d9efa Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | OpenSL ES: Be less rigid about tearing down the output device.Christian Strømme2014-09-122-26/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We where very strict about tearing down the audio device. While this is a good strategy to avoid unnecessary resource usage, it also causes excessive re-allocations, e.g., when transiting from start to stop and back again. This can increase latency, especially in case where a short clip is re-played at a high frequency. This change also decrease the chance of the player ending up in some unknown state where it drops audio clips without any warning. Task-number: QTBUG-40864 Change-Id: I1afad4af0622983f0f0c221d91cf794585d8cad2 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-012-5/+32
|\| | | | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstreamervideoinputdevicecontrol.cpp src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp Change-Id: Ic854589562d2deeaa0ebf75840cb8a2ee32e99de
| * OpenSL: Fix QAudioOutput::setNotifyInterval().Christian Strømme2014-08-252-5/+32
| | | | | | | | | | | | | | | | | | It was not possible to change the notify interval after calling start(). Task-number: QTBUG-40208 Change-Id: I82a626003e3bdfe7b7fc88b2f97da492c788877e Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-2410-190/+110
|/ | | | | | | | | - 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>
* OpenSL: don't try to enqueue new buffers when the buffer queue is full.Yoann Lopes2014-05-301-1/+1
| | | | | | | | | | It could lead to corrupted sound since we were overwritting buffers that weren't played yet. Task-number: QTBUG-39015 Change-Id: I4c015c5383b813955998145d6316acc8c22f19a3 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* OpenSL ES: lazy initialization of QAudioInput's supported formats.Yoann Lopes2014-03-182-4/+11
| | | | | Change-Id: I51cdd35a944c990ce7df999bcb6063342e98c62d Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* OpenSL: Fix volume scaleChristian Strømme2013-12-021-1/+3
| | | | | | | | | | | | The old code was assuming that the interface was expecting power values, while it actually uses amplitude values. In addition the difference between the min/max values where used, resulting in quite high gain values. Task-number: QTBUG-34777 Change-Id: Ibd3f7774b67c44e37dfd79cbe6e2c35746f00a0a Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* OpenSL: Fix build warning about unused result variable.Christian Strømme2013-09-171-3/+2
| | | | | Change-Id: I11a4a3792feb90c46d4f3a77aafa82c18a9d9a45 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* OpenSL: Fix typosChristian Strømme2013-09-121-2/+2
| | | | | Change-Id: I1a293bbf8ad3d9016ff6a7ec816c33d3303e5959 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* OpenSL ES audio plugin.Yoann Lopes2013-07-1912-0/+2081
Adds support for QAudioOutput, QAudioInput and QAudioDeviceInfo using OpenSL ES 1.0.1. This plugin is used on Android. Change-Id: Idf2c22a861e067196f6c5139e51393b086f64183 Reviewed-by: Christian Stromme <christian.stromme@digia.com>