output/sles: enable power saving mode

This commit is contained in:
Max Kellermann 2019-03-17 18:04:40 +01:00
parent 0a6e484b1a
commit b76d78e6ae
2 changed files with 10 additions and 0 deletions

2
NEWS
View File

@ -15,6 +15,8 @@ ver 0.21.6 (not yet released)
* support abstract sockets on Linux
* Windows
- remove the unused libwinpthread-1.dll dependency
* Android
- enable SLES power saving mode
ver 0.21.5 (2019/02/22)
* protocol

View File

@ -229,6 +229,14 @@ SlesOutput::Open(AudioFormat &audio_format)
SL_ANDROID_KEY_STREAM_TYPE,
&stream_type,
sizeof(stream_type));
/* MPD doesn't care much about latency, so let's
configure power saving mode */
SLuint32 performance_mode = SL_ANDROID_PERFORMANCE_POWER_SAVING;
(*android_config)->SetConfiguration(android_config,
SL_ANDROID_KEY_PERFORMANCE_MODE,
&performance_mode,
sizeof(performance_mode));
}
result = play_object.Realize(false);