From 73431968e3c5cf420b5d63c54cf72d10ff7ee7bc Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Wed, 12 Sep 2012 19:42:34 -0700 Subject: [PATCH] Workaround for track recreation bug 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 362d0224d4..d9d8aee9b6 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -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*/); } -- 2.11.0