Game Development Community

Theora player problems

by Helk · in Torque Game Engine · 03/28/2006 (1:35 pm) · 5 replies

Hey all, in 1.4 of torque I have been using the Theora player but after the first movie plays, all subsequent calls to setFile(), even on other instances of guitheoractrl play at less than 1 frame every 15 seconds, almost like not playing at all, and there is no audio to match them. this is a problem because I need to play videos either looping, or one after another, or possibly more than one at the same time...

Has anyone else ran into this problem? or does anyone know of any fixes? I've implimented the one with resetvars() but it hasnt changed this problem. Thanks in advance

#1
03/29/2006 (2:16 pm)
Well I spent a full day attempting to fix this, anything without sound works perfect.. I've tracked the code down to being driven by the audio component.

alGetSourcei(mVorbisBuffer->mSource, AL_BUFFER, &buf);

inside

F64 TheoraTexture::getTheoraTime()

always returns the same value, resulting in mMagicalTrevor.advanceTime(buf); advancing by 0 if

1. stop() is called
2. a video ends
or 3. i call setFile() again.


it is important to note that the second video played, can be a completely different video file, in a completely different guitheoractrl and still suffer from the problem, even if you delete and recreate controls the same thing happens, effectively this means only one call to setfile, on any control can be called for any instance of torque; I have to close it to get it to work again.


lastly, after the second video is played, it is important to note that alGetSourcei(mVorbisBuffer->mSource, AL_BUFFER, &buf); returns the proper buffer id/index, and if its the same video, the value matches that of the first call from the first video being played, however it iwll continue to return the same value afterwards.


if anyone has any ideas I'm all ears, It seems someone else has suffered from this problem from browsing the forums but their calls for help had gone unanswered. Thanks in advance to whomever may reply.
#2
03/29/2006 (2:39 pm)
Things like that unfortunately seem to be caused by a bug in the OpenAL drivers. You can try to download the latest version of OpenAL32.dll from here. (You will want to copy the openal32.dll and wrap_oal.dll from windows/system32 which is where the installer will put them). If that doesn't work, you can try to grab the dll from the Marble Blast demo and use that one instead. Unfortunately, as far as I can tell no one dll works well across all hardware configurations. It is quite a pain.
#3
03/29/2006 (3:01 pm)
I actually tried one from thinktanks demo, and I also tried the most recent from the site today with no avail.... This is pretty alarming if it's the case... any other suggestions?

I guess Ill try the marble blast one too
#4
03/30/2006 (6:29 am)
Yeah I tried them all, same results except the older ones also crash randomly... I've traced it down to the openAL call "alGetSourcei(mVorbisBuffer->mSource, AL_BUFFER, &buf);" in TheoraTexture::getTheoraTime() so it doesnt seem like any of the TheoraPlayer internals are doing this, but as was said, OpenAL.

Can anyone think of a workaround? I'm thinking of seperating the audio and the video and playing them seperately but that's so hacky and there might be syncronization issues (that's the whole point of 'magical trevor')

Any suggestions would be appreciated, Thanks.


P.S. my system configuration is WindowsXP, with onboard sound, "SoundMax integrated digital audio"
#5
03/31/2006 (1:55 pm)
Are you sure it has a valid source ID? It might not be reallocating the audio source as it goes.