diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-10-04 12:45:16 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-10-04 15:46:49 +0200 |
commit | d890688776853ccf0323d1278a477d791b13f248 (patch) | |
tree | b885acf815f3adf4d4f38d9078ad643b50967660 /examples/multimedia/audiosource | |
parent | 9263cca59a4952bb95c94d433b05c77cdcbb3e8e (diff) |
Fix assertion in audio source example
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>
Diffstat (limited to 'examples/multimedia/audiosource')
-rw-r--r-- | examples/multimedia/audiosource/audiosource.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/examples/multimedia/audiosource/audiosource.cpp b/examples/multimedia/audiosource/audiosource.cpp index 04e8e0f40..c2dbb6786 100644 --- a/examples/multimedia/audiosource/audiosource.cpp +++ b/examples/multimedia/audiosource/audiosource.cpp @@ -88,7 +88,6 @@ qint64 AudioInfo::writeData(const char *data, qint64 len) { const int channelBytes = m_format.bytesPerSample(); const int sampleBytes = m_format.bytesPerFrame(); - Q_ASSERT(len % sampleBytes == 0); const int numSamples = len / sampleBytes; float maxValue = 0; |