亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? waveout.cs

?? 用C#實(shí)現(xiàn)的取得CellID和LAC的程序源代碼!
?? CS
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):

		/// <summary>
		/// Specifies if playback has finished.
		/// </summary>
		/// <returns>true if no playback is in progress.</returns>
		public bool Done()
		{
			if (m_file != null)
				return m_file.Done;

			return true;
		}

		/// <summary>
		/// Pause playback.
		/// </summary>
		/// <returns>MMSYSERR.NOERROR if successful</returns>
		public Wave.MMSYSERR Pause()
		{
			if (m_file != null)
				return m_file.Pause();

			return Wave.MMSYSERR.NOERROR;
		}

		/// <summary>
		/// Resume playback of a paused sound.
		/// </summary>
		/// <returns>MMSYSERR.NOERROR if successful</returns>
		public Wave.MMSYSERR Resume()
		{
			if (m_file != null)
				return m_file.Resume();

			return Wave.MMSYSERR.NOERROR;
		}

		/// <summary>
		/// Determines the length of the audio file, in milliseconds.
		/// </summary>
		/// <returns>Millieconds</returns>
		public uint Milliseconds()
		{
			if (m_file != null)
				return m_file.Milliseconds;

			return 0;
		}

		/// <summary>
		/// Play a file.
		/// </summary>
		/// <param name="fileName">Name of file to play</param>
		/// <param name="bufferSize">Size of playback buffers</param>
		/// <param name="volLeft">Volume of left channel</param>
		/// <param name="volRight">Volume of right channel</param>
		/// <returns>MMSYSERR.NOERROR if successful</returns>
		public Wave.MMSYSERR Play(string fileName, int bufferSize, ushort volLeft, ushort volRight)
		{
			if (m_file != null)
				return m_file.Play(0, fileName, m_msgWindow.Hwnd, bufferSize, volLeft, volRight);

			return Wave.MMSYSERR.ERROR;
		}

		/// <summary>
		/// A block has finished so notify the WaveFile.  In a more complicated example,
		/// this class might maintain an array of WaveFile instances.  In such a case, the
		/// wParam of the message could be passed from the MM_WIM_DATA message.  This
		/// value represents the m_hwi member of the file that caused the message.
		/// The code might look something like:
		/// foreach (WaveFile f in m_files)
		/// {
		///		if (f.m_hwi.ToInt32() == wParam.ToInt32())
		///		{
		///			f.BlockDone();
		///			break;
		///		}
		/// }
		/// </summary>
		public void BlockDone(IntPtr hwo)
		{
			if (m_file != null)
				m_file.BlockDone();
		}

		/// <summary>
		/// Clean up an allocated resources.
		/// </summary>
		public void Dispose()
		{
			if (m_msgWindow != null)
				m_msgWindow.Dispose();

			if (m_file != null)
				m_file.Dispose();
		}

		/// <summary>
		/// This function retrieves the number of waveform output devices present
		/// in the system.
		/// </summary>
		/// <returns>The number of devices indicates success. Zero indicates that
		/// no devices are present or that an error occurred.</returns>
		[DllImport ("coredll.dll")]
		protected static extern int waveOutGetNumDevs();

		/// <summary>
		/// This function opens a specified waveform output device for playback.
		/// </summary>
		/// <param name="phwo">Address filled with a handle identifying the open
		/// waveform-audio output device. Use the handle to identify the device
		/// when calling other waveform-audio output functions. This parameter might
		/// be NULL if the WAVE_FORMAT_QUERY flag is specified for fdwOpen.</param>
		/// <param name="uDeviceID">Identifier of the waveform-audio output device to
		/// open. It can be either a device identifier or a Handle to an open
		/// waveform-audio input device.</param>
		/// <param name="pwfx">Pointer to a WAVEFORMATEX structure that identifies
		/// the format of the waveform-audio data to be sent to the device. You can
		/// free this structure immediately after passing it to waveOutOpen.</param>
		/// <param name="dwCallback">Specifies the address of a fixed callback function,
		/// an event handle, a handle to a window, or the identifier of a thread to be
		/// called during waveform-audio playback to process messages related to the
		/// progress of the playback. If no callback function is required, this value
		/// can be zero.</param>
		/// <param name="dwInstance">Specifies user-instance data passed to the
		/// callback mechanism. This parameter is not used with the window callback
		/// mechanism.</param>
		/// <param name="fdwOpen">Flags for opening the device.</param>
		/// <returns>MMSYSERR</returns>
		[DllImport ("coredll.dll")]
		private static extern Wave.MMSYSERR waveOutOpen(ref IntPtr phwo, uint uDeviceID, Wave.WAVEFORMATEX pwfx, IntPtr dwCallback, uint dwInstance, uint fdwOpen);

		/// <summary>
		/// This function queries the current volume setting of a waveform output device.
		/// </summary>
		/// <param name="hwo">Handle to an open waveform-audio output device. This
		/// parameter can also be a device identifier.</param>
		/// <param name="pdwVolume">Pointer to a variable to be filled with the current
		/// volume setting. The low-order word of this location contains the left-channel
		/// volume setting, and the high-order word contains the right-channel setting.
		/// A value of 0xFFFF represents full volume, and a value of 0x0000 is silence. 
		/// If a device does not support both left and right volume control, the low-order
		/// word of the specified location contains the mono volume level.
		/// The full 16-bit setting(s) set with the waveOutSetVolume function is returned,
		/// regardless of whether the device supports the full 16 bits of volume-level
		/// control.</param>
		/// <returns>MMSYSERR</returns>
		[DllImport ("coredll.dll")]
		protected static extern Wave.MMSYSERR waveOutGetVolume(IntPtr hwo, ref uint pdwVolume);

		/// <summary>
		/// This function sets the volume of a waveform output device.
		/// </summary>
		/// <param name="hwo">Handle to an open waveform-audio output device. This
		/// parameter can also be a device identifier.</param>
		/// <param name="dwVolume">Specifies a new volume setting. The low-order word
		/// contains the left-channel volume setting, and the high-order word contains
		/// the right-channel setting. A value of 0xFFFF represents full volume, and a
		/// value of 0x0000 is silence. 
		/// If a device does not support both left and right volume control, the low-
		/// order word of dwVolume specifies the volume level, and the high-order word
		/// is ignored.</param>
		/// <returns>MMSYSERR</returns>
		[DllImport ("coredll.dll")]
		protected static extern Wave.MMSYSERR waveOutSetVolume(IntPtr hwo, uint dwVolume);

		/// <summary>
		/// This function prepares a waveform data block for playback.
		/// </summary>
		/// <param name="hwo">Handle to the waveform-audio output device.</param>
		/// <param name="pwh">Pointer to a WAVEHDR structure that identifies the data
		/// block to be prepared. The buffer's base address must be aligned with the
		/// respect to the sample size.</param>
		/// <param name="cbwh">Size, in bytes, of the WAVEHDR structure.</param>
		/// <returns>MMSYSERR</returns>
		[DllImport ("coredll.dll")]
		private static extern Wave.MMSYSERR waveOutPrepareHeader(IntPtr hwo, Wave.WAVEHDR pwh, uint cbwh);

		/// <summary>
		/// This function sends a data block to the specified waveform output device.
		/// </summary>
		/// <param name="hwo">Handle to the waveform-audio output device.</param>
		/// <param name="pwh">Pointer to a WAVEHDR structure containing information
		/// about the data block.</param>
		/// <param name="cbwh">Size, in bytes, of the WAVEHDR structure.</param>
		/// <returns>MMSYSERR</returns>
		[DllImport ("coredll.dll")]
		private static extern Wave.MMSYSERR waveOutWrite(IntPtr hwo, Wave.WAVEHDR pwh, uint cbwh);

		/// <summary>
		/// This function cleans up the preparation performed by waveOutPrepareHeader.
		/// The function must be called after the device driver is finished with a data
		/// block. You must call this function before freeing the data buffer.
		/// </summary>
		/// <param name="hwo">Handle to the waveform-audio output device.</param>
		/// <param name="pwh">Pointer to a WAVEHDR structure identifying the data block
		/// to be cleaned up.</param>
		/// <param name="cbwh">Size, in bytes, of the WAVEHDR structure.</param>
		/// <returns>MMSYSERR</returns>
		[DllImport ("coredll.dll")]
		private static extern Wave.MMSYSERR waveOutUnprepareHeader(IntPtr hwo, Wave.WAVEHDR pwh, uint cbwh);

		/// <summary>
		/// This function closes the specified waveform output device.
		/// </summary>
		/// <param name="hwo">Handle to the waveform-audio output device. If the function
		/// succeeds, the handle is no longer valid after this call.</param>
		/// <returns>MMSYSERR</returns>
		[DllImport ("coredll.dll")]
		protected static extern Wave.MMSYSERR waveOutClose(IntPtr hwo);

		/// <summary>
		/// This function stops playback on a specified waveform output device and
		/// resets the current position to 0. All pending playback buffers are marked
		/// as done and returned to the application.
		/// </summary>
		/// <param name="hwo">Handle to the waveform-audio output device.</param>
		/// <returns>MMSYSERR</returns>
		[DllImport ("coredll.dll")]
		protected static extern Wave.MMSYSERR waveOutReset(IntPtr hwo); 

		/// <summary>
		/// This function pauses playback on a specified waveform output device. The
		/// current playback position is saved. Use waveOutRestart to resume playback
		/// from the current playback position.
		/// </summary>
		/// <param name="hwo">Handle to the waveform-audio output device.</param>
		/// <returns>MMSYSERR</returns>
		[DllImport ("coredll.dll")]
		protected static extern Wave.MMSYSERR waveOutPause(IntPtr hwo);
 
		/// <summary>
		/// This function restarts a paused waveform output device.
		/// </summary>
		/// <param name="hwo">Handle to the waveform-audio output device.</param>
		/// <returns>MMSYSERR</returns>
		[DllImport ("coredll.dll")]
		protected static extern Wave.MMSYSERR waveOutRestart(IntPtr hwo);

		/// <summary>
		/// This structure contains timing information for different types of
		/// multimedia data.
		///		typedef struct mmtime_tag 
		///		{
		///			UINT wType; 
		///			union 
		///			{
		///				DWORD ms; 
		///				DWORD sample; 
		///				DWORD cb; 
		///				DWORD ticks; 
		///				struct 
		///				{
		///					BYTE hour; 
		///					BYTE min; 
		///					BYTE sec; 
		///					BYTE frame; 
		///					BYTE fps; 
		///					BYTE dummy; 
		///					BYTE pad[2]
		///				} smpte; 
		///				struct 
		///				{
		///					DWORD songptrpos;
		///				} midi; 
		///			} u; 
		///		} MMTIME;
		/// </summary>
		protected class MMTIME
		{
			/// <summary>
			/// Time format.
			/// </summary>
			public uint wType = 0;
			/// <summary>
			/// Byte count. Used when wType is TIME_BYTES.
			/// </summary>
			public uint cb = 0;

			// Padding because this is actually a union
			public uint pad = 0;
		} 

		// Used by MMTIME.wType
		protected const uint TIME_MS = 0x0001;
		protected const uint TIME_SAMPLES = 0x0002;
		protected const uint TIME_BYTES = 0x0004;
		protected const uint TIME_TICKS = 0x0020;

		/// <summary>
		/// This function retrieves the current playback position of the specified
		/// waveform output device.
		/// </summary>
		/// <param name="hwo">Handle to the waveform-audio output device.</param>
		/// <param name="pmmt">Pointer to an MMTIME structure.</param>
		/// <param name="cbmmt">Size, in bytes, of the MMTIME structure.</param>
		/// <returns>MMSYSERR</returns>
		[DllImport ("coredll.dll")]
		protected static extern Wave.MMSYSERR waveOutGetPosition(IntPtr hwo, MMTIME pmmt, uint cbmmt); 

		/// <summary>
		/// This structure describes the capabilities of a waveform-audio output device.
		///		typedef struct 
		///		{
		///			WORD wMid; 
		///			WORD wPid; 
		///			MMVERSION vDriverVersion; 
		///			TCHAR szPname[MAXPNAMELEN]; 
		///			DWORD dwFormats; 
		///			WORD wChannels; 
		///			WORD wReserved1; 
		///			DWORD dwSupport;} 
		///		WAVEOUTCAPS;
		///	This structure has an embedded TCHAR array so the managed implementation is
		///	a byte array with accessors.
		/// </summary>
		protected class WAVEOUTCAPS
		{
			const uint WAVEOUTCAPS_SIZE = 84;

			private byte[] m_data = null;
			public uint Size { get { return (uint)WAVEOUTCAPS_SIZE; } }

			/// <summary>
			/// Used by dwSupport in WAVEOUTCAPS
			/// Supports pitch control
			/// </summary>
			public const uint WAVECAPS_PITCH = 0x0001;
			/// <summary>
			/// Used by dwSupport in WAVEOUTCAPS
			/// Supports playback rate control
			/// </summary>
			public const uint WAVECAPS_PLAYBACKRATE = 0x0002;
			/// <summary>
			/// Used by dwSupport in WAVEOUTCAPS
			/// Supports volume control
			/// </summary>
			public const uint WAVECAPS_VOLUME = 0x0004;
			/// <summary>
			/// Used by dwSupport in WAVEOUTCAPS
			/// Supports separate left-right volume control
			/// </summary>
			public const uint WAVECAPS_LRVOLUME = 0x0008;

			/// <summary>
			/// Manufacturer identifier for the device driver for the device.
			/// Manufacturer identifiers are defined in Manufacturer and Product
			/// Identifiers.
			/// </summary>
			public ushort wMid { get { return BitConverter.ToUInt16(m_data, 0); } }
			/// <summary>
			/// Product identifier for the device. Product identifiers are defined in
			/// Manufacturer and Product Identifiers.
			/// </summary>
			public ushort wPid { get { return BitConverter.ToUInt16(m_data, 2); } }
			/// <summary>
			/// Version number of the device driver for the device. The high-order byte
			/// is the major version number, and the low-order byte is the minor version
			/// number.
			/// </summary>
			public uint vDriverVersion { get { return BitConverter.ToUInt32(m_data, 4); } }
			/// <summary>
			/// Specifies the standard formats that are supported.
			/// </summary>
			public uint dwFormats { get { return BitConverter.ToUInt32(m_data, 72); } }
			/// <summary>
			/// Number specifying whether the device supports mono (1) or stereo (2)
			/// output.
			/// </summary>
			public ushort wChannels { get { return BitConverter.ToUInt16(m_data, 76); } }
			/// <summary>
			/// Packing.
			/// </summary>
			public ushort wReserved1 { get { return BitConverter.ToUInt16(m_data, 78); } }
			/// <summary>
			/// Specifies the optional functionality supported by the device.
			/// </summary>
			public uint dwSupport { get { return BitConverter.ToUInt16(m_data, 80); } }
			/// <summary>
			/// Null-terminated string that contains the product name.
			/// </summary>
			public string szPname
			{
				get
				{
					char[] bytes = new char[32];
					for (int i = 0; i < 32; i++)
					{
						bytes[i] = (char)BitConverter.ToUInt16(m_data, i * 2 + 8);
					}

					return new string(bytes);
				}
			}

			public WAVEOUTCAPS()
			{
				m_data = new byte[WAVEOUTCAPS_SIZE];
			}

			public static implicit operator byte[](WAVEOUTCAPS caps)
			{
				return caps.m_data;
			}
		}
 
		/// <summary>
		/// This function queries a specified waveform device to determine its
		/// capabilities.
		/// </summary>
		/// <param name="uDeviceID">Identifier of the waveform-audio output device.
		/// It can be either a device identifier or a Handle to an open waveform-audio
		/// output device.</param>
		/// <param name="pwoc">Pointer to a WAVEOUTCAPS structure to be filled with
		/// information about the capabilities of the device.</param>
		/// <param name="cbwoc">Size, in bytes, of the WAVEOUTCAPS structure.</param>
		/// <returns>MMSYSERR</returns>
		[DllImport ("coredll.dll")]
		protected static extern Wave.MMSYSERR waveOutGetDevCaps(uint uDeviceID, byte[] pwoc, uint cbwoc);

		/// <summary>
		/// Run a test of the WaveOut class.
		/// </summary>
		/// <param name="showLine">Delegate called to show debug information</param>
		public static void SetVolume()
		{
			IntPtr hwo = IntPtr.Zero;
			Wave.WAVEFORMATEX wfmt = new Wave.WAVEFORMATEX();
			wfmt.nChannels = 2;
			
			Wave.MMSYSERR result = waveOutOpen(ref hwo, 0, wfmt, IntPtr.Zero, 0, Wave.CALLBACK_NULL);
			uint volume = 0;
			uint vol = ((uint)volume & 0x0000ffff) | ((uint)volume << 16);

			waveOutSetVolume(hwo, vol);
		}		
	}	
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av手机在线观看| 欧美经典一区二区三区| 精品美女一区二区三区| 国产亚洲一区二区三区四区 | 亚洲一区二区视频在线| 亚洲国产三级在线| 欧美专区亚洲专区| 日韩欧美色综合网站| 国产精品久久久久久久久免费丝袜| 一区二区三区在线播放| 激情五月婷婷综合网| 日本韩国欧美国产| 精品国产乱码久久久久久久| |精品福利一区二区三区| 日韩电影一区二区三区四区| 国产高清在线观看免费不卡| 欧美偷拍一区二区| 欧美国产国产综合| 欧美aaaaa成人免费观看视频| 成人av片在线观看| 日韩欧美二区三区| 亚洲欧美成aⅴ人在线观看| 久久精品国产精品亚洲精品 | 亚洲免费三区一区二区| 人人爽香蕉精品| 97久久久精品综合88久久| 欧美一区二区视频观看视频| 国产精品久久久久婷婷二区次| 日韩1区2区3区| 色久综合一二码| 久久综合九色欧美综合狠狠| 午夜精品影院在线观看| av毛片久久久久**hd| 精品日韩一区二区三区| 亚洲国产精品精华液网站| av在线播放成人| 精品粉嫩aⅴ一区二区三区四区| 亚洲国产综合人成综合网站| 成人毛片在线观看| 久久色在线视频| 日韩不卡一区二区| 欧美熟乱第一页| 亚洲精品国产第一综合99久久| 美女免费视频一区| 日韩在线一区二区| 精品一区二区三区欧美| 欧美亚洲丝袜传媒另类| 国产精品的网站| 国产盗摄女厕一区二区三区| 日韩免费观看2025年上映的电影| 亚洲国产日韩a在线播放| av电影在线观看完整版一区二区| 久久久久久**毛片大全| 久久国产精品72免费观看| 欧美日韩精品一区二区三区四区| 亚洲欧美国产高清| 99精品视频在线播放观看| 国产欧美精品一区aⅴ影院| 国产在线视频一区二区| 日韩免费视频一区二区| 青青草伊人久久| 日韩一区二区在线观看视频| 午夜精品在线看| 欧美电影在线免费观看| 亚洲国产你懂的| 欧美午夜理伦三级在线观看| 国产中文一区二区三区| 久久综合五月天婷婷伊人| 另类的小说在线视频另类成人小视频在线| 91麻豆精品国产自产在线观看一区| 亚洲成人免费看| 91麻豆精品91久久久久久清纯| 日韩精品国产欧美| 日韩欧美一级片| 久久99热99| 欧美精品一区二区三区久久久| 美女在线视频一区| 亚洲精品一区二区精华| 麻豆精品视频在线观看| 久久婷婷国产综合国色天香| 高清shemale亚洲人妖| 中文字幕一区二区三中文字幕| 9i看片成人免费高清| 亚洲精品日韩一| 欧美午夜精品一区| 日本欧美在线观看| 欧美mv日韩mv国产| 国产精品一区二区在线看| 亚洲国产精华液网站w| 91丨九色丨国产丨porny| 一区二区三区小说| 911精品产国品一二三产区| 美女视频第一区二区三区免费观看网站| 欧美电影免费观看高清完整版在 | 91精品国产黑色紧身裤美女| 日韩高清欧美激情| 欧美精品一区二区三区四区| 成人小视频在线| 一区二区三区自拍| 制服.丝袜.亚洲.中文.综合| 国产一二三精品| 国产精品久久久久影院老司| 色综合一区二区三区| 视频精品一区二区| 久久久亚洲国产美女国产盗摄| 成人久久视频在线观看| 一级中文字幕一区二区| 91精品欧美久久久久久动漫| 国产一区二区主播在线| 亚洲欧洲中文日韩久久av乱码| 欧美亚洲图片小说| 国产一区二区看久久| 亚洲欧洲日韩综合一区二区| 欧美日韩成人综合| 国产成人一区二区精品非洲| 亚洲免费看黄网站| 欧美一区二区三级| 成人av第一页| 奇米影视7777精品一区二区| 欧美激情综合五月色丁香| 91福利视频久久久久| 麻豆精品一区二区av白丝在线| 中文字幕精品在线不卡| 欧美日韩一区二区三区四区| 精品一区二区在线视频| 国产成人在线色| 天天操天天综合网| 亚洲国产电影在线观看| 欧美电影在线免费观看| thepron国产精品| 青青草国产成人99久久| 亚洲三级理论片| 精品国产一区久久| 欧洲国产伦久久久久久久| 国产精品99久久久久久似苏梦涵| 亚洲一线二线三线视频| 久久久久久亚洲综合影院红桃| 在线观看av一区| 国产精一区二区三区| 五月婷婷色综合| 亚洲色图清纯唯美| 久久午夜国产精品| 欧美精品色一区二区三区| 99久久精品免费精品国产| 久久99九九99精品| 午夜精品久久久久久久99水蜜桃| 日本一区二区免费在线 | 免费成人在线观看| 亚洲男人电影天堂| 亚洲国产成人在线| 精品久久久久久久人人人人传媒 | 一区二区三区在线视频免费观看| 精品国偷自产国产一区| 在线不卡免费av| 91国偷自产一区二区开放时间 | 国产三级久久久| 欧美一二区视频| 91久久精品午夜一区二区| 粉嫩av一区二区三区| 国内精品自线一区二区三区视频| 日韩在线一区二区三区| 一区二区三区美女视频| 国产精品初高中害羞小美女文| 久久综合九色综合欧美亚洲| 日韩欧美美女一区二区三区| 欧美人牲a欧美精品| 91久久免费观看| 色综合色综合色综合色综合色综合| 成人中文字幕电影| 国产美女久久久久| 国内一区二区在线| 精品一区二区三区在线观看| 男女男精品视频网| 热久久免费视频| 日韩va欧美va亚洲va久久| 午夜激情久久久| 亚洲6080在线| 婷婷亚洲久悠悠色悠在线播放| 亚洲一二三级电影| 亚洲国产视频直播| 亚洲高清中文字幕| 亚洲妇女屁股眼交7| 一区二区免费在线播放| 亚洲影视资源网| 亚洲一区二区三区精品在线| 亚洲精品精品亚洲| 亚洲午夜久久久久| 亚洲成年人网站在线观看| 五月激情综合色| 日韩二区三区在线观看| 日本不卡高清视频| 精品一区二区三区在线播放| 国产一区 二区 三区一级| 岛国精品在线播放| 99久久久国产精品免费蜜臀| 色综合夜色一区| 欧美日韩一区二区在线观看视频 | 久久精品国产在热久久| 精品一区二区免费视频| 国模一区二区三区白浆|