我一直在尝试在我的控制台应用程序上显示文本,而当前正在播放声音文件,例如歌词。最好的方法是什么?
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
}
}