public SoftwareFormat(int sampleRate, SpeakerMode speakerMode, int numRawSpeakers)
     : this()
 {
     SampleRate = sampleRate;
     SpeakerMode = speakerMode;
     NumRawSpeakers = numRawSpeakers;
 }
		Result IFModSystem.SetSpeakerMode(SpeakerMode speakerMode)
		{
			CheckMemberOnlyCall();
			
			var result = NativeFModSystem.SetSpeakerMode(Self, speakerMode);
			
			return result;
		}
Beispiel #3
0
		/// <summary>
		/// Constructor for recording drivers
		/// </summary>
		/// <param name="systemHandle"></param>
		/// <param name="id"></param>
		/// <param name="name"></param>
		public Driver(IntPtr systemHandle, int id, string name)
		{
			this.systemHandle = systemHandle;
			this.id = id;
			this.name = name;
			this.capabilities = Capabilities.None;
			this.speakerMode = SpeakerMode.Stereo;
		}
		private void InitializeSurround4Point1()
		{
			mode = SpeakerMode.Surround4Point1;
			FrontLeftVolume = volumeLevels[0];
			FrontRightVolume = volumeLevels[1];
			SubwooferVolume = volumeLevels[2];
			BackLeftVolume = volumeLevels[3];
			BackRightVolume = volumeLevels[4];
		}		
Beispiel #5
0
		public Driver(IntPtr systemHandle, int id, string name, Capabilities capabilities, int minimumFrequency, int maximumFrequency, SpeakerMode speakerMode)
		{
			this.systemHandle = systemHandle;
			this.id = id;
			this.name = name;
			this.capabilities = capabilities;
			this.minimumFrequency = minimumFrequency;
			this.maximumFrequency = maximumFrequency;
			this.speakerMode = speakerMode;
		}
Beispiel #6
0
 public Driver(IntPtr systemHandle, int id, string name, Capabilities capabilities, int minimumFrequency, int maximumFrequency, SpeakerMode speakerMode)
 {
     this.systemHandle     = systemHandle;
     this.id               = id;
     this.name             = name;
     this.capabilities     = capabilities;
     this.minimumFrequency = minimumFrequency;
     this.maximumFrequency = maximumFrequency;
     this.speakerMode      = speakerMode;
 }
 public DriverInfo(int id, string name, Guid guid, int systemRate, SpeakerMode speakerMode, int speakerModeChannels, DriverState driverState)
     : this()
 {
     Id                  = id;
     Name                = name;
     Guid                = guid;
     SystemRate          = systemRate;
     SpeakerMode         = speakerMode;
     SpeakerModeChannels = speakerModeChannels;
     DriverState         = driverState;
 }
Beispiel #8
0
 public DriverInfo(int id, string name, Guid guid, int systemRate, SpeakerMode speakerMode, int speakerModeChannels, DriverState driverState)
     : this()
 {
     Id = id;
     Name = name;
     Guid = guid;
     SystemRate = systemRate;
     SpeakerMode = speakerMode;
     SpeakerModeChannels = speakerModeChannels;
     DriverState = driverState;
 }
Beispiel #9
0
 private void InitializeSurround7Point1()
 {
     mode              = SpeakerMode.Surround7Point1;
     FrontLeftVolume   = volumeLevels[0];
     FrontRightVolume  = volumeLevels[1];
     FrontCenterVolume = volumeLevels[2];
     SubwooferVolume   = volumeLevels[3];
     BackLeftVolume    = volumeLevels[4];
     BackRightVolume   = volumeLevels[5];
     SideLeftVolume    = volumeLevels[6];
     SideRightVolume   = volumeLevels[7];
 }
