Ejemplo n.º 1
0
 protected override void PlayNativeMusic()
 {
     musicStream.Rewind();
     for (int index = 0; index < NumberOfBuffers; index++)
     {
         if (!Stream(buffers[index]))
         {
             break;
         }
     }
     openAL.Play(channelHandle);
     playStartTime = DateTime.Now;
 }
Ejemplo n.º 2
0
        public override void Update()
        {
            if (GetState() == ChannelState.Paused)
            {
                return;
            }
            elapsedSeconds += Time.Delta;
            bool isFinished = UpdateBuffersAndCheckFinished();

            if (isFinished)
            {
                Stop();
                return;
            }
            UpdateVideoTexture();
            if (GetState() != ChannelState.Playing)
            {
                openAL.Play(channelHandle);
            }
        }