Ejemplo n.º 1
0
 // Constructor
 public NAudioComponent()
 {
     CurrentVolume = 0.5f;
     Playlist      = new AudioPlaylist();
     Playlist.InitPlaylist(_filePath);
     if (AudioFile == null)
     {
         AudioFile = new AudioFileReader(Playlist.Songs[Playlist.Index])
         {
             Volume = CurrentVolume
         };
     }
     if (OutputDevice == null)
     {
         OutputDevice = new WaveOutEvent();
         OutputDevice.PlaybackStopped += OnPlaybackStopped;
         OutputDevice.Init(AudioFile);
     }
 }