+2
Fixed

Galaxy Nexus - Xiia use with Display off

Timo Dumelle 13 years ago updated by Jona (Lead Developer) 12 years ago 17
Hi, 
i have an issue with Xiia while listening to streams when the Display is off.
When its off, the stream starts to bucking / sound snatchy. (No matter qhich quality, connection, stream)
If i turn the display on again it is gone. Turning off display let appear the issue instantly.
If you want i can do a video of the problem.
Hoping for help!
Thank you!
ps: Xiia is awesome ;)
pps: Android 4.0.2 Stock
Thanks Timo for the post! So you are hearing choppy audio when the device screen is off right? Is this happening with AAC streams?
Could you download XiiaLive Beta from the market and see if this issue still happens?
With the beta its not exactly the same issue. Now its not like choppy but it sounds distorted. Its 5 seconds normal, 3 seconds distorted and so on.
+1
This is an issue seen on some devices with streaming AAC content. I would recommend you set  the FFMpeg stream engine under XiiaLive Beta -> Settings -> Stream -> Stream Engine. That should fix the streaming issue. However I'll still be trying to resolve this issue.
No, it sounds still distorted. (even with FFMpeg)
If display is on, there is no problem. 
Galaxy Nexus Android 4.0.4 (not 4.0.2)
I'm sure you did this but just to make sure... make sure you stop playback than restart it after you have changed the stream engine.
Restarted my phone -> problem solved!
Thank you!
+1
Awesome! I want to confirm/understand what exactly you did... Which stream engine do you currently have selected?
I used FFMpeg with the Xiia beta and Android 4.04 stock on my Galaxy Nexus

I too have this bug. It seems to only happen when I'm streaming with WIFI on and the screen is off. I did a lot of research and discovered this post: http://forum.xda-developers.com/showthread.php?p=28477796#post28477796

There was a change in API 12 (Honeycomb and later) with the way "wifi lock" is handled. Even if the sleep policy in settings->wifi->advanced->"Keep wifi on during sleep" is set to "always", wifi will still be in a "low performance mode". This results in throttled speed (f.e: stuttering streaming), high latency (ping your phone) and can even cause disconnects, when the screen is off.
Still this is not bug but a feature of Android and should be addressed by any app that needs full wifi performance. Any app that needs full wifi performance (like streaming or file shearing over wifi) should call for "WIFI_MODE_FULL_HIGH_PERF". This can be found in the official "android developer reference ". Before API 12 (honeycomb) an app just needed to call WIFI_MODE_FULL for "wifi lock". If an app isn't coded proberly for honeycomb and ICS and has issue with Wifi performance appart from calling "wifi wake lock", you should report that to the developer of that app. 
I still found a simple workaround for scenarious in which this function is not properly called. There is an rather simple widget on google play called "WIFI High Performance Widget ". If the widget is enabled, the function WIFI_MODE_FULL_HIGH_PERF is called and the wifi performance is on full speed even when the screen is off. Im not in any way involved in the developement of this app and there might be other apps out there, that could achieve the same (for example: Android Terminal emulator  also calls WIFI_MODE_FULL_HIGH_PERF if "wifi lock" is enabled.) Still this widget is the simplest solution i found thus far. Just enable the widget and get full wifi performance when screen is off.

This seems to be the problem for me, as installing the app suggested in that forum, the problem has disappeared. I hope this helps you in solving this problem. It seems to only affect those with Honeycomb and later. 

Thanks for that info, but this was the first i have tried.
The next thing is, that this issue appears not only at WLAN.
With GSM or UMTS its the same!
As mentioned by Jona, switching to FFMpeg works!
Hi Jose, I actually have the wifi lock types already changed. I'm waiting to finally be ready to release the next beta of Xiia. Thanks for your post! ;)
+1
Thank you so much for implementing this Jona!! It was driving my crazy! Hahaha.
+1
Just tried out the newest beta, and it's working MINT now! Thank you again so much! WIFI_MODE_FULL_HIGH_PERF fixed my problem!
Thanks for that info, but this was the first i have tried.
The next thing is, that this issue appears not only at WLAN.
With GSM or UMTS its the same!
As mentioned by Jona, switching to FFMpeg works!