0

I have been trying to display text on my Console Application while a sound file is currently playing, lyrics as an example. How is the best way to do it?

struct Music 
{
        public
            void PlaySong() {
            System.Media.SoundPlayer player = new System.Media.SoundPlayer();
            player.SoundLocation = @"C:\Users\MyPC\Music\MoreMusic\songsample.wav";
            player.Load();
            player.PlaySync();
        }
}

class Program
{


        static public void Main(string[] args)
        {
            Music music;
            do
            {
                //Display Lyrics
            } while (true); //as the song progresses


         }

}
Mat
  • 202,337
  • 40
  • 393
  • 406

1 Answers1

0

Replace the PlaySync with Play

    struct Music 
{
        public
            void PlaySong() {
            System.Media.SoundPlayer player = new System.Media.SoundPlayer();
            player.SoundLocation = @"C:\Users\MyPC\Music\MoreMusic\songsample.wav";
            player.Load();
            player.Play();
        }
}