View Full Version : rapid cycling of play and pause

02-08-2010, 12:44 AM
This just started recently (within last 2 weeks) the player starts jumping between play and pause all on its own!
it will cycle between play and pause at about .5 cycles per second and continue to do so until I kill the program
At first I thought it was related to the headset being jostled but I turn off the features that pauses and plays when the jack is inserted and it is still doing it.
Unfortunately it is intermittent (seems to do it about once an hour) If I kill the bookplayer process(Taskiller)
and then restart it problems goes awy for a while. Any one else having this problem?

Kevin Hall Ambling bookplayer personal 1.13 on Droid

02-08-2010, 11:04 AM
The player accepts pause/play commands from a number of different locations including: the icon on the screen, the dpad button, plugging or unplugging the headphone jack, the call control button on head phones, and wireless blue tooth media button signals.

I wonder if one of these might be repeatedly sending a pause/play signal to the player. Is there any possibility that one of these buttons has gotten stuck or is sometimes being pressed accidentally? Could you be receiving an unwanted blue tooth media button signal?

Please check to see if any of these might be happening, and let me know if that explains the rapid cycling.

02-11-2010, 06:43 PM
The rapid pause play syndrome reached new heights today. I turned off the headphone options that let it play pause,
Don't have blue tooth- have the phone closed so the D-pad shouldn't be a problem.
i was listening to the book with no problems and then a phone call came in. That paused the book and I started talking. about 30 seconds later the book started playing/pausing then a few seconds later the music player started to play music after that! I tried to kill all the tasks with taskiller
while keeping the phone conversation going but although ambling stopped the music player kept on re-starting and blaring away!

I finally re-booted phone and things went back to normal except when I plugged the headphone jack in, Ambling started up even though that option is clearly turned off.

I could try completely removing ambling, meridian and music player. Reloading them all and seeing what happens but I am wondering if it might be some other software program causing the problem or even a hardware problem! (I notice a distinct static noise when I move the phone making me wonder if the interior headphone jack is loose)

WWHD? (What would Howard do?)

02-11-2010, 08:59 PM
I checked the player code to see what would happen if it is in the "paused for a phone call mode" and then the player received a play event while the phone call was still in progress. It turns out that it would process the play event and resume playing. So this seems to fit with what you described, and suggests that something is sending a pause/play event to the player. I have made a note that we should look at changing this in the code to ignore a play request if the phone call is still in progress, as I don't expect this is a function many people would intentionally use, and would most often not be the desired behavior.

I am assuming that the phone application was the foreground application when these problems occurred, so that would rule out pause/play events from the screen icon or the D-pad. During the phone call were the headphones plugged into the phone, or not plugged in, or did you plug or unplug them during the call? Did you have Bluetooth radio turned on when the problems occurred (a small icon in the notification bar will show when Bluetooth is enabled). Answers to these questions could help narrow down the source of the pause/play events.

I have not seen an issue with the player starting to play when the headphones are plugged in if this preference option is disabled. I toggle this option back and forth, so I have used it both ways frequently. I like to have it set to auto start when I am using the phone in my car, where I have to plug into the headphone jack to play over the car stereo (I don't have an in-car Bluetooth stereo). I don't like to have it auto start when I am listening on my stereo at home where I use an adapter that lets me plug in both the headphones and power at the same time. If I leave auto start turned on at home and just plug in this adapter to charge the phone while the stereo is turned off, it starts playing the book and will play all the way to the end of the book without my realizing it. Fortunately when this happens the automatic book marking lets me jump right back to where I was at.

One thing to be aware of is that the preference settings do not change immediately when you tap to check or uncheck the box. The setting changes when you hit the back button to exit from the preference screen. If the preference screen is the current screen and you have not yet hit the back button to return to the player screen the new preference option will not have taken affect yet.

You asked what I would do if this was happening to me. If this was happening on my phone I would run a debug build of the application while the phone was connected to a desktop computer with a breakpoint set in the code which processes the pause and play commands. This would let me see which source the request was coming from. Knowing which source the pause/play command is coming from will isolate where to look for the issue and would help in determining if it is a hardware or software issue. It would be possible to build a special version of the player which could display on the screen which source the pause/play events are coming from, but this would take some time to do. Due to the push to get our web site online this month this probably isn't something we could do for you in the short term.

The fact that all the audio applications on your phone are responding to the event must mean that it is one of the standard media events generated by the phone. Your answers to the state of the head phones and Bluetooth radio when this happened during your phone call will help in identifying which media events it might have been.

02-24-2010, 05:51 PM
I apologize for not responding sooner. Since I am an electrical engineer I love trying to debug things but in this case I became convinced that I was seeing a hardware problem. The phone was also exhibiting another strange behavior that several forums have reported. When I would unplug the headphone jack the phone speaker wouldn't work (ie you couldn't make a phone call and hear the other person but they could hear you) I had read on other forums that replacing the phone seemed to eliminate that problem.
So I went down to Verizon and got a new replacement phone (which had intermittent problems where it would self boot) So I brought that back and got another phone. This one has been working for over a week now and is exhibiting none of the strange behaviors I mentioned earlier. I have been slowly re-introducing apps that I had on the original phone and will let you know if any unusual behaviors develop.

