Wintermute Engine Forum

Wintermute Engine => Bug reports => Topic started by: metamorphium on October 13, 2010, 10:24:22 PM

Title: Bug in Entity.PauseTheora()
Post by: metamorphium 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. :)


Title: Re: Bug in Entity.PauseTheora()
Post by: metamorphium 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
Title: Re: Bug in Entity.PauseTheora()
Post by: Mnemonic 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.