Пример #1
0
        private void play_Click(object sender, EventArgs e)
        {
            if (m_player == null)
            {
                m_player                  = new Player();
                m_player.DonePlaying     += new WaveDoneHandler(player_DonePlaying);
                m_player.PositionChanged += new EventHandler(m_player_PositionChanged);
            }

            m_stream = new FileStream("\\Test.wav", FileMode.Open, FileAccess.ReadWrite);
            Debug.WriteLine("Playing");
            m_player.Play(m_stream);
        }
Пример #2
0
 private void PlayButton_Click(object sender, RoutedEventArgs e)
 {
     player.Play(Directory.GetCurrentDirectory() + @"\" + Constants.AUDIO_FILENAME);
 }