private void OnSound3dChanged(Sound3d sound3d) { if (Sound3dChanged != null) { Sound3dChanged(sound3d); } }
private void OnSoundPositionChangedEvent(Sound3d soundPosition) { Sound3dRequest request = (Sound3dRequest)RequestFactory.CreateRequest(MessageType.Sound3d); request.Sound3dProperties = _musicPropertiesForm.SoundSourcePosition; _playerCommunicatorControl.SendRequest(request); }
private void OnSound3dChanged(Sound3d sound3d) { if (_playbackControl.PlaybackState != PlaybackState.Playing) { return; } Sound3dRequest request = new Sound3dRequest(); request.Sound3dProperties = sound3d; _playerCommunicatorControl.SendRequest(request); }
public MusicPropertiesForm() { InitializeComponent(); _soundSourcePosition = new Sound3d(); // Sound position TempoParameterValueControl.UpdateParameter(0.1f, 10, "Tempo", 1, 0.1f); SourceXParameterValueControl.UpdateParameter(-5, 5, "Source X", 5, 0.1f); SourceYParameterValueControl.UpdateParameter(-5, 5, "Source Y", 0, 0.1f); SourceZParameterValueControl.UpdateParameter(-5, 5, "Source Z", 5, 0.1f); TempoParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(TempoValueChangedEvent); SourceXParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(SourceXValueChangedEvent); SourceYParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(SourceYValueChangedEvent); SourceZParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(SourceZValueChangedEvent); }
public SpatializationPropertiesControl() { InitializeComponent(); _sound3dProperties = new Sound3d(); // Sound properties DopplerFactorParameterValueControl.UpdateParameter(0, 10, "Doppler Factor", _sound3dProperties.DoplerFactor, 0.1f); RolloffParameterValueControl.UpdateParameter(0, 10, "Rolloff Factor", _sound3dProperties.RolloffFactor, 0.1f); MinDistanceParameterValueControl.UpdateParameter(0, 100, "Min Distance", _sound3dProperties.MinDistance, 0.01f); MaxDistanceParameterValueControl.UpdateParameter(0, 100, "Min Distance", _sound3dProperties.MaxDistance, 0.01f); DopplerFactorParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(DopplerFactorValueChangedEvent); RolloffParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(RolloffValueChangedEvent); MinDistanceParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(MinDistanceValueChangedEvent); MaxDistanceParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(MaxDistanceValueChangedEvent); // Sound position SourceXParameterValueControl.UpdateParameter(-5, 5, "Source X", 5, 0.1f); SourceYParameterValueControl.UpdateParameter(-5, 5, "Source Y", 0, 0.1f); SourceZParameterValueControl.UpdateParameter(-5, 5, "Source Z", 5, 0.1f); SourceXParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(SourceXValueChangedEvent); SourceYParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(SourceYValueChangedEvent); SourceZParameterValueControl.ValueChangedEvent += new Delegates.ParameterValueActionEventHandler(SourceZValueChangedEvent); }
public Sound3dRequest() : base(MessageType.Sound3d) { _sound3dProperties = new Sound3d(); }