Fix bug 2604132 40s skip after undocking
In case of A2DP write errors, there is an overflow in the calculation
of the sleep duration to simulate the timing of a successful write.
Change-Id: Ic4e570aebf07fac69735aab1bbc2fc73512ee795
diff --git a/libs/audioflinger/A2dpAudioInterface.cpp b/libs/audioflinger/A2dpAudioInterface.cpp
index 747d0e4..995e31c 100644
--- a/libs/audioflinger/A2dpAudioInterface.cpp
+++ b/libs/audioflinger/A2dpAudioInterface.cpp
@@ -302,7 +302,7 @@
Error:
// Simulate audio output timing in case of error
- usleep(bytes * 1000000 / frameSize() / sampleRate());
+ usleep(((bytes * 1000 )/ frameSize() / sampleRate()) * 1000);
return status;
}