Beispiel #1
0
        protected override void PlayNativeVideo(float volume)
        {
            video.Rewind();
            for (int index = 0; index < NumberOfBuffers; index++)
            {
                if (!Stream(buffers[index]))
                {
                    break;
                }
            }
            video.Play();
            openAL.Play(channelHandle);
            openAL.SetVolume(channelHandle, volume);
            elapsedSeconds = 0.0f;
            Size size = new Size(video.Width, video.Height);

            if (image == null)
            {
                image = ContentLoader.Create <Image>(new ImageCreationData(size)
                {
                    BlendMode = BlendMode.Opaque
                });
            }
            Shader shader = ContentLoader.Create <Shader>(new ShaderCreationData(ShaderFlags.Position2DTextured));

            surface = new Sprite(new Material(shader, image), ScreenSpace.Current.Viewport);
        }
Beispiel #2
0
 protected override void SetPlayingVolume(float value)
 {
     openAL.SetVolume(channelHandle, value);
 }