Beispiel #10
0
        private void GetDrivers()
        {
            // Some of these methods cannot be called after the SoundSystem is initialized
            // so it is easier to just skip everything and set currentResult accordingly
            if (!system.IsInitialized)
            {
                NativeMethods.FMOD_System_GetNumDrivers(system.Handle, ref totalCount);

                StringBuilder name = null;
                Capabilities  capabilities;
                int           minimumFrequency = 0;
                int           maximumFrequency = 0;
                SpeakerMode   speakerMode;
                Driver        driver;

                drivers.Clear();
                drivers.Capacity = totalCount + 1;

                for (int i = 0; i < totalCount; i++)
                {
                    capabilities = new Capabilities();
                    speakerMode  = new SpeakerMode();

                    name          = new StringBuilder(100);
                    currentResult = NativeMethods.FMOD_System_GetDriverName(system.Handle, i, name, name.Capacity);
                    currentResult = NativeMethods.FMOD_System_GetDriverCaps(system.Handle, i, ref capabilities, ref minimumFrequency, ref maximumFrequency, ref speakerMode);

                    driver = new Driver(system.Handle, i, name.ToString(), capabilities, minimumFrequency, maximumFrequency, speakerMode);
                    drivers.Add(driver);
                }
            }
            else
            {
                currentResult = Result.InitializedError;
            }
        }
Beispiel #11
0
        static bool IsSelectionAvailable(SpeakerMode mode, int selection)
        {
            if ((uint)selection > 9u)
            {
                throw new ArgumentOutOfRangeException(nameof(selection));
            }

            if (mode == SpeakerMode.Mono || mode == SpeakerMode.Stereo)
            {
                return(!(selection >= 2 && selection <= 6) && selection != 9);
            }

            if (mode == SpeakerMode.Quad)
            {
                return(selection != 2 && selection != 5 && selection != 6 && selection != 9);
            }

            if (mode == SpeakerMode.Surround || mode == SpeakerMode._5Point1)
            {
                return(selection != 5 && selection != 6);
            }

            return(true);
        }
		internal static extern Result FMOD_System_GetSpeakerMode(IntPtr systemHandle, ref SpeakerMode speakerMode);
Beispiel #13
0
 public void GetOutputChannelFormat(ChannelMask inmask, int inchannels, SpeakerMode inspeakermode, out ChannelMask outmask, out int outchannels, out SpeakerMode outspeakermode)
 {
     library.DSP_GetOutputChannelFormat(Handle, inmask, inchannels, inspeakermode, out outmask, out outchannels, out outspeakermode).CheckResult();
 }
        private void GetOutputDriverCapabilities(int id, out Capabilities caps, out int minfrequency, out int maxfrequency, out SpeakerMode controlpanelspeakermode)
        {
            Code returnCode = GetDriverCaps(DangerousGetHandle(), id, out caps, out minfrequency, out maxfrequency, out controlpanelspeakermode);

            Errors.ThrowError(returnCode);
        }
Beispiel #15
0
 private void InitializeStereo()
 {
     mode             = SpeakerMode.Stereo;
     FrontLeftVolume  = volumeLevels[0];
     FrontRightVolume = volumeLevels[1];
 }
Beispiel #16
0
 public void SetChannelFormat(ChannelMask channelmask, int numchannels, SpeakerMode source_speakermode)
 {
     library.DSP_SetChannelFormat(Handle, channelmask, numchannels, source_speakermode).CheckResult();
 }
		public static extern Result SetSpeakerMode(
			Handle self, 
			SpeakerMode speakerMode);
Beispiel #18
0
 private static Result _myShouldIProcess(DspState *state, int inputsIdle, uint length, ChannelMask inMask, int inChannels, SpeakerMode speakerMode)
 {
     return(Result.Ok);
 }
Beispiel #19
0
 internal static extern Result FMOD_System_GetDriverCaps(IntPtr systemHandle, int id, ref Capabilities capabilities, ref int minimumFrequency, ref int maximumFrequency, ref SpeakerMode controlPanelSpeakerMode);
Beispiel #20
0
 internal static extern Result FMOD_System_GetSpeakerMode(IntPtr systemHandle, ref SpeakerMode speakerMode);
