Skip to content

Commit

Permalink
audio tracking fix: google#3
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliskov committed Feb 11, 2019
1 parent 5482c7e commit 992b819
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ private long getPlaybackHeadPosition() {
} else {
AudioTimestamp timestamp = new AudioTimestamp();
audioTrack.getTimestamp(timestamp);
rawPlaybackHeadPosition = 0xFFFFFFFFL & timestamp.framePosition;
rawPlaybackHeadPosition = timestamp.framePosition + (System.nanoTime() - timestamp.nanoTime) * outputSampleRate / 1e9;
}

if (needsPassthroughWorkarounds) {
Expand Down

0 comments on commit 992b819

Please sign in to comment.