diff --git a/QQt.pro b/QQt.pro
index 4ccdd419..2a4924b9 100644
--- a/QQt.pro
+++ b/QQt.pro
@@ -19,8 +19,7 @@ SUBDIRS = src/qqt.pro
##QQt installed to sdk or
##QQt is build
##-----------------------------------------------------------------
-#
-SUBDIRS += examples/exquisite
+#SUBDIRS += examples/exquisite
#SUBDIRS += examples/tabwidgetexamples
#SUBDIRS += examples/qrcodeexample
#SUBDIRS += examples/qqtnetworkexample
diff --git a/src/multimedia/qqtaudiomanager.cpp b/src/multimedia/qqtaudiomanager.cpp
index 0fffeea6..5377a965 100644
--- a/src/multimedia/qqtaudiomanager.cpp
+++ b/src/multimedia/qqtaudiomanager.cpp
@@ -50,13 +50,15 @@ void QQtAudioManager::stopInput()
//输入设备还开着,那么输入流设备一定开着。这是QQtAudioManager的功能设定。
if ( mInputDevice )
{
+ disconnect ( mInputDevice, SIGNAL ( readyRead() ), this, SIGNAL ( readyRead() ) );
+ mInputDevice = NULL;
+
//关闭QAudioInput,等于关闭了拾音器。
+ //这两个函数有一个(应该是deleteLater,迅速执行了)会释放mInputDevice,导致野指针,在android设备上会崩溃。此处注意。把disconnect函数提前。
+ //注释:mInputDevice是mInputManager的读写口,由mInputManager内部产生和释放。
mInputManager->stop();
mInputManager->deleteLater();
mInputManager = NULL;
-
- disconnect ( mInputDevice, SIGNAL ( readyRead() ), this, SIGNAL ( readyRead() ) );
- mInputDevice = NULL;
}
}
@@ -81,11 +83,12 @@ void QQtAudioManager::stopOutput()
{
if ( mOutputDevice )
{
+ mOutputDevice = NULL;
+
mOutputManager->stop();
mOutputManager->deleteLater();
mOutputManager = NULL;
- mOutputDevice = NULL;
}
}
diff --git a/test/voicetest/android/AndroidManifest.xml b/test/voicetest/android/AndroidManifest.xml
index a4f93c44..4487c796 100644
--- a/test/voicetest/android/AndroidManifest.xml
+++ b/test/voicetest/android/AndroidManifest.xml
@@ -77,4 +77,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+