Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5d316fd authored by Eric Laurent's avatar Eric Laurent
Browse files

NuPlayer: reduce offload pause teardown timeout.

Waiting 60 seconds to teardown an offloaded path when paused
is not needed and causes unecessary battery drain.
10 seconds is enough to avaoid teardown when it would be
problematic (seek, pause for notifications, buffering...).

Bug: 13505340.
Change-Id: Ibcaa609b59e86ba2bc49539620bd77504d534c0c
parent 701b9647
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ namespace android {

// Maximum time in paused state when offloading audio decompression. When elapsed, the AudioSink
// is closed to allow the audio DSP to power down.
static const int64_t kOffloadPauseMaxUs = 60000000ll;
static const int64_t kOffloadPauseMaxUs = 10000000ll;

// static
const int64_t NuPlayer::Renderer::kMinPositionUpdateDelayUs = 100000ll;
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ static const size_t kHighWaterMarkBytes = 200000;

// maximum time in paused state when offloading audio decompression. When elapsed, the AudioPlayer
// is destroyed to allow the audio DSP to power down.
static int64_t kOffloadPauseMaxUs = 60000000ll;
static int64_t kOffloadPauseMaxUs = 10000000ll;


struct AwesomeEvent : public TimedEventQueue::Event {