summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2013-03-05 14:30:28 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2013-03-05 14:30:28 +0800
commit101a15522c9b27da564f69bd26974bac51e5958a (patch)
treef1e20ceb0ee40e70d5cf504aa1a389364d974b9b /src
parentfe8aca1c74b98f424eaaad330d9d824d4c2a1e92 (diff)
Fixed a possible deadlock on android
Diffstat (limited to 'src')
-rw-r--r--src/device_android.cpp9
-rw-r--r--src/device_android.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/src/device_android.cpp b/src/device_android.cpp
index 9ef38ca..056d2d0 100644
--- a/src/device_android.cpp
+++ b/src/device_android.cpp
@@ -29,7 +29,6 @@ namespace audiere {
AndroidAudioDevice::~AndroidAudioDevice() {
ADR_GUARD("AndroidAudioDevice::~AndroidAudioDevice");
- m_quit = true;
shutdown();
AGAudioSetReadCallback(0, 0);
@@ -37,6 +36,14 @@ namespace audiere {
}
+
+ void
+ AndroidAudioDevice::shutdown() {
+ m_quit = true;
+ ThreadedMixerDevice::shutdown();
+ }
+
+
void
AndroidAudioDevice::outputBuffer(const char* buf, int buf_len) {
while (AGAudioIsPaused()) {
diff --git a/src/device_android.h b/src/device_android.h
index 9682caf..6e1ccbd 100644
--- a/src/device_android.h
+++ b/src/device_android.h
@@ -18,6 +18,7 @@ namespace audiere {
~AndroidAudioDevice();
public:
+ void ADR_CALL shutdown();
void ADR_CALL outputBuffer(const char* buf, int buf_len);
const char* ADR_CALL getName();