2 Theora Questions - Volume and Aspect Ratio
by Nicolai Dutka · in Torque Game Engine Advanced · 05/26/2010 (1:46 pm) · 2 replies
Volume:
I've got a theora control in my game that lays over the top of all the other gui's. I have it setup to play an intro video to the game when you load the first level for the first time. The thing is, since you are already in the level, I'd like to basically mute all the level audio so the player can only hear the video. Additionally, I'd like to give players the option to adjust the volume level of the video channel specifically. I have our game audio split into several channels already, so that's not an issue for me. The problem is, I don't know how to control the theora's audio volume.
Aspect Ratio:
The next problem comes with aspect ratio. I have a widescreen video playing on a 'standard' screen and getting a lot of clipping. I need a formula to ensure the video is always displayed at maximum resolution regardless of the user's display device AND whether or not they are running in full screen or window mode, all without any clipping (black bars on top/bottom to make it fit a 'standard' screen).
I've got a theora control in my game that lays over the top of all the other gui's. I have it setup to play an intro video to the game when you load the first level for the first time. The thing is, since you are already in the level, I'd like to basically mute all the level audio so the player can only hear the video. Additionally, I'd like to give players the option to adjust the volume level of the video channel specifically. I have our game audio split into several channels already, so that's not an issue for me. The problem is, I don't know how to control the theora's audio volume.
Aspect Ratio:
The next problem comes with aspect ratio. I have a widescreen video playing on a 'standard' screen and getting a lot of clipping. I need a formula to ensure the video is always displayed at maximum resolution regardless of the user's display device AND whether or not they are running in full screen or window mode, all without any clipping (black bars on top/bottom to make it fit a 'standard' screen).
#2
Still need to figure out how to get video playback into its own audio channel...
07/07/2010 (8:03 am)
Got the display fixed:%xV = getWord(videoOverlay.getExtent(),0);
%yV = getWord(videoOverlay.getExtent(),1);
%xC = getWord(Canvas.getExtent(),0);
%yC = getWord(Canvas.getExtent(),1);
%scale = %xC/%xV;
%y = %yV * %scale;
%h = (%yC - %y)/2;
schedule(33,0,alignVideo,%xC,%y,%h);
function alignVideo(%x,%y,%h){
VideoOverlay.setExtent(%x SPC %y);
VideoOverlay.setPosition(0,%h);
}Still need to figure out how to get video playback into its own audio channel...
Torque 3D Owner Nicolai Dutka