kaytat / SimpleProtocolPlayer

Audio player for uncompressed PCM data
Apache License 2.0
108 stars 22 forks source link

Acquire wifi wake lock when starting playback. #4

Closed jotomo closed 8 years ago

jotomo commented 9 years ago

On one of the two devices I'm running the application on, the stream always stops after 17 minutes. Checking the code, I noticed a wifi wake lock was created and released, but never acquired. This PR adds the lock acquisition and fixes the issue for me. When merging the multi-stream PR, this code will probably break, as some logic will be required to keep track of playing streams and release the lock (in MusicService.relaxResources()) only when the last stream has stopped playing.