summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/audio')
-rw-r--r--src/multimedia/audio/qaudiohelpers.cpp6
-rw-r--r--src/multimedia/audio/qsoundeffect_pulse_p.cpp4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/multimedia/audio/qaudiohelpers.cpp b/src/multimedia/audio/qaudiohelpers.cpp
index fae591477..1cd189d6e 100644
--- a/src/multimedia/audio/qaudiohelpers.cpp
+++ b/src/multimedia/audio/qaudiohelpers.cpp
@@ -103,19 +103,19 @@ template<class T> struct signedVersion {};
template<> struct signedVersion<quint8>
{
typedef qint8 TS;
- enum {offset = 0x80};
+ static constexpr int offset = 0x80;
};
template<> struct signedVersion<quint16>
{
typedef qint16 TS;
- enum {offset = 0x8000};
+ static constexpr int offset = 0x8000;
};
template<> struct signedVersion<quint32>
{
typedef qint32 TS;
- enum {offset = 0x80000000};
+ static constexpr uint offset = 0x80000000;
};
template<class T> void adjustUnsignedSamples(qreal factor, const void *src, void *dst, int samples)
diff --git a/src/multimedia/audio/qsoundeffect_pulse_p.cpp b/src/multimedia/audio/qsoundeffect_pulse_p.cpp
index 51cdde026..a141f7e36 100644
--- a/src/multimedia/audio/qsoundeffect_pulse_p.cpp
+++ b/src/multimedia/audio/qsoundeffect_pulse_p.cpp
@@ -552,8 +552,10 @@ void QSoundEffectPrivate::setVolume(qreal volume)
m_volume = qBound(qreal(0), volume, qreal(1));
locker.unlock();
- if (!m_playing && m_pulseStream)
+ if (!m_playing && m_pulseStream) {
+ PulseDaemonLocker locker;
pa_stream_flush(m_pulseStream, volume_stream_flush_callback, m_ref->getRef());
+ }
emit volumeChanged();
}