Exemplo n.º 1
0
		public void Init(frmCUEPlayer parent, Deck nextDeck)
		{
			MdiParent = parent;
			mixer = (parent as frmCUEPlayer).Mixer;
			writer = new MixingWriter(mixer, iSource);
			this.nextDeck = nextDeck;
			Show();
		}
Exemplo n.º 2
0
		public void Init(frmCUEPlayer parent)
		{
			_config = parent.Config;
			MdiParent = parent;
			Show();
			fileSystemTreeView1.IconManager = parent.IconMgr;
			fileSystemTreeView1.SelectedFolder = ExtraSpecialFolder.MyMusic;
		}
Exemplo n.º 3
0
 public void Init(frmCUEPlayer parent, Deck nextDeck)
 {
     MdiParent     = parent;
     mixer         = (parent as frmCUEPlayer).Mixer;
     writer        = new MixingWriter(mixer, iSource);
     this.nextDeck = nextDeck;
     Show();
 }
Exemplo n.º 4
0
 public void Init(frmCUEPlayer parent)
 {
     _config   = parent.Config;
     MdiParent = parent;
     Show();
     fileSystemTreeView1.IconManager    = parent.IconMgr;
     fileSystemTreeView1.SelectedFolder = ExtraSpecialFolder.MyMusic;
 }
Exemplo n.º 5
0
        public void Init(frmCUEPlayer parent)
        {
            MdiParent = parent;
            Show();
            _mixer                 = parent.Mixer;
            buffer                 = new AudioPipe(_mixer.PCM, _mixer.PCM.SampleRate * 10); // 10 secs
            _mixer.AudioRead      += new EventHandler <CUETools.DSP.Mixer.AudioReadEventArgs>(Mixer_AudioRead);
            parent.updateMetadata += new EventHandler <UpdateMetadataEvent>(parent_updateMetadata);

            flushThread              = new Thread(FlushThread);
            flushThread.Priority     = ThreadPriority.AboveNormal;
            flushThread.IsBackground = true;
            flushThread.Name         = "Icecast";
            flushThread.Start();
        }
Exemplo n.º 6
0
		public void Init(frmCUEPlayer parent)
		{
			MdiParent = parent;
			Show();
			_mixer = parent.Mixer;
			buffer = new AudioPipe(_mixer.PCM, _mixer.PCM.SampleRate * 10); // 10 secs
			_mixer.AudioRead += new EventHandler<CUETools.DSP.Mixer.AudioReadEventArgs>(Mixer_AudioRead);
			parent.updateMetadata += new EventHandler<UpdateMetadataEvent>(parent_updateMetadata);

			flushThread = new Thread(FlushThread);
			flushThread.Priority = ThreadPriority.AboveNormal;
			flushThread.IsBackground = true;
			flushThread.Name = "Icecast";
			flushThread.Start();
		}
Exemplo n.º 7
0
        public void Init(frmCUEPlayer parent)
        {
            MdiParent = parent;
            _device   = WasapiOut.GetDefaultAudioEndpoint();
            _device.AudioEndpointVolume.OnVolumeNotification += new AudioEndpointVolumeNotificationDelegate(AudioEndpointVolume_OnVolumeNotification);
            mediaSliderVolume.Value = (int)(_device.AudioEndpointVolume.MasterVolumeLevelScalar * 100);
            //mediaSliderVolume.Maximum = (int)(_device.AudioEndpointVolume.VolumeRange);
            Show();

            int delay = 100;

            try
            {
                _player = new WasapiOut(_device, NAudio.CoreAudioApi.AudioClientShareMode.Shared, true, delay, new AudioPCMConfig(32, 2, 44100));
            }
            catch
            {
                _player = null;
            }
            if (_player == null)
            {
                try
                {
                    _player = new WasapiOut(_device, NAudio.CoreAudioApi.AudioClientShareMode.Shared, true, delay, new AudioPCMConfig(32, 2, 48000));
                    SOXResamplerConfig cfg;
                    cfg.Quality       = SOXResamplerQuality.Very;
                    cfg.Phase         = 50;
                    cfg.AllowAliasing = false;
                    cfg.Bandwidth     = 0;
                    _resampler        = new SOXResampler(parent.Mixer.PCM, _player.Settings.PCM, cfg);
                    resampled         = new AudioBuffer(_player.Settings.PCM, parent.Mixer.BufferSize * 2 * parent.Mixer.PCM.SampleRate / _player.Settings.PCM.SampleRate);
                }
                catch (Exception ex)
                {
                    _player = null;
                    Trace.WriteLine(ex.Message);
                }
            }
            parent.Mixer.AudioRead += new EventHandler <AudioReadEventArgs>(Mixer_AudioRead);
            if (_player != null)
            {
                _player.Play();
            }
        }