Beispiel #21
0
 private void GetOutputDriverCapabilities(int Id, out Capabilities caps, out int minfrequency, out int maxfrequency, out SpeakerMode controlpanelspeakermode)
 {
     Error.Code ReturnCode = GetDriverCaps(this.DangerousGetHandle(), Id, out caps, out minfrequency, out maxfrequency, out controlpanelspeakermode);
     Error.Errors.ThrowError(ReturnCode);
 }
Beispiel #22
0
 private static extern Error.Code GetDriverCaps(IntPtr system, int id, out Capabilities caps, out int minfrequency, out int maxfrequency, out SpeakerMode controlpanelspeakermode);
Beispiel #23
0
 private static extern Result FMOD_DSP_SetChannelFormat(IntPtr dsp, ChannelMask channelmask, int numchannels, SpeakerMode sourceSpeakermode);
Beispiel #24
0
 private static extern Result FMOD_DSP_GetOutputChannelFormat(IntPtr dsp, ChannelMask inmask, int inchannels,
                                                              SpeakerMode inSpeakerMode, out ChannelMask outmask, out int outchannels, out SpeakerMode outSpeakerMode);
Beispiel #25
0
 private SpeakerSystem(Channel systemChannel, SpeakerMode mode)
 {
     this.systemChannel = systemChannel;
     this.mode          = mode;
 }
Beispiel #26
0
 private static extern Result FMOD_DSP_GetChannelFormat(IntPtr dsp, out ChannelMask channelMask, out int numchannels,
                                                        out SpeakerMode sourceSpeakerMode);
Beispiel #27
0
 public ChannelFormat(ChannelMask channelMask, int numChannels, SpeakerMode sourceSpeakerMode)
 {
     ChannelMask       = channelMask;
     NumChannels       = numChannels;
     SourceSpeakerMode = sourceSpeakerMode;
 }
Beispiel #28
0
 private void InitializeMono()
 {
     mode = SpeakerMode.Mono;
     FrontCenterVolume = volumeLevels[0];
 }
Beispiel #29
0
        public OutputChannelFormat?GetOutputChannelFormat(ChannelMask inmask, int inchannels, SpeakerMode inspeakermode)
        {
            CHANNELMASK mask;
            SPEAKERMODE mode;
            int         c;

            if (!FmodDsp.getOutputChannelFormat(EquivalentEnum <ChannelMask, CHANNELMASK> .Cast(inmask), inchannels, EquivalentEnum <SpeakerMode, SPEAKERMODE> .Cast(inspeakermode), out mask, out c, out mode).Check(Suppressions()))
            {
                return(null);
            }

            return(new OutputChannelFormat(
                       EquivalentEnum <CHANNELMASK, ChannelMask> .Cast(mask),
                       c,
                       EquivalentEnum <SPEAKERMODE, SpeakerMode> .Cast(mode)
                       ));
        }
Beispiel #30
0
 public Result GetChannelFormat(out ChannelMask channelmask, out int numchannels, out SpeakerMode sourceSpeakermode)
 {
     return(FMOD_DSP_GetChannelFormat(RawPtr, out channelmask, out numchannels, out sourceSpeakermode));
 }
Beispiel #31
0
 public Result GetOutputChannelFormat(ChannelMask inmask, int inchannels, SpeakerMode inspeakermode, out ChannelMask outmask, out int outchannels, out SpeakerMode outspeakermode)
 {
     return(FMOD_DSP_GetOutputChannelFormat(RawPtr, inmask, inchannels, inspeakermode, out outmask, out outchannels, out outspeakermode));
 }
Beispiel #32
0
 public void GetChannelFormat(out ChannelMask channelmask, out int numchannels, out SpeakerMode source_speakermode)
 {
     library.DSP_GetChannelFormat(Handle, out channelmask, out numchannels, out source_speakermode).CheckResult();
 }
