Skip frames out limit for non pcm
Resampling is expected to be possible only for PCM record tracks, so
don't apply this limit for non PCM.
Change-Id: I2a4c7639a24e472902cb4a1042a1715c25d17b55
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 048bec3..c6b4983 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -8541,9 +8541,11 @@
// from framesIn.
// This isn't strictly necessary but helps limit buffer resizing in
// RecordBufferConverter. TODO: remove when no longer needed.
- framesOut = min(framesOut,
- destinationFramesPossible(
- framesIn, mSampleRate, activeTrack->sampleRate()));
+ if (audio_is_linear_pcm(activeTrack->format())) {
+ framesOut = min(framesOut,
+ destinationFramesPossible(
+ framesIn, mSampleRate, activeTrack->sampleRate()));
+ }
if (activeTrack->isDirect()) {
// No RecordBufferConverter used for direct streams. Pass