첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
using System.Threading;

using NAudio.Wave;

string audioFileURL = "http://media.ch9.ms/ch9/2876/fd36ef30-cfd2-4558-8412-3cf7a0852876/AzureWebJobs103.mp3";

using(MediaFoundationReader mediaFoundationReader = new MediaFoundationReader(audioFileURL))
{
    using(WaveOutEvent waveOutEvent = new WaveOutEvent())
    {
        waveOutEvent.Init(mediaFoundationReader);

        waveOutEvent.Play();

        while(waveOutEvent.PlaybackState == PlaybackState.Playing)
        {
            Thread.Sleep(1000);
        }
    }
}
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요