Merge change 23277 into eclair
* changes: 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