public SyncedSamplePlayer()
        {
            Output = new MixerChannel(this);
            _mainPlayer = new AudioPlayer();

            Output.AddInputChannel(_mainPlayer.Output);
        }
        public ModulePlayer(string libraryFolder = "")
        {
            Output = new MixerChannel(this);
            _mainPlayer = new AudioPlayer();

            _libraryFolder = libraryFolder;

            Output.AddInputChannel(_mainPlayer.Output);
        }
        /// <summary>
        ///     Initialises the raw loop mixer.
        /// </summary>
        private void InitialiseRawLoopMixer()
        {
            DebugHelper.WriteLine("InitialiseRawLoopMixer");

            _rawLoopMixer = new MixerChannel(this, MixerChannelOutputType.MultipleOutputs);
            _rawLoopOutputSplitter = new OutputSplitter(_rawLoopMixer, _speakerOutput, _monitorOutput);

            DebugHelper.WriteLine("END InitialiseRawLoopMixer");
        }
        public OutputSplitter(MixerChannel inputChannel, Channel speakerChannel,
            Channel monitorChannel)
        {
            SpeakerMixerChannel = new MixerChannel(inputChannel.BpmProvider);
            SpeakerMixerChannel.AddInputChannel(inputChannel);
            speakerChannel.AddInputChannel(SpeakerMixerChannel);

            MonitorMixerChannel = new MixerChannel(inputChannel.BpmProvider);
            MonitorMixerChannel.AddInputChannel(inputChannel);
            monitorChannel.AddInputChannel(MonitorMixerChannel);

            SoundOutput = SoundOutput.Speakers;
        }
Esempio n. 5
0
        public OutputSplitter(MixerChannel inputChannel, Channel speakerChannel,
                              Channel monitorChannel)
        {
            SpeakerMixerChannel = new MixerChannel(inputChannel.BpmProvider);
            SpeakerMixerChannel.AddInputChannel(inputChannel);
            speakerChannel.AddInputChannel(SpeakerMixerChannel);

            MonitorMixerChannel = new MixerChannel(inputChannel.BpmProvider);
            MonitorMixerChannel.AddInputChannel(inputChannel);
            monitorChannel.AddInputChannel(MonitorMixerChannel);

            SoundOutput = SoundOutput.Speakers;
        }
Esempio n. 6
0
 public void AddInputChannel(MixerChannel inputChannel)
 {
     switch (inputChannel.OutputType)
     {
         case MixerChannelOutputType.SingleOutput:
             ChannelHelper.AddChannelToDecoderMixer(ChannelId, inputChannel.ChannelId);
             break;
         case MixerChannelOutputType.MultipleOutputs:
             var splitOutputChannel = ChannelHelper.SplitDecoderMixer(inputChannel.ChannelId);
             ChannelHelper.AddChannelToDecoderMixer(ChannelId, splitOutputChannel);
             break;
         default:
             throw new ArgumentOutOfRangeException();
     }
 }
Esempio n. 7
0
        public void AddInputChannel(MixerChannel inputChannel)
        {
            switch (inputChannel.OutputType)
            {
            case MixerChannelOutputType.SingleOutput:
                ChannelHelper.AddChannelToMixer(ChannelId, inputChannel.ChannelId);
                break;

            case MixerChannelOutputType.MultipleOutputs:
                var splitOutputChannel = ChannelHelper.SplitDecoderMixer(inputChannel.ChannelId);
                ChannelHelper.AddChannelToMixer(ChannelId, splitOutputChannel);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
 public AudioPlayer(IBmpProvider bpmProvider = null)
 {
     Output = new MixerChannel(bpmProvider);
     _streamSections = new List<AudioStreamSection>();
 }
        /// <summary>
        ///     Initialises the track mixer.
        /// </summary>
        private void InitialiseTrackMixer()
        {
            DebugHelper.WriteLine("InitialiseTrackMixer");

            // create mixer channel
            _trackMixer = new MixerChannel(this, MixerChannelOutputType.MultipleOutputs);
            _trackOutputSplitter = new OutputSplitter(_trackMixer, _speakerOutput, _monitorOutput);

            // create clone of mixer channel and mute it
            _trackSendMixer = new MixerChannel(this);
            _trackSendMixer.AddInputChannel(_trackMixer);
            _trackSendMixer.SetVolume(0);

            // add the track FX to the track FX mixer,
            _trackSendFxMixer = new MixerChannel(this);
            _trackSendFxMixer.AddInputChannel(_trackSendMixer);
            _trackSendFxMixer.CutBass();

            // then that to the main mixer
            _speakerOutput.AddInputChannel(_trackSendFxMixer);

            DebugHelper.WriteLine("END InitialiseTrackMixer");
        }