コード例 #1
0
        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);
            }
        }
コード例 #2
0
ファイル: Speaker.cs プロジェクト: bossaia/alexandrialibrary
		public Speaker(SpeakerPosition position, SpeakerVolume volume)
		{
			this.position = position;
			this.volume = volume;
		}
コード例 #3
0
ファイル: Speaker.cs プロジェクト: bossaia/alexandrialibrary
		public Speaker(SpeakerPosition position, float volume)
		{
			this.position = position;
			this.volume = new SpeakerVolume(volume);
		}
コード例 #4
0
 public Speaker(SpeakerPosition position, SpeakerVolume volume)
 {
     this.position = position;
     this.volume   = volume;
 }
コード例 #5
0
 public Speaker(SpeakerPosition position, float volume)
 {
     this.position = position;
     this.volume   = new SpeakerVolume(volume);
 }