hanyoud / android-daisy-epub-reader

Automatically exported from code.google.com/p/android-daisy-epub-reader
1 stars 0 forks source link

Audio pauses or stops #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Pauses very briefly when:
- Change screen orientation OR
- Screen turns off due to timeout OR
Audio stops when:
- Pressing power button when book is playing to turn off screen OR
- Pressing home when book is playing to multi-task 
- After a while of audio playback with screen off

What is the expected output? What do you see instead?
When a book is playing the audio should not break or pause or stop and behave 
similarly to the default music app where it will play continuously until it 
reaches the end of playlist or otherwsie told explicitly to stop playing music. 

What version of the product are you using? On what operating system?
181

Please provide any additional information below.
- Running CyanogenMod 6.1.1:Vision (based on Android 2.2 froyo) on HTC G2 
- Running advanced task maanger taskkiller and CPU tuner 

Original issue reported on code.google.com by fatsterf...@gmail.com on 22 Dec 2010 at 7:25

GoogleCodeExporter commented 8 years ago
The audio seems to pause the audio without restarting when you hit the power 
button or the scrren times out and turns off when the screen is in portrait 
orientation. The audio appears to continue playing however when the screen is 
in landscape orientation.

Original comment by fatsterf...@gmail.com on 24 Dec 2010 at 3:41

GoogleCodeExporter commented 8 years ago
Thank you for the clear bug report and the update. I've not noticed the player 
continuing in landscape format, I'll experiment with this as I typically use my 
phones in portrait format. There's nothing special in the code to behave 
differently in each format (apart from slightly different formats of the screen 
layout) so perhaps there's a difference in the way the Android software is 
managing the lifecycle of the application in landscape mode?

Also, I've worked through some of the points you report on my phones. I don't 
have a device with the version of Cyanogen Mod. I do have an old G1 with 
Cyanogen Mod, and I have a HTC G2 (mine is the version sold in the UK about 3 
years old, the android software describes the phone as a T-Mobile myTouch 3G. 
FYI: there are several distinct physical phones that share the name G2). My G2 
has a stock image of 2.2 (build number FRF64) and I've just tried to reproduce 
the reported issues with the current build (r193). Here's a summary:
- Screen rotation - does cause the audio to pause slightly for about a second, 
possibly less. I'm well aware of this issue and plan to address it, when I'll 
also enable the player to continue to the end of a book (similar to the way the 
music player works, as you've mentioned). Technically I need to change the 
implementation of the DaisyPlayer to use a 'service' and need to first 
experiment which is what's holding me back at the moment (as it'll take 
sigifncant time to do).
- Audio continues for a period after the screen turns off due to timeout. This 
seems to depend on the model and/or version of Android installed. Fundamentally 
this should be fixed when I implement the 'service' mentioned above.
- I wasn't able to reproduce your issues related to pressing the power button 
to turn the screen off, or when pressing the home key to multi-task. Also I 
noticed the player seems to behave reasonably well on my G2 when I've used the 
multi-tasking to switch to another application (e.g. SMS messaging).

So a couple of comments in summary:
1. I wonder if the Cyanogen Mod version you're using is indirectly causing some 
of the audio 'stops'? I'll pay more attention to the behaviour of the software 
during future testing and development. And if you happen to have another 
Android phone with a stock build perhaps you'd be willing to test the software 
on that phone to see whether the problems are reproducable on other builds and 
devices?

2. I fully agree it's better for the player to behave more like the music 
player. In fact I'm using the music player as a benchmark for how the 
application should behave. I'll let you know when I think I've addressed the 
issue (by implementing a suitable Android 'Service').

Thanks again for taking the time to report the issues. I appreciate your time 
and help with this project. Further contributions would be welcome :)

Julian Harty

Original comment by julianharty on 29 Dec 2010 at 12:38

GoogleCodeExporter commented 8 years ago
The new version (193) seems to have resolved all the audio woes I have had, 
although I have not tested to extensively yet. 
- pressing home for multi-tasking does not stop the audio and works correctly
- There seem to be no pauses turning the device off 

For your information when I refer to the HTC G2 which is codenamed Vision I am 
refering to the T-Mobile G2 a remarketing of the HTC Desire Z sold in Europe 
now and US exclusively to T-Mobile as the G2. It is not the MyTouch you are 
refering to. 

Original comment by fatsterf...@gmail.com on 31 Dec 2010 at 2:44

GoogleCodeExporter commented 8 years ago
a short test also shows that the audio pauze issues I was having on my HTC Hero 
with CM6.1 are fixed in the 193 build
previously it happened to me when I turned off my screen or the screen timed-out
now everything is working fine!

thanks for this great project!

Original comment by TheW...@gmail.com on 1 Jan 2011 at 7:26

GoogleCodeExporter commented 8 years ago
I'm pleased you're both happy with the latest version. I'll mark this issue as 
fixed. I'm going to continue looking to make further improvements in newer 
versions. 

Original comment by julianharty on 3 Jan 2011 at 6:25