protected void OnPlayUpdated() { if (this.BassHandle.HasValue) { //Check if channel is within a mixer or not int mixerhandle = BassMix.BASS_Mixer_ChannelGetMixer(this.BassHandle.Value); if (mixerhandle != 0) { //In a mixer, updated the proper status if (this.play) { BassMix.BASS_Mixer_ChannelPlay(this.basshandle.Value); } else { BassMix.BASS_Mixer_ChannelPause(this.basshandle.Value); } } else { //Not in a mixer, just updated standard status if (this.play) { Bass.BASS_ChannelPlay(this.basshandle.Value, false); } else { Bass.BASS_ChannelPause(this.basshandle.Value); } } } }
public void PlaySample(Sample sample) { BassMix.BASS_Mixer_ChannelPause(sample.Channel); Bass.BASS_ChannelSetPosition(sample.Channel, 1); BassMix.BASS_Mixer_ChannelPlay(sample.Channel); }
public void Play() { if (this.PlayState != PlayState.Playing) { this.PlayState = PlayState.Playing; BassMix.BASS_Mixer_ChannelPlay(this.Channel); } }
private void PlayCurrentSample(bool restart) { if (restart == true) { BassMix.BASS_Mixer_ChannelSetPosition(CurrentSample.Channel, 0); } BassMix.BASS_Mixer_ChannelPlay(CurrentSample.Channel); }
/// <summary> /// Loads a WinAmp DSP plug-in and applies it to the mixer /// </summary> /// <param name="location">The file location of the WinAmp DSP DLL</param> public WaPlugin LoadWaPlugin(string location) { if (location == "") { return(null); } if (WaPlugin != null && WaPlugin.Location == location) { return(WaPlugin); } if (!File.Exists(location)) { return(null); } BassMix.BASS_Mixer_ChannelPause(ChannelId); if (!_waDspLoaded) { StartWaDspEngine(); } // DebugHelper.WriteLine("Load WAPlugin " + location); var id = BassWaDsp.BASS_WADSP_Load(location, 10, 10, 300, 300, null); Thread.Sleep(20); var plugin = new WaPlugin { Id = id, Module = 0 }; plugin.Name = BassWaDsp.BASS_WADSP_GetName(plugin.Id); Thread.Sleep(20); plugin.Location = location; BassWaDsp.BASS_WADSP_Start(plugin.Id, plugin.Module, ChannelId); Thread.Sleep(20); BassWaDsp.BASS_WADSP_ChannelSetDSP(plugin.Id, ChannelId, 1); Thread.Sleep(20); WaPlugin = plugin; BassMix.BASS_Mixer_ChannelPlay(ChannelId); Thread.Sleep(20); return(plugin); }
/// <summary> /// Plays an audio stream /// </summary> /// <param name="audioStream">The audio stream.</param> public static void Play(AudioStream audioStream) { if (audioStream == null || !audioStream.IsAudioLoaded()) { return; } //lock (Lock) { // DebugHelper.WriteLine("Play Audio Stream (" + audioStream.Description + ")"); BassMix.BASS_Mixer_ChannelPlay(audioStream.ChannelId); Thread.Sleep(1); } }
public void playDeckB() { Console.WriteLine(_deckB); if (running()) { if (_deckB != 0) { if (_bRunning) { _bRunning = false; BassMix.BASS_Mixer_ChannelPause(_deckB); } else { _bRunning = true; BassMix.BASS_Mixer_ChannelPlay(_deckB); } } } }
private void PlayNextTrack() { lock (listBoxPlaylist) { // get the next track to play if (listBoxPlaylist.Items.Count > 0) { _previousTrack = _currentTrack; _currentTrack = listBoxPlaylist.Items[0] as Track; listBoxPlaylist.Items.RemoveAt(0); // the channel was already added // so for instant playback, we just unpause the channel BassMix.BASS_Mixer_ChannelPlay(_currentTrack.Channel); labelTitle.Text = _currentTrack.Tags.title; labelArtist.Text = _currentTrack.Tags.artist; // get the waveform for that track GetWaveForm(); } } }
public void Resume() { BassMix.BASS_Mixer_ChannelPlay(this.Channel); }