Merge "AudioTrack: offload is not tied to USAGE_MEDIA" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
364d2515ea
@@ -975,13 +975,9 @@ public class AudioTrack extends PlayerBase
|
|||||||
throw new UnsupportedOperationException(
|
throw new UnsupportedOperationException(
|
||||||
"Offload and low latency modes are incompatible");
|
"Offload and low latency modes are incompatible");
|
||||||
}
|
}
|
||||||
if (mAttributes.getUsage() != AudioAttributes.USAGE_MEDIA) {
|
|
||||||
throw new UnsupportedOperationException(
|
|
||||||
"Cannot create AudioTrack, offload requires USAGE_MEDIA");
|
|
||||||
}
|
|
||||||
if (!AudioSystem.isOffloadSupported(mFormat, mAttributes)) {
|
if (!AudioSystem.isOffloadSupported(mFormat, mAttributes)) {
|
||||||
throw new UnsupportedOperationException(
|
throw new UnsupportedOperationException(
|
||||||
"Cannot create AudioTrack, offload format not supported");
|
"Cannot create AudioTrack, offload format / attributes not supported");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user