OSDN Git Service

Workaround for track recreation bug
authorJean-Michel Trivi <jmtrivi@google.com>
Thu, 13 Sep 2012 02:42:34 +0000 (19:42 -0700)
committerJean-Michel Trivi <jmtrivi@google.com>
Thu, 13 Sep 2012 02:42:34 +0000 (19:42 -0700)
Ignore thread can call Java parameter to work around bug where
 AudioTrack instance gets recreated when key clicks are enabled
 and WFD gets turned on, with the wrong parameters.

Change-Id: Ia42c8704b46fe3ffea560b05b60939fa2e4b29e1

media/libmedia/AudioTrack.cpp

index 362d022..d9d8aee 100644 (file)
@@ -279,7 +279,8 @@ status_t AudioTrack::set(
     mCbf = cbf;
 
     if (cbf != NULL) {
-        mAudioTrackThread = new AudioTrackThread(*this, threadCanCallJava);
+        //FIXME ignoring threadCanCallJava to work around track recreation issue
+        mAudioTrackThread = new AudioTrackThread(*this, true /*threadCanCallJava*/);
         mAudioTrackThread->run("AudioTrack", ANDROID_PRIORITY_AUDIO, 0 /*stack*/);
     }