JAudioTrack: Add offload mode support
Also, this CL adds below methods to JAudioTrack:
1) getAudioSessionId
2) setOutputDevice
- However, it uses a hidden method of AudioManager.
(See MediaPlayer2Impl.java)
3) getFlags
- Method body is incomplete.
- It needs a way to check whether the audio track is direct,
or whether the HW supports A/V sync.
4) getTimestamp(ExtendedTimestamp *timestamp)
- Method body is empty.
- It needs appropriate Java method to call.
- This is a different method from previously added method
getTimestamp(AudioTimestamp& timestamp).
5) pendingDuration
- Method body is incomplete.
- It depends on above getTimestamp method.
6) add/removeAudioDeviceCallback
- Method body is empty.
- It needs appropriate Java method to call.
- Cannot use Java AudioTrack.addOnRoutingChangedListener(), since the
callback onAudioRoutingChanged(AudioRouting) does not provide the
audio_io_handle_t which the native AudioDeviceCallback needs.
Bug: 70363744
Test: Builds successfully
Change-Id: I50455280812546d97f2c3e6425d17c0483476af1
2 files changed