Exemple #1
0
            private int GetValue(int controlid)
            {
                IntPtr volumes = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(int)) * 2);

                Marshal.WriteInt32(volumes, 0);
                IMLibrary.AV.MIXERCONTROLDETAILS details = new MIXERCONTROLDETAILS();
                details.cbStruct       = Marshal.SizeOf(details);
                details.cChannels      = 1;
                details.cbDetails      = 4;
                details.cMultipleItems = 0;
                details.dwControlID    = controlid;
                details.paDetails      = (int)volumes;
                Mixer.mixerGetControlDetails(mixer.Handle, ref details, 0);
                int ret = Marshal.ReadInt32(volumes);

                Marshal.FreeCoTaskMem(volumes);
                return(ret);
            }
Exemple #2
0
            private void SetValue(int controlid, int value)
            {
                IntPtr volumes = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(int)) * 2);

                Marshal.WriteInt32(volumes, value);
                IMLibrary.AV.MIXERCONTROLDETAILS details = new MIXERCONTROLDETAILS();
                details.cbStruct       = Marshal.SizeOf(details);
                details.cChannels      = 1;
                details.cbDetails      = 4;
                details.cMultipleItems = 0;
                details.dwControlID    = controlid;
                details.paDetails      = (int)volumes;
                int r = Mixer.mixerSetControlDetails(mixer.Handle, ref details, 0);

                System.Diagnostics.Trace.WriteLine(r.ToString());
                int ret = Marshal.ReadInt32(volumes);

                System.Diagnostics.Trace.WriteLine(ret.ToString());
                Marshal.FreeCoTaskMem(volumes);
            }
Exemple #3
0
 public static extern int mixerSetControlDetails(
     IntPtr hmxobj,
     ref MIXERCONTROLDETAILS pmxcd,
     uint fdwDetails
     );
Exemple #4
0
 public static extern int mixerGetControlDetails(
     int hmxobj,
     ref MIXERCONTROLDETAILS pmxcd,
     int fdwDetails
     );
Exemple #5
0
		public static extern int mixerSetControlDetails (
			IntPtr hmxobj,
			ref MIXERCONTROLDETAILS pmxcd,
			uint fdwDetails
			);
Exemple #6
0
		public static extern int mixerGetControlDetails (
			int hmxobj,
			ref MIXERCONTROLDETAILS pmxcd,
			int fdwDetails
			);
Exemple #7
0
			private void SetValue(int controlid,int value)
			{
				IntPtr volumes=Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(int))*2);
				Marshal.WriteInt32(volumes,value);
				IMLibrary.AV.MIXERCONTROLDETAILS details=new MIXERCONTROLDETAILS();
				details.cbStruct=Marshal.SizeOf(details);
				details.cChannels=1;
				details.cbDetails=4;
				details.cMultipleItems=0;
				details.dwControlID=controlid;
				details.paDetails=(int)volumes;
				int r=Mixer.mixerSetControlDetails(mixer.Handle,ref details,0);
				System.Diagnostics.Trace.WriteLine(r.ToString());
				int ret=Marshal.ReadInt32(volumes);
				System.Diagnostics.Trace.WriteLine(ret.ToString());
				Marshal.FreeCoTaskMem(volumes);
			}
Exemple #8
0
			private int GetValue(int controlid)
			{
				IntPtr volumes=Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(int))*2);
				Marshal.WriteInt32(volumes,0);
				IMLibrary.AV.MIXERCONTROLDETAILS details=new MIXERCONTROLDETAILS();
				details.cbStruct=Marshal.SizeOf(details);
				details.cChannels=1;
				details.cbDetails=4;
				details.cMultipleItems=0;
				details.dwControlID=controlid;
				details.paDetails=(int)volumes;
				Mixer.mixerGetControlDetails(mixer.Handle,ref details,0);
				int ret=Marshal.ReadInt32(volumes);
				Marshal.FreeCoTaskMem(volumes);
				return ret;
			}