Do not try to complete flush operation if stream has changed.

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>
This commit is contained in:
Lev Zelenskiy
2012-04-20 17:02:35 +10:00
committed by Qt by Nokia
parent 7c84225cc8
commit c718043588
2 changed files with 10 additions and 4 deletions

View File

@@ -118,7 +118,7 @@ private Q_SLOTS:
void underRun();
void prepare();
void streamReady();
void emptyComplete();
void emptyComplete(void *stream);
void updateVolume();
void updateMuted();