summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Goddard <michael.goddard@nokia.com>2012-02-17 14:41:39 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-17 07:27:42 +0100
commitf538a3a8f8fe83e1b10fe1c8fabe75993dad0ce6 (patch)
treea1925cf6fa140b81303a467fc6bf9b28e5c64b83
parentc72ad5b190633440ecd05d6189c4df5c089baa0c (diff)
Use a PA function to compare specs instead of memcmp.
Otherwise valgrind complains a lot. Probably holes in the spec structure. Change-Id: I9580a73255820f49c0ac947eed1595a758f19ccd Reviewed-by: Ling Hu <ling.hu@nokia.com>
-rw-r--r--src/multimedia/audio/qsoundeffect_pulse_p.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multimedia/audio/qsoundeffect_pulse_p.cpp b/src/multimedia/audio/qsoundeffect_pulse_p.cpp
index a8bbeb9c..f1f00f36 100644
--- a/src/multimedia/audio/qsoundeffect_pulse_p.cpp
+++ b/src/multimedia/audio/qsoundeffect_pulse_p.cpp
@@ -617,7 +617,7 @@ void QSoundEffectPrivate::sampleReady()
disconnect(m_sample, SIGNAL(ready()), this, SLOT(sampleReady()));
pa_sample_spec newFormatSpec = audioFormatToSampleSpec(m_sample->format());
- if (m_pulseStream && (memcmp(&m_pulseSpec, &newFormatSpec, sizeof(m_pulseSpec)) != 0)) {
+ if (m_pulseStream && !pa_sample_spec_equal(&m_pulseSpec, &newFormatSpec)) {
unloadPulseStream();
}
m_pulseSpec = newFormatSpec;