コード例 #1
0
        public static void AddMixerInput(this MixingSampleProvider mixer, ISampleProvider input,
                                         float volume, float balance, out ISampleProvider rootSample)
        {
            var adjustVolume  = input.AddToAdjustVolume(volume);
            var adjustBalance = adjustVolume.AddToBalanceProvider(balance);

            rootSample = adjustBalance;
            mixer.AddMixerInput(adjustBalance);
        }
コード例 #2
0
        public static void AddMixerInput(this MixingSampleProvider mixer, ISampleProvider input,
                                         SampleControl sampleControl, out ISampleProvider rootSample)
        {
            var adjustVolume  = input.AddToAdjustVolume(sampleControl.Volume);
            var adjustBalance = adjustVolume.AddToBalanceProvider(sampleControl.Balance);

            sampleControl.VolumeChanged  = f => adjustVolume.Volume = f;
            sampleControl.BalanceChanged = f => adjustBalance.Balance = f;

            rootSample = adjustBalance;
            mixer.AddMixerInput(adjustBalance);
        }