Beispiel #33
0
 public Result SetChannelFormat(ChannelMask channelmask, int numchannels, SpeakerMode sourceSpeakermode)
 {
     return(FMOD_DSP_SetChannelFormat(RawPtr, channelmask, numchannels, sourceSpeakermode));
 }
Beispiel #34
0
 public void SetChannelFormat(ChannelMask channelMask, int numChannels, SpeakerMode sourceSpeakerMode)
 {
     FmodDsp.setChannelFormat(EquivalentEnum <ChannelMask, CHANNELMASK> .Cast(channelMask), numChannels, EquivalentEnum <SpeakerMode, SPEAKERMODE> .Cast(sourceSpeakerMode)).Check(Suppressions());
 }
 private void GetOutputDriverCapabilities(int id, out Capabilities caps, out int minfrequency, out int maxfrequency, out SpeakerMode controlpanelspeakermode)
 {
     Code returnCode = GetDriverCaps(DangerousGetHandle(), id, out caps, out minfrequency, out maxfrequency, out controlpanelspeakermode);
     Errors.ThrowError(returnCode);
 }
Beispiel #36
0
 public OutputChannelFormat(ChannelMask outMask, int outChannels, SpeakerMode outSpeakerMode)
 {
     OutMask        = outMask;
     OutChannels    = outChannels;
     OutSpeakerMode = outSpeakerMode;
 }
Beispiel #37
0
 private void GetOutputDriverCapabilities(int Id, out DeviceCapabilities caps, out int minfrequency, out int maxfrequency, out SpeakerMode controlpanelspeakermode)
 {
     Errors.ThrowIfError(GetDriverCaps(DangerousGetHandle(), Id, out caps, out minfrequency, out maxfrequency, out controlpanelspeakermode));
 }
Beispiel #38
0
 internal RecordDriverInfo(string name, Guid guid, int rate, SpeakerMode speakermode, int channels, DriverState state)
     : base(name, guid, rate, speakermode, channels)
 {
     State = state;
 }
Beispiel #39
0
 private static extern ErrorCode SetSpeakerMode(IntPtr system, SpeakerMode speakermode);
		private void InitializeStereo()
		{
			mode = SpeakerMode.Stereo;
			FrontLeftVolume = volumeLevels[0];
			FrontRightVolume = volumeLevels[1];
		}
 private void GetOutputDriverCapabilities(int Id, out Capabilities caps, out int minfrequency, out int maxfrequency, out SpeakerMode controlpanelspeakermode)
 {
     Error.Code ReturnCode = GetDriverCaps (this.DangerousGetHandle (), Id, out caps, out minfrequency, out maxfrequency, out controlpanelspeakermode);
     Error.Errors.ThrowError (ReturnCode);
 }
Beispiel #42
0
 private static extern ErrorCode GetDriverCaps(IntPtr system, int id, out DeviceCapabilities caps, out int minfrequency, out int maxfrequency, out SpeakerMode controlpanelspeakermode);
Beispiel #43
0
 public void SetSoftwareFormat(int SampleRate, SpeakerMode speakerMode, int RawSpeakerCount)
 {
     library.System_SetSoftwareFormat(Handle, SampleRate, speakerMode, RawSpeakerCount).CheckResult();
 }
		private void InitializeMono()
		{
			mode = SpeakerMode.Mono;
			FrontCenterVolume = volumeLevels[0];
		}
Beispiel #45
0
 public void GetSoftwareFormat(out int SampleRate, out SpeakerMode speakerMode, out int RawSpeakerCount)
 {
     library.System_GetSoftwareFormat(Handle, out SampleRate, out speakerMode, out RawSpeakerCount).CheckResult();
 }
		internal static extern Result FMOD_System_GetDriverCaps(IntPtr systemHandle, int id, ref Capabilities capabilities, ref int minimumFrequency, ref int maximumFrequency, ref SpeakerMode controlPanelSpeakerMode);
Beispiel #47
0
 private static extern Code GetSpeakerMode(IntPtr system, ref SpeakerMode speakermode);