Music skips, but only when started by CardioTrainer

6 views
Skip to first unread message

Steinar H. Gunderson

unread,
Aug 24, 2010, 6:28:25 PM8/24/10
to cardiotra...@googlegroups.com
Hi,

I've noticed that quite often during my training, the music skips as if there
were not enough CPU available, even though the Nexus One has 1GHz and
probably custom MP3 decoding circuits to boot. I finally filed a bug with
Android (believing it was an issue with the music player), and it was
eventually tracked down to the fact that somehow, the music service gets
started with too low priority. It's really easy to make it skip; just press
the home button, for instance, or lock and unlock the phone.

Seemingly, however, this happens _only_ when CT starts the music; if I fire
up the Music application myself and start playing, the priority is correct,
and I'm unable to provoke skipping at all. According to the Android
developers, CT is using an undocumented internal API to start the music,
and thus they're not willing to spend cycles debugging the issue. (Also, that
API will seemingly go away in the near future, as I've understood it.)

Does anybody have any ninja tricks, short of not using the music integration?

/* Steinar */
--
Homepage: http://www.sesse.net/

WorkSmart Labs Support

unread,
Aug 26, 2010, 10:40:47 AM8/26/10
to cardiotra...@googlegroups.com
Hi Steinar — Are you using any task killer applications by chance? We've seen that the music can be shutdown since it's running the background during workouts. If you are using one of these task killers, make sure you add the Android Music application to the exception list so it isn't turned off during a workout.  Let me know if that helps.

Charlie
--
Did we help? To rate your customer service experience, visit http://bit.ly/9VwJYd
For more answer to frequently asked questions, visit http://bit.ly/ct-faq
To join our user group, visit http://bit.ly/ct-users



--
You received this message because you are subscribed to the Google Groups "CardioTrainer Users" group.
To post to this group, send email to cardiotra...@googlegroups.com.
To unsubscribe from this group, send email to cardiotrainer-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cardiotrainer-users?hl=en.


Steinar H. Gunderson

unread,
Aug 26, 2010, 10:47:58 AM8/26/10
to cardiotra...@googlegroups.com
On Thu, Aug 26, 2010 at 10:40:47AM -0400, WorkSmart Labs Support wrote:
> Hi Steinar — Are you using any task killer applications by chance?

No. My installation is probably cleaner than most, in fact. :-)

> We've seen that the music can be shutdown since it's running the background
> during workouts. If you are using one of these task killers, make sure you
> add the Android Music application to the exception list so it isn't turned
> off during a workout. Let me know if that helps.

It's not being shutdown. It's just running at the wrong thread priority
(background instead of foreground).

Artem Petakov

unread,
Aug 26, 2010, 10:50:42 AM8/26/10
to cardiotra...@googlegroups.com
Hi Steinar,

What you say makes a lot of sense -- there is no way for us to run the Music in the foreground. There can only be one application in the foreground and that's CardioTrainer. If you want to, you could switch to the Music application and that would put it in the foreground. But there is no way for us to influence these priorities -- it is surprising that the music playing needs so much resources. I'd love to figure out a solution to this, if you have any ideas.

Thanks,
Artem

Steinar H. Gunderson

unread,
Sep 17, 2010, 1:21:19 PM9/17/10
to cardiotra...@googlegroups.com
On Thu, Aug 26, 2010 at 10:50:42AM -0400, Artem Petakov wrote:
> What you say makes a lot of sense -- there is no way for us to run the Music
> in the foreground. There can only be one application in the foreground and
> that's CardioTrainer. If you want to, you could switch to the Music
> application and that would put it in the foreground. But there is no way for
> us to influence these priorities -- it is surprising that the music playing
> needs so much resources. I'd love to figure out a solution to this, if you
> have any ideas.

Actually this is a misconception; there's a difference between _running in
the foreground_ and _having foreground priority_. AFAIK, anything running in
the foreground will automatically get foreground priority, but a process can
also have foreground priority while it is in the background. The prime
example is the music service; if you start the Music application and then go
to some other app, the music still plays at foreground priority, and does not
skip.

I've talked to the right Android people, and as far as I've understood there
will be a fix/workaround for this issue in Gingerbread, but of course it
doesn't help older ones. It only affects the first track, though, so perhaps
I should just have a 1ms silence track first of all =)

Reply all
Reply to author
Forward
0 new messages