Howard thanks for your responses. I am very impressed with the quality of your product and your obvious commitment to making it better.

Kevin Hall

PS if you ever need a great magic/comedy show I'll give you the super Howard discount!

02-24-2010, 06:18 PM
I am very glad to hear that you were able to finally track down the issue to a hardware problem, and that everything is working well after replacing the phone.

09-06-2011, 08:32 PM
Time for an update: I switched to a Droid X about a year ago and at first Ambling was fine unfortunately the problem has come back over the past 8 months and seems to be getting worse and worse. I went out running today and it was almost impossible to listen to my audio book.
The rapid cycling starts up whenever I bump the headphone jack. It occasionally starts up the default audio player so both players(ambling and default) are going at the same time. I removed default and added in Meridian player same problem I removed Meridian and wen to Winamp; same problem. I finally reflashed my phone back to stock android .340 and then completely removed all apps, cleared all app data caches etc. I then upgraded to ginger bread. After all that, I downloaded Ambling again but still have the same problem. Since the program shouldn't even be looking at the state of the headphone jack (Plugged or un-plugged) I don't understand how me bumping the headphone jack should affect it at all.

Another test I did. I killed Ambling with Task Killer, then I started winamp playing the same .mp3. No matter what I did to the headset jack or cable (Pump , twist jostle, disconnect and reconnect) I had no problems wit the files's playback. Then I brought up Ambling. I never hit play Just started the program. As soon as I started messing around with the headphones Ambling turn itself on and started the play/pause cycling.

Conclusions: Ambling seems to be somehow polling the state of the headphone jack even when you specifically tell it not to. The fact that Winamp or Meridian don't have this problem seems to indicate that it is not a hardware problem.

To Howard; Is there anyway to make sure ambling completely ignores what is happening to the head phone jack?
Let me know what you think.

Kevin Hall
"Not just another Super Computer designer turned entertainer"

09-07-2011, 11:06 AM
If you have disabled the "Headset Unplug Pause" and "Headset Connect Play" options in the preferences, the Ambling BookPlayer should not be responding to signals that the headset has been plugged in or unplugged.

Bumping the headphone jack should not cause the the headset plugged or unplugged signal to be generated. Only actually plugging in or unplugging the headphone should generate this signal. If your phone generates this signal when you bump the headphone cord then this is likely a hardware problem with the sensor in the headphone jack not functioning correctly.

I have retested the handling of the headphone jack signals on the devices which we have for testing and on all these devices the player correctly ignores the headphone plug and unplug signals if those options have been disabled in the preferences. As far as I can tell the player is correctly ignoring the headset plug events if they have been disabled in the preferences.

09-25-2011, 05:44 PM
Sorry for the long delay in replying. I have been out of town for a few weeks. I finally solved the problem by downloading and using Mortplayer. It is not as good as Ambling but I don't get the play/pause stuttering problem anymore. I wish I could identify what is causing the problem with Ambling but I don't know what to do. I think when the next update of Android comes out I'll re-try Ambling and see if it works then.

09-28-2011, 09:03 AM
I tried again with the latest Android update .605 The problem is still occurring but a Tech at the Verizon store told me there is supposed to be a fix out mid-october that addresses headphone jack issues. I'll let you know.

Howard, could you check what happened to my last post? It never showed up on this forum thread.

10-04-2011, 09:47 AM
Your post didn't show up immediately because of problems with spammers using the forum. We have had to change the forum so that each post has to be reviewed and approved before it will show up in the forum.