private void SetLevels(SpeakerPosition speakerPosition) { SpeakerVolume currentVolume = null; switch (speakerPosition) { case SpeakerPosition.FrontLeft: currentVolume = frontLeftVolumeLevels; break; case SpeakerPosition.FrontRight: currentVolume = frontRightVolumeLevels; break; case SpeakerPosition.FrontCenter: currentVolume = frontCenterVolumeLevels; break; case SpeakerPosition.Subwoofer: currentVolume = subwooferVolumeLevels; break; case SpeakerPosition.BackLeft: currentVolume = backLeftVolumeLevels; break; case SpeakerPosition.BackRight: currentVolume = backRightVolumeLevels; break; case SpeakerPosition.SideLeft: currentVolume = sideLeftVolumeLevels; break; case SpeakerPosition.SideRight: currentVolume = sideRightVolumeLevels; break; default: break; } if (currentVolume != null) { float[] volumeLevels = currentVolume.GetVolumeLevels(); CurrentResult = NativeMethods.FMOD_DSP_SetInputLevels(Handle, id, speakerPosition, volumeLevels, volumeLevels.Length); } }
public Speaker(SpeakerPosition position, SpeakerVolume volume) { this.position = position; this.volume = volume; }
public Speaker(SpeakerPosition position, float volume) { this.position = position; this.volume = new SpeakerVolume(volume); }