Toggling with incremental delay time
Posted: Thu Nov 24, 2011 10:08 am
This one is a little tricky to describe (and beyond my capabilities to resolve).
My app has buttons, each of which plays a song file (loaded via iTunes document share). Pressing a button causes the relevant song to play, and pressing the same button again pauses the playback, and so on. This part all works OK, but the requirement is to be able to set a time (say 60 seconds) for the song to play before it stops. The user may play/pause the song a few times, and it should stop when the total time of all the playing segments reaches the set time.
You may wonder why on earth anyone would want to do this. It's an app to be used by my occupational therapist son to evaluate the performance of low-functioning disabled children.
Anyway, I can't see how to implement the requirement, so help would be appreciated as usual -- hint hint, Klaus.
Cheers
Don
My app has buttons, each of which plays a song file (loaded via iTunes document share). Pressing a button causes the relevant song to play, and pressing the same button again pauses the playback, and so on. This part all works OK, but the requirement is to be able to set a time (say 60 seconds) for the song to play before it stops. The user may play/pause the song a few times, and it should stop when the total time of all the playing segments reaches the set time.
You may wonder why on earth anyone would want to do this. It's an app to be used by my occupational therapist son to evaluate the performance of low-functioning disabled children.
Anyway, I can't see how to implement the requirement, so help would be appreciated as usual -- hint hint, Klaus.
Cheers
Don