Exemplo n.º 8
0
 public void Init(frmCUEPlayer parent)
 {
     _config   = parent.Config;
     dataSet   = parent.DataSet;
     MdiParent = parent;
     Show();
     _icon_mgr = parent.IconMgr;
     listViewTracks.SmallImageList = _icon_mgr.ImageList;
     foreach (DataSet1.PlaylistRow row in dataSet.Playlist)
     {
         try
         {
             listViewTracks.Items.Add(ToItem(row));
         }
         catch (Exception ex)
         {
             Trace.WriteLine(ex.Message);
         }
     }
 }
Exemplo n.º 9
0
		public void Init(frmCUEPlayer parent)
		{
			_config = parent.Config;
			dataSet = parent.DataSet;
			MdiParent = parent;
			Show();
			_icon_mgr = parent.IconMgr;
			listViewTracks.SmallImageList = _icon_mgr.ImageList;
			foreach (DataSet1.PlaylistRow row in dataSet.Playlist)
			{
				try
				{
					listViewTracks.Items.Add(ToItem(row));
				}
				catch (Exception ex)
				{
					Trace.WriteLine(ex.Message);
				}
			}
		}
Exemplo n.º 10
0
		public void Init(frmCUEPlayer parent)
		{
			MdiParent = parent;
			_device = WasapiOut.GetDefaultAudioEndpoint();
			_device.AudioEndpointVolume.OnVolumeNotification += new AudioEndpointVolumeNotificationDelegate(AudioEndpointVolume_OnVolumeNotification);
			mediaSliderVolume.Value = (int)(_device.AudioEndpointVolume.MasterVolumeLevelScalar * 100);
			//mediaSliderVolume.Maximum = (int)(_device.AudioEndpointVolume.VolumeRange);
			Show();

			int delay = 100;
			try
			{
				_player = new WasapiOut(_device, NAudio.CoreAudioApi.AudioClientShareMode.Shared, true, delay, new AudioPCMConfig(32, 2, 44100));
			}
			catch
			{
				_player = null;
			}
			if (_player == null)
			{
				try
				{
					_player = new WasapiOut(_device, NAudio.CoreAudioApi.AudioClientShareMode.Shared, true, delay, new AudioPCMConfig(32, 2, 48000));
					SOXResamplerConfig cfg;
					cfg.Quality = SOXResamplerQuality.Very;
					cfg.Phase = 50;
					cfg.AllowAliasing = false;
					cfg.Bandwidth = 0;
					_resampler = new SOXResampler(parent.Mixer.PCM, _player.PCM, cfg);
					resampled = new AudioBuffer(_player.PCM, parent.Mixer.BufferSize * 2 * parent.Mixer.PCM.SampleRate / _player.PCM.SampleRate);
				}
				catch (Exception ex)
				{
					_player = null;
					Trace.WriteLine(ex.Message);
				}
			}
			parent.Mixer.AudioRead += new EventHandler<AudioReadEventArgs>(Mixer_AudioRead);
			if (_player != null)
				_player.Play();
		}