am f7c7a67d: Merge change 23277 into eclair
Merge commit 'f7c7a67d9b223f92e1884a82d49714cb71ee7d37' into eclair-plus-aosp * commit 'f7c7a67d9b223f92e1884a82d49714cb71ee7d37': Fix issue 2085690: AudioFlinger must properly terminate the input and output threads when destroyed.
This commit is contained in:
@@ -136,8 +136,17 @@ AudioFlinger::AudioFlinger()
|
|||||||
|
|
||||||
AudioFlinger::~AudioFlinger()
|
AudioFlinger::~AudioFlinger()
|
||||||
{
|
{
|
||||||
mRecordThreads.clear();
|
while (!mRecordThreads.isEmpty()) {
|
||||||
mPlaybackThreads.clear();
|
// closeInput() will remove first entry from mRecordThreads
|
||||||
|
closeInput(mRecordThreads.keyAt(0));
|
||||||
|
}
|
||||||
|
while (!mPlaybackThreads.isEmpty()) {
|
||||||
|
// closeOutput() will remove first entry from mPlaybackThreads
|
||||||
|
closeOutput(mPlaybackThreads.keyAt(0));
|
||||||
|
}
|
||||||
|
if (mAudioHardware) {
|
||||||
|
delete mAudioHardware;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user