Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 8:23 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Sound---GetPosition and Set Position--strange problem
PostPosted: November 7th, 2007, 11:01 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I open an MP3 sound file in script (not in a video). Play it for a while, then use Get Position and Stop. to save the stop position to a variable...then simply use SetPosition(variable) and Play to restart at the saved position.

I find that the first time it works OK, but then on subsequent gets and sets, it doesn't work, because it creates an offset in the GetPosition (difficult to explain), It seems to add the last GetPosition to the place where it starts.
I can demonstrate by having a ticker continuously monitor the file position by adding a GetPosition to the ticker. I have a 'calibrated' MP3 which is roughly counting in seconds. If I start the file and do nothing, the file and ticker display are synchronised, but if I do a few GetPosition and Set Position, the ticker and file get completely out of sync.
I have used this before in a talking book, and I am certain it worked OK then???, but now when I open that publication, it shows the same problem.
I tried it in V5.5...still the same.
I have reset the registry re-installed etc. I suffered a corrupt page in the publication, but I have completely created a new publication.

I would rather if some kind soul could do a very quick test when they have time ..rather than me posting an imp to try. I am convinced it's either something stupid I'm doing ....perhaps misunderstanding the function of the scripts...or a problem with my setup or imp??

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: November 7th, 2007, 11:33 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
This strangeness is accumulative! And your not mad - the program is. I had this very problem last week. In the end I had to carefully monitor a debug window that was tracking the GetPosition to ensure I wasn't going crazy.

Two things that might help you;

1. Use the video object for you MP3 and pause and play rather than stop, this way, you don't have to use the scripting at all.

2. Try the seek command rather than SetPosition.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 7th, 2007, 11:48 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Thanks Mack!!!...this really was doing my head in!!! I could see what was happening, but couldn't find a cure- I even tried to compensate for the accumulated error, but my first attempts didn't work, but now I know it's not something stupid I'm doing, I might spend some more time on it. There is a reason why I want to use the sound objects rather than video.

I'll look at the seek commands.

I am convinced the talking book I created about a year ago functioned correctly at the time, but perhaps, I just missed the problem then???

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 30 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group