Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: GetSoundPosition() [wme 1.8.008]  (Read 3869 times)

0 Members and 1 Guest are viewing this topic.

atm_deev

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 69
  • A. Deev
    • View Profile
    • CreativeDream Studio
GetSoundPosition() [wme 1.8.008]
« on: December 03, 2008, 08:20:24 AM »

[wme 1.8.008]

GetSoundPosition()
this function very strange works... not understand.

Code: [Select]
Game.PlaySound ("sounds\fireplace.ogg");
Game.LOG ("this.GetSoundPosition() = "+ Game.GetSoundPosition());

LOG:
this.GetSoundPosition() = 1974

Other sounds give different values.

p.s.
Or I obtuse or one of two...
« Last Edit: December 03, 2008, 08:25:04 AM by atm_deev »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5677
    • View Profile
    • Dead:Code Site
Re: GetSoundPosition() [wme 1.8.008]
« Reply #1 on: December 03, 2008, 01:47:44 PM »

Yes, this method is buggy (as well as GetMusicPos()). If you need precise position, you can workaround it by remembering the start time:

Code: WME Script
  1. var StartTime = Game.CurrentTime;
  2. Game.PlaySound("blah.ogg")
  3. ...
  4. var PlaybackTime = Game.CurrentTime - StartTime;
  5.  
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

atm_deev

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 69
  • A. Deev
    • View Profile
    • CreativeDream Studio
Re: GetSoundPosition() [wme 1.8.008]
« Reply #2 on: December 04, 2008, 07:32:26 AM »

Thank you. I was forced to do so to do.
Logged

thamesonfire

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
    • View Profile
Re: GetSoundPosition() [wme 1.8.008]
« Reply #3 on: November 17, 2009, 04:44:36 AM »

I was just curious if this issue was ever addressed in a subsequent build. I couldn't find any further information, and it's not in the "will not fix" category. I'm debating engines for a project, but I need pretty precise audio control.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5677
    • View Profile
    • Dead:Code Site
Re: GetSoundPosition() [wme 1.8.008]
« Reply #4 on: November 17, 2009, 08:56:10 AM »

No, no progress on this one.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.2 seconds with 22 queries.