OnSongFinishedPlaying() static private method

static private OnSongFinishedPlaying ( object sender, EventArgs args ) : void
sender object
args System.EventArgs
return void
Exemplo n.º 1
0
 private void SongThread()
 {
     while (!exitThread)
     {
         if (!soundStream.Update())
         {
             if (eof)
             {
                 exitThread = true;
             }
             else
             {
                 System.Console.WriteLine(
                     "Stopped playing Song before EOF!" +
                     " Hastily rebooting playback, expect jitteriness!"
                     );
                 soundStream.Play(false);
             }
         }
         // Arbitrarily 1 frame in a 15Hz game -flibit
         Thread.Sleep(67);
     }
     if (PlayCount > 0)
     {
         /* If PlayCount is 0 at this point, then we were stopped by the
          * calling application, and this event shouldn't happen.
          * -flibit
          */
         MediaPlayer.OnSongFinishedPlaying(null, null);
     }
 }
Exemplo n.º 2
0
        private void PlatformInitialize(string fileName)
        {
            Content.ContentManager.BlockContentLoaading = true;

            _audio = new HTMLAudioElement();
            _audio.oncanplaythrough += (e) => Content.ContentManager.BlockContentLoaading = false;
            _audio.src = fileName;
            _audio.load();

            _duration = TimeSpan.FromSeconds(_audio.duration);

            _audio.onended += (e) => MediaPlayer.OnSongFinishedPlaying(null, null);
        }
Exemplo n.º 3
0
 private void SongThread()
 {
     while (!exitThread)
     {
         soundStream.Update();
         if (eof && soundStream.PendingBufferCount == 0)
         {
             soundStream.Stop();
             exitThread = true;
         }
         // Arbitrarily 1 frame in a 15Hz game -flibit
         Thread.Sleep(67);
     }
     if (PlayCount > 0)
     {
         /* If PlayCount is 0 at this point, then we were stopped by the
          * calling application, and this event shouldn't happen.
          * -flibit
          */
         MediaPlayer.OnSongFinishedPlaying(null, null);
     }
 }
Exemplo n.º 4
0
 internal void OnFinishedPlaying()
 {
     MediaPlayer.OnSongFinishedPlaying(null, null);
 }