Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Bug in Entity.PauseTheora()  (Read 3026 times)

0 Members and 1 Guest are viewing this topic.

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Bug in Entity.PauseTheora()
« on: October 13, 2010, 10:24:22 PM »

Hi Mnemonic,

I'd like to report a bug in the method PauseTheora, which I am experiencing.

Synopsis: If you have an entity playing looped theora and you call PauseTheora(), the image gets correctly paused. As soon as you call ResumeTheora(), the image jumps by the amount of time elapsed by the pause itself. So it's not as if the theora was paused, just the changes are not rendered for the paused time.

Steps to reproduce:

1. create a sprite entity "TestNode" and let it play looped theora: ent.PlayTheora("scenes\StarMinigame\holovision.ogv",true);
2. Create a region entity and make it cover the theora + attach a script to it.
3. supply in the following code:

Code: WME Script
  1. #include "scripts\base.inc"
  2.  
  3. on "LeftClick"
  4. {
  5.                  var ent = Scene.GetNode("TestNode");
  6.                 
  7.                  if (ent.IsTheoraPaused()) ent.ResumeTheora();
  8.                  else   
  9.                  ent.PauseTheora();
  10. }
  11.  

Thanks a lot. This fix would help me finish one particulary challenging minigame. :)


Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Bug in Entity.PauseTheora()
« Reply #1 on: October 14, 2010, 10:25:22 AM »

The solution, as Mnemonic suggested, is to include empty audio file in the video entity. This way the problem goes away.

Thanks!  ::beer
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: Bug in Entity.PauseTheora()
« Reply #2 on: October 14, 2010, 02:57:26 PM »

Because if there is sound, the video is synchronized with the sound channel. If not, it uses the game timer. Apparently the latter approach doesn't take pause into account, though.
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.257 seconds with 23 queries.