0

I'm currently working on using the setProgressIndicator method to display the progress for audio files. I'm using a timer and the "start of play" message from the roAudioPlayer. I'm wondering if there is a way to set a timer to a particular value. This is my function. The idea is that each index corresponds to a button pressed. When no buttons are pressed the timer will just run normally but if for instance pause/play is selected then the timer should continue from where it last left off. I don't understand how to go about doing that though.

Function keep_track_progress(timer, currentPos, screen As Object, finalPlayList As Object, track_count As Integer, playing As Boolean, index As Integer)

    if finalPlayList[track_count].ContentType = "audio"

        if index = 2 or index = 3 or index = 4 or index = 5
            screen.SetProgressIndicator(currentPos, int(finalPlayList[track_count].Length))  

        else    
            screen.SetProgressIndicator(timer.TotalSeconds(), int(finalPlayList[track_count].Length))
        end if    

    else 
        screen.SetPosterStyle("default")
        print "this should happen like once"

    end if    

End Function 

Also when paused,

currentPos = currentPos + timer.TotalSeconds()

When pressing play,

timer.mark()

"Start of play" has the same code as well...Any suggestions? Also why is it that you can't use the progress indicator with the SetPosterStyle. Is this a known issue?

terratunaz
  • 614
  • 3
  • 9
  • 19

0 Answers0