InDashPC.org Forum Index InDashPC.org
In Dash Car PC forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

player.setStartTime()

 
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software -> PyMedia Tutorials
View previous topic :: View next topic  
Author Message
Gamur
Newbie


Joined: 12 Jul 2006
Posts: 7

PostPosted: Fri Jul 14, 2006 12:34 pm    Post subject: player.setStartTime() Reply with quote

I posted this as a comment in another thread, but it might get noticed quicker in a new topic. I am finding that trying to set the start time with player.setStartTime() doesn't result in any change, i.e. the player still starts from the beginning of the wav file regardless. Has anyone else experienced this, and if so, anyone have a fix?
Thanks,
Back to top
View user's profile Send private message
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Fri Jul 14, 2006 1:36 pm    Post subject: Reply with quote

I'll take a look. It should work just fine though...
Back to top
View user's profile Send private message
Gamur
Newbie


Joined: 12 Jul 2006
Posts: 7

PostPosted: Fri Jul 14, 2006 5:01 pm    Post subject: setStartTime() Reply with quote

Thanks for taking a look. A sample of what I am trying to do is below. Regardless of how I set player.setStartTime() it just starts at the beginning.
################

player = pymedia.Player()

player.setStartTime(5) # start five seconds in
player.start()

player.startPlayback('sample.wav')
while player.isPlaying():
time.sleep(0.5)
Back to top
View user's profile Send private message
Gamur
Newbie


Joined: 12 Jul 2006
Posts: 7

PostPosted: Sat Jul 15, 2006 7:09 am    Post subject: setStartTime() Reply with quote

One thing I've noticed is that according to getPosition(), the player is beginning at the desired start location. It's just not playing from there. For example, if I do player.setStartPosition(4) and then do this:

while player.isPlaying():
print player.getPosition()

It begins printing at 4, but it is playing from the beginning.

Gabe
Back to top
View user's profile Send private message
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Sun Jul 16, 2006 9:33 pm    Post subject: Reply with quote

I just fixed that in CVS try now
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software -> PyMedia Tutorials All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group