static void Main(string[] args)
        {
            OggPlaylist playlist = new OggPlaylist();

            // Add the guitar sound
            OggFile guitarFile = new OggFile("GuitarSample.ogg");
            OggPlaylistFile guitarPlayList = new OggPlaylistFile(guitarFile, 0);
            playlist.Add(guitarPlayList);

            // Add the boing sound after the guitar
            OggFile boingFile = new OggFile("BoingSample.ogg");
            OggPlaylistFile boingPlayList = new OggPlaylistFile(boingFile, -1);
            playlist.Add(boingPlayList);

            OggPlayerFBN player = new OggPlayerFBN();

            // Keep playing until our playlist is empty
            while(true)
            {
                while (player.PlayerState != OggPlayerStatus.Waiting
                    && player.PlayerState != OggPlayerStatus.Stopped)
                {
                    Thread.Sleep(5);
                }

                if (playlist.GetNextFile() != null)
                {
                    playlist.CurrentFile.File.ResetFile();
                    player.SetCurrentFile(playlist.CurrentFile.File);
                    player.Play();
                }
                else
                {
                    break;
                }
            }
        }
Example #2
0
 private static bool WriteFileM3U(string Filename, OggPlaylist Playlist)
 {
     throw new NotImplementedException();
 }
Example #3
0
 public static bool WriteFile(string Filename, OggPlaylistFormat Format, OggPlaylist Playlist)
 {
     throw new NotImplementedException();
 }
 private static bool WriteFilePLS(string Filename, OggPlaylist Playlist)
 {
     throw new NotImplementedException();
 }
 public static bool WriteFile(string Filename, OggPlaylistFormat Format, OggPlaylist Playlist)
 {
     throw new NotImplementedException();
 }