To Daniel

Makes much sense

so it is the length of the pause

timer   = new Timer();
timer.schedule( cycle1 ,  0 , 200);
timer.schedule( cycle2 ,100 , 200);

100 / 200  =  1/2  thus  2x slower

timer   = new Timer();
timer.schedule( cycle1 ,  0 , 200);
timer.schedule( cycle2 , 50 , 200);

50 / 200  =  1/4  thus  4x slower

and so

timer   = new Timer();
timer.schedule( cycle1 ,  0 , 200);
timer.schedule( cycle2 , 20 , 200);

20 / 200  =  1/10  thus  10x slower

It is not the fact that it plays   BUT that it is on pause for longer

Thank You


On Jun 30, 2011, at 12:14 PM, Daniel Drozdzewski wrote:

> On Thu, Jun 30, 2011 at 4:44 PM, New Developer <secur...@isscp.com> wrote:
>> To Daniel
>> 
>> Okay you obviously have a much better grasp than I do
>> 
>> let me ask if we use your initial two cycle method
>> what about upping to 3 or 4 cycles ?
>> 
>> then looking at your
>> 
>>> 1 is play time,    0 is pause time.
>> 
>>> <--1st cycle -><- 2nd cycle->        duration of thee cycle remains constant
>>> 
>>> 111111111111111111111111...     normal speed
>>> 111111000000111111000000...     2x slow down
>>> 111000000000111000000000...     3x slow down
>>> 110000000000110000000000...     5x slow down
>>> 100000000000100000000000...     10x slow down
>>> 000000000000000000000000...     full stop
>> 
> 
> 
> Okay, this is becoming a bit off topic for the group now...
> Also I have wrongly calculated slowdowns in my example above.
> 
> The slowdown factor is calculated (time of whole cycle / time of
> play), so from my examples:
> 
> 111111000000111111000000...     12 / 6 = 2x slow down
> 111000000000111000000000...     12 / 3 = 4x slow down   (I wrote 3)
> 110000000000110000000000...     12 / 2 = 6x slow down   (I wrote 5)
> 100000000000100000000000...     12 / 1 = 12x slow down (I wrote 10).
> 
> yours:
> 1111100000      1111100000      1111100000      1111100000    10/5 = 2x 
> slowdown
> 1110000000      1110000000      1110000000      1110000000    10/3 =
> 3.33 x slowdown
> 
> the number of segments is for illustrating purposes only... One
> segment is a unit of time, but how big is the unit is irrelevant for
> illustrating the ratio change.
> 
> Try to imagine this play/pause periods rather than get bogged down
> with the number of 1s or 0s. What I was trying to say is that you need
> to look at ratios.
> 
> If this is unclear, think of change from 0 to 1 as call of play(),
> from 1 to 0 as call of pause() and when there is no change (from 1 to
> 1 or from 0 to 0) there is no change... the time is passing by...
> 
> 0, 200 and 100, 200 where only parameters for Timer, scheduling. Wait
> 0msec and kick off the task and then repeat it every 200msec for the
> first task and wait 100msec, kick off the task and then repeat it
> every 200msec.
> 
> 
> That gave you:
> 
> TIME 000, task1: play()   (
> TIME 100, task2: pause()
> TIME 200, task1: play()
> TIME 300, task2: pause()
> ...
> 
> The cycle is 200msec and every 100msec it flips, which means that the
> slowdown is 2.
> 
> Swap the initial 100 for say 50, and don't touch 200 (cycle length)
> and you will get:
> 
> TIME 000, task1: play()   (
> TIME 050, task2: pause()
> TIME 200, task1: play()
> TIME 250, task2: pause()
> ...
> 
> The cycle is still 200msec, but after 1/4th of it, it pauses the movie
> for the rest of the cycle, so the slowdown is 200/50 = 4.
> 
> I hope you get it now, what is left is to do the coding. Obviously it
> will depend on the method you use (Timer vs. Handler) and how you pass
> those values to influence the play time and pause time.
> 
> Daniel
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to