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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? wave.cs

?? 取得GSM基站信息的程序NiceTrack以及源代碼
?? CS
字號:
using System;
using System.IO;
using System.Runtime.InteropServices;

namespace NiceTracker.Libraries
{
	/// <summary>
	/// Encapsulates Wave file properties used internally be WaveIn and WaveOut.
	/// </summary>
	public class Wave
	{
		// Can be used instead of a device id to open a device
		public const uint WAVE_MAPPER = unchecked((uint)(-1));

		// Flag specifying the use of a callback window for sound messages
		public const uint CALLBACK_NULL  = 0x0;
		public const uint CALLBACK_WINDOW  = 0x10000;

		// Error information...
		private const int WAVERR_BASE = 32;
		private const int MMSYSERR_BASE = 0;

		// Enum equivalent to MMSYSERR_*
		public enum MMSYSERR : int
		{
			NOERROR = 0,
			ERROR = (MMSYSERR_BASE + 1),
			BADDEVICEID = (MMSYSERR_BASE + 2),
			NOTENABLED = (MMSYSERR_BASE + 3),
			ALLOCATED = (MMSYSERR_BASE + 4),
			INVALHANDLE = (MMSYSERR_BASE + 5),
			NODRIVER = (MMSYSERR_BASE + 6),
			NOMEM = (MMSYSERR_BASE + 7),
			NOTSUPPORTED = (MMSYSERR_BASE + 8),
			BADERRNUM = (MMSYSERR_BASE + 9),
			INVALFLAG = (MMSYSERR_BASE + 10),
			INVALPARAM = (MMSYSERR_BASE + 11),
			HANDLEBUSY = (MMSYSERR_BASE + 12),
			INVALIDALIAS = (MMSYSERR_BASE + 13),
			BADDB = (MMSYSERR_BASE + 14),
			KEYNOTFOUND = (MMSYSERR_BASE + 15),
			READERROR = (MMSYSERR_BASE + 16),
			WRITEERROR = (MMSYSERR_BASE + 17),
			DELETEERROR = (MMSYSERR_BASE + 18),
			VALNOTFOUND = (MMSYSERR_BASE + 19),
			NODRIVERCB = (MMSYSERR_BASE + 20),
			LASTERROR = (MMSYSERR_BASE + 20)
		}

		// Enum equivalent to WAVERR_*
		private enum WAVERR : int
		{
			NONE = 0,
			BADFORMAT = WAVERR_BASE + 0,
			STILLPLAYING = WAVERR_BASE + 1,
			UNPREPARED = WAVERR_BASE + 2,
			SYNC = WAVERR_BASE + 3,
			LASTERROR = WAVERR_BASE + 3
		}

		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// Invalid format
		/// </summary>
		public const uint WAVE_INVALIDFORMAT = 0x00000000;
		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// 11.025 kHz, Mono,   8-bit
		/// </summary>
		public const uint WAVE_FORMAT_1M08 = 0x00000001;
		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// 11.025 kHz, Stereo, 8-bit
		/// </summary>
		public const uint WAVE_FORMAT_1S08 = 0x00000002;
		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// 11.025 kHz, Mono,   16-bit
		/// </summary>
		public const uint WAVE_FORMAT_1M16 = 0x00000004;
		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// 11.025 kHz, Stereo, 16-bit
		/// </summary>
		public const uint WAVE_FORMAT_1S16 = 0x00000008;
		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// 22.05  kHz, Mono,   8-bit
		/// </summary>
		public const uint WAVE_FORMAT_2M08 = 0x00000010;
		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// 22.05  kHz, Stereo, 8-bit
		/// </summary>
		public const uint WAVE_FORMAT_2S08 = 0x00000020;
		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// 22.05  kHz, Mono,   16-bit
		/// </summary>
		public const uint WAVE_FORMAT_2M16 = 0x00000040;
		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// 22.05  kHz, Stereo, 16-bit
		/// </summary>
		public const uint WAVE_FORMAT_2S16 = 0x00000080;
		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// 44.1   kHz, Mono,   8-bit
		/// </summary>
		public const uint WAVE_FORMAT_4M08 = 0x00000100;
		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// 44.1   kHz, Stereo, 8-bit
		/// </summary>
		public const uint WAVE_FORMAT_4S08 = 0x00000200;
		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// 44.1   kHz, Mono,   16-bit
		/// </summary>
		public const uint WAVE_FORMAT_4M16 = 0x00000400;
		/// <summary>
		/// Used by dwFormats in WAVEINCAPS and WAVEOUTCAPS
		/// 44.1   kHz, Stereo, 16-bit
		/// </summary>
		public const uint WAVE_FORMAT_4S16 = 0x00000800;

		/// <summary>
		/// WAVEFORMATEX defines the format of waveform-audio data. Only format
		/// information common to all waveform-audio data formats is included in
		/// this structure. For formats requiring additional information, this
		/// structure is included as the first member in another structure, along
		/// with the additional information.
		/// </summary>
		public class WAVEFORMATEX
		{
			// Accessors specifying data positions in a .wave file
			// RIFF header up to 20 bytes in .wav file
			protected const int WF_OFFSET_FORMATTAG = 20;
			protected const int WF_OFFSET_CHANNELS = 22;
			protected const int WF_OFFSET_SAMPLESPERSEC = 24;
			protected const int WF_OFFSET_AVGBYTESPERSEC = 28;
			protected const int WF_OFFSET_BLOCKALIGN = 32;
			protected const int WF_OFFSET_BITSPERSAMPLE = 34;
			// Offset 2 for wBitsPerSample
			// + 4 for the subchunk id "data"
			// + 4 for the subchunk length
			public const int WF_OFFSET_DATA = 44;

			/// <summary>
			/// Waveform-audio format type. Format tags are registered with Microsoft
			/// Corporation for many compression algorithms. A complete list of
			/// format tags is located in the Mmsystem.h header file. 
			/// </summary>
			public ushort wFormatTag = 0;
			/// <summary>
			/// Number of channels in the waveform-audio data. Monaural data uses one
			/// channel and stereo data uses two channels.
			/// </summary>
			public ushort nChannels = 0;
			/// <summary>
			/// Sample rate, in samples per second (hertz), that each channel should
			/// be played or recorded. If wFormatTag is WAVE_FORMAT_PCM, then common
			/// values for nSamplesPerSec are 8.0 kHz, 11.025 kHz, 22.05 kHz, and
			/// 44.1 kHz. For non-PCM formats, this member must be computed according
			/// to the manufacturer's specification of the format tag.
			/// </summary>
			public uint nSamplesPerSec = 0;
			/// <summary>
			/// Required average data-transfer rate, in bytes per second, for the format
			/// tag. If wFormatTag is WAVE_FORMAT_PCM, nAvgBytesPerSec should be equal to
			/// the product of nSamplesPerSec and nBlockAlign. For non-PCM formats, this
			/// member must be computed according to the manufacturer's specification of
			/// the format tag. 
			/// Playback and record software can estimate buffer sizes by using the
			/// nAvgBytesPerSec member. 
			/// </summary>
			public uint nAvgBytesPerSec = 0;
			/// <summary>
			/// Block alignment, in bytes. The block alignment is the minimum atomic unit
			/// of data for the wFormatTag format type. If wFormatTag is WAVE_FORMAT_PCM,
			/// nBlockAlign should be equal to the product of nChannels and wBitsPerSample
			/// divided by 8 (bits per byte). For non-PCM formats, this member must be
			/// computed according to the manufacturer's specification of the format tag. 
			/// Playback and record software must process a multiple of nBlockAlign bytes
			/// of data at a time. Data written and read from a device must always start
			/// at the beginning of a block. For example, it is illegal to start playback
			/// of PCM data in the middle of a sample (that is, on a non-block-aligned
			/// boundary). 
			/// </summary>
			public ushort nBlockAlign = 0;
			/// <summary>
			/// Bits per sample for the wFormatTag format type. If wFormatTag is
			/// WAVE_FORMAT_PCM, then wBitsPerSample should be equal to 8 or 16. For
			/// non-PCM formats, this member must be set according to the manufacturer's
			/// specification of the format tag. Some compression schemes cannot define
			/// a value for wBitsPerSample, so this member can be zero.
			/// </summary>
			public ushort wBitsPerSample = 0;

			/// <summary>
			/// Seeks the provided Stream to the position at which this structure starts.
			/// Namely, the wFormatTag member.
			/// </summary>
			/// <param name="fs"></param>
			public void SeekTo(Stream fs)
			{
				fs.Seek(WF_OFFSET_FORMATTAG, SeekOrigin.Begin);
			}

			/// <summary>
			/// Seeks the provided Stream to the position immediately after this
			/// structure.
			/// </summary>
			/// <param name="fs"></param>
			public void Skip(Stream fs)
			{
				fs.Seek(WF_OFFSET_DATA, SeekOrigin.Begin);
			}

			/// <summary>
			/// Read in a WAVEFORMATEX from the given BinaryReader.
			/// </summary>
			/// <param name="rdr">BinaryReader accessing a WAVEFORMATEX.</param>
			/// <returns>The size of the data following the structure</returns>
			public void Read(BinaryReader rdr)
			{
				wFormatTag		= rdr.ReadUInt16();
				nChannels		= rdr.ReadUInt16();
				nSamplesPerSec	= rdr.ReadUInt32();
				nAvgBytesPerSec	= rdr.ReadUInt32();
				nBlockAlign		= rdr.ReadUInt16();
				wBitsPerSample	= rdr.ReadUInt16();

				// Unused subchunk Id and size
				uint dataId		= rdr.ReadUInt32();
				uint dataLength	= rdr.ReadUInt32();
			}

			/// <summary>
			/// Write out a WAVEFORMATEX to the given BinaryWriter.
			/// </summary>
			/// <param name="wrtr">BinaryWriter to receive the WAVEFORMATEX
			/// information</param>
			public void Write(BinaryWriter wrtr)
			{
				wrtr.Write(wFormatTag);
				wrtr.Write(nChannels);
				wrtr.Write(nSamplesPerSec);
				wrtr.Write(nAvgBytesPerSec);
				wrtr.Write(nBlockAlign);
				wrtr.Write(wBitsPerSample);
			}
		}

		/// <summary>
		/// This structure defines the header used to identify a waveform-audio buffer.
		///		typedef struct 
		///		{
		///			LPSTR lpData;
		///			DWORD dwBufferLength;
		///			DWORD dwBytesRecorded;
		///			DWORD dwUser;
		///			DWORD dwFlags;
		///			DWORD dwLoops;
		///			struct wavehdr_tag *lpNext;
		///				DWORD reserved;}
		///			WAVEHDR;
		/// </summary>
		public class WAVEHDR : IDisposable
		{
			/// <summary>
			/// Used by dwFlags in WAVEHDR
			/// Set by the device driver to indicate that it is finished with the buffer
			/// and is returning it to the application.
			/// </summary>
			public const int WHDR_DONE = 0x00000001;
			/// <summary>
			/// Used by dwFlags in WAVEHDR
			/// Set by Windows to indicate that the buffer has been prepared with the
			/// waveInPrepareHeader or waveOutPrepareHeader function.
			/// </summary>
			public const int WHDR_PREPARED = 0x00000002;
			/// <summary>
			/// Used by dwFlags in WAVEHDR
			/// This buffer is the first buffer in a loop. This flag is used only with
			/// output buffers.
			/// </summary>
			public const int WHDR_BEGINLOOP = 0x00000004;
			/// <summary>
			/// Used by dwFlags in WAVEHDR
			/// This buffer is the last buffer in a loop. This flag is used only with
			/// output buffers.
			/// </summary>
			public const int WHDR_ENDLOOP = 0x00000008;
			/// <summary>
			/// Used by dwFlags in WAVEHDR
			/// Set by Windows to indicate that the buffer is queued for playback.
			/// </summary>
			public const int WHDR_INQUEUE = 0x00000010;

			/// <summary>
			/// Set in WAVEFORMATEX.wFormatTag to specify PCM data.
			/// </summary>
			public const int WAVE_FORMAT_PCM = 1;

			/// <summary>
			/// Long pointer to the address of the waveform buffer. This buffer must
			/// be block-aligned according to the nBlockAlign member of the
			/// WAVEFORMATEX structure used to open the device.
			/// </summary>
			public IntPtr lpData = IntPtr.Zero;
			/// <summary>
			/// Specifies the length, in bytes, of the buffer.
			/// </summary>
			public uint dwBufferLength = 0;
			/// <summary>
			/// When the header is used in input, this member specifies how much data
			/// is in the buffer.
			/// </summary>
			public uint dwBytesRecorded = 0;
			/// <summary>
			/// Specifies user data.
			/// </summary>
			public uint dwUser = 0;
			/// <summary>
			/// Specifies information about the buffer.
			/// </summary>
			public uint dwFlags = 0;
			/// <summary>
			/// Specifies the number of times to play the loop. This member is used
			/// only with output buffers.
			/// </summary>
			public uint dwLoops = 0;
			/// <summary>
			/// Reserved.
			/// </summary>
			public IntPtr lpNext = IntPtr.Zero;
			/// <summary>
			/// Reserved.
			/// </summary>
			public uint reserved = 0;

			/// <summary>
			/// Read a data buffer from the supplied BinaryReader.  This method will
			/// allocate memory for the data buffer it is not already allocated.
			/// </summary>
			/// <param name="rdr">BinaryReader containing data</param>
			/// <param name="readLength">Size, in bytes, to be read</param>
			/// <returns>MMSYSERR.NOERROR if successful</returns>
			public MMSYSERR Read(BinaryReader rdr, uint readLength, int align)
			{
				uint bufferLength = readLength;

				if (bufferLength % align != 0)
					bufferLength += (uint)(align - (bufferLength % align));

				dwBufferLength = bufferLength;
				byte[] data = new byte[readLength];
				rdr.Read(data, 0, data.Length);

				if (lpData == IntPtr.Zero)
					lpData = Memory.LocalAlloc(Memory.LMEM_FIXED, (uint)bufferLength);

				if (lpData == IntPtr.Zero)
					return MMSYSERR.NOMEM;
				
				Marshal.Copy(data, 0, lpData, data.Length);

				return MMSYSERR.NOERROR;
			}

			/// <summary>
			/// Write the contents of the recorded buffer to the supplied
			/// BinaryWriter.
			/// </summary>
			/// <param name="wrtr">BinaryWriter used as write target</param>
			/// <returns>MMSYSERR.NOERROR if successful</returns>
			public Wave.MMSYSERR Write(BinaryWriter wrtr)
			{
				if (lpData == IntPtr.Zero)
					return Wave.MMSYSERR.NOMEM;

				byte[] data = new byte[dwBytesRecorded];
				Marshal.Copy(lpData, data, 0, data.Length);
				wrtr.Write(data);

				return Wave.MMSYSERR.NOERROR;
			}

			/// <summary>
			/// Initialize an instance of a WAVEHDR with the specified buffer
			/// size.
			/// </summary>
			/// <param name="bufferLength">Size, in bytes, of buffer</param>
			/// <param name="init">true=clear data to 0</param>
			/// <returns>MMSYSERR.NOERROR if successful</returns>
			public MMSYSERR Init(uint bufferLength, bool init)
			{
				if (lpData != IntPtr.Zero && dwBufferLength < bufferLength)
				{
					Memory.LocalFree(lpData);
					lpData = IntPtr.Zero;
				}

				if (lpData == IntPtr.Zero)
					lpData = Memory.LocalAlloc(Memory.LMEM_FIXED, bufferLength);

				dwBufferLength = bufferLength;

				if (lpData == IntPtr.Zero)
					return MMSYSERR.NOMEM;

				if (init)
				{
					for (int i = 0; i < bufferLength; i++)
					{
						Marshal.WriteByte(lpData, i, 0);
					}
				}

				return MMSYSERR.NOERROR;
			}

			/// <summary>
			/// Frees any memory allocated for the buffer.
			/// </summary>
			public void Dispose()
			{
				if (lpData != IntPtr.Zero)
					Memory.LocalFree(lpData);
			}
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产视频一区| 一本久久综合亚洲鲁鲁五月天 | 成人激情动漫在线观看| 在线视频一区二区三区| 久久九九久久九九| 午夜欧美大尺度福利影院在线看| 成人小视频在线| 日韩一区二区三区三四区视频在线观看| 中文字幕不卡在线观看| 久久99这里只有精品| 欧洲另类一二三四区| 亚洲欧洲日产国码二区| 国产成人免费视频| 日韩欧美一区中文| 亚洲大片精品永久免费| 91丨porny丨户外露出| 国产欧美一区二区精品性色| 日本美女一区二区| 欧美日韩国产天堂| 一区二区三区中文字幕| 99久久99久久精品免费观看| 国产亚洲一区二区三区四区| 激情五月婷婷综合| 精品女同一区二区| 久久se精品一区精品二区| 日韩欧美久久一区| 免费欧美日韩国产三级电影| 91精品欧美久久久久久动漫| 亚洲h在线观看| 日韩一区二区三区在线观看| 五月激情丁香一区二区三区| 777午夜精品视频在线播放| 婷婷六月综合亚洲| 日韩女同互慰一区二区| 久久不见久久见免费视频7| 亚洲精品在线免费播放| 激情综合网天天干| 国产日本欧美一区二区| 成人精品视频一区二区三区尤物| 中文字幕精品一区二区精品绿巨人 | 亚洲欧美激情小说另类| 色综合久久中文字幕| 夜夜亚洲天天久久| 欧美性受xxxx黑人xyx性爽| 亚洲乱码国产乱码精品精的特点| 色婷婷亚洲精品| 天堂蜜桃91精品| 久久众筹精品私拍模特| 国产成a人无v码亚洲福利| 中文字幕一区二区在线观看| 色哟哟在线观看一区二区三区| 亚洲午夜影视影院在线观看| 91精品国产高清一区二区三区蜜臀| 蜜桃精品视频在线观看| 久久夜色精品国产欧美乱极品| 成人影视亚洲图片在线| 亚洲精品一卡二卡| 日韩精品一区二区三区视频播放| 国产精品一区二区视频| 亚洲欧美日韩精品久久久久| 欧美综合天天夜夜久久| 老司机精品视频一区二区三区| 欧美激情中文字幕| 欧美三片在线视频观看| 久久国产成人午夜av影院| 亚洲色图视频免费播放| 56国语精品自产拍在线观看| 懂色av一区二区夜夜嗨| 制服丝袜一区二区三区| 精彩视频一区二区| 一区二区三区日韩在线观看| 日韩欧美另类在线| 91美女视频网站| 久久国产精品99久久人人澡| 亚洲免费观看高清完整版在线观看| 欧美一区国产二区| 成人av中文字幕| 麻豆成人91精品二区三区| 成人免费一区二区三区视频 | 国产女同互慰高潮91漫画| 欧美午夜一区二区三区| 国产91精品精华液一区二区三区 | 亚洲国产电影在线观看| 6080yy午夜一二三区久久| 99re成人在线| 国产成人综合在线观看| 亚洲成人黄色小说| 亚洲欧美日韩精品久久久久| 久久免费精品国产久精品久久久久 | 在线免费一区三区| 国产aⅴ综合色| 久久99热这里只有精品| 亚洲国产欧美在线| 中文字幕一区三区| 久久精品视频在线免费观看| 在线播放欧美女士性生活| 91日韩精品一区| 成人网页在线观看| 国产精品88av| 激情五月激情综合网| 美国十次综合导航| 日韩国产在线一| 亚洲在线一区二区三区| 亚洲伦理在线免费看| 亚洲午夜精品久久久久久久久| 国产日韩欧美不卡| 久久久国产精品午夜一区ai换脸| 日韩女优电影在线观看| 91精品国产综合久久久久久漫画 | 亚洲国产精品二十页| 精品久久久久久久人人人人传媒| 日韩一区二区电影| 欧美一区二区三区系列电影| 在线成人小视频| 91精品国产高清一区二区三区 | 日本一区二区动态图| 久久久91精品国产一区二区三区| 精品电影一区二区| 久久久久久久网| 国产丝袜在线精品| 中文字幕中文字幕一区| 日韩一区在线看| 一区二区三区丝袜| 亚洲图片有声小说| 亚洲第一在线综合网站| 日日夜夜精品视频天天综合网| 日日骚欧美日韩| 国产一区二区在线观看免费| 国产成人在线电影| av毛片久久久久**hd| 成人黄色综合网站| 在线这里只有精品| 欧美疯狂性受xxxxx喷水图片| 日韩一级片在线观看| 欧美成人a∨高清免费观看| 精品国产凹凸成av人网站| 亚洲国产精品精华液2区45| 一区免费观看视频| 亚洲国产欧美日韩另类综合| 日本欧美加勒比视频| 国产91精品在线观看| 91婷婷韩国欧美一区二区| 欧美日韩精品免费| 久久精品在线免费观看| 亚洲欧美偷拍卡通变态| 日日骚欧美日韩| 成人激情免费视频| 欧美日韩午夜在线视频| 日韩欧美国产麻豆| 亚洲色图在线播放| 蜜臀精品久久久久久蜜臀| 成人性视频网站| 91精品久久久久久蜜臀| 国产欧美日韩在线| 日韩综合在线视频| 国产成a人亚洲精| 制服丝袜亚洲播放| 国产精品免费aⅴ片在线观看| 五月综合激情网| 成人av午夜电影| 精品精品国产高清一毛片一天堂| 亚洲欧洲成人自拍| 久久99国产精品麻豆| 色av一区二区| 国产亚洲欧美色| 视频精品一区二区| 99国产精品视频免费观看| 日韩午夜在线影院| 一区二区久久久| 成人免费视频免费观看| 欧美电影免费观看高清完整版| 亚洲欧美一区二区三区孕妇| 国产麻豆精品久久一二三| 欧美精品三级在线观看| 亚洲卡通动漫在线| 国产成人精品免费| 欧美va亚洲va在线观看蝴蝶网| 亚洲一区二区免费视频| www.日韩大片| 国产午夜亚洲精品理论片色戒| 青娱乐精品在线视频| 精品视频资源站| 亚洲欧美另类综合偷拍| 成人国产电影网| 国产亚洲成年网址在线观看| 免费看欧美女人艹b| 欧美日韩国产大片| 亚洲一区二区高清| 欧洲精品在线观看| 亚洲美女免费在线| 色综合天天视频在线观看| 中文字幕国产一区| 国产精品一区在线观看乱码 | 欧美精品粉嫩高潮一区二区| 亚洲三级免费电影| 91麻豆精品秘密| 亚洲伊人色欲综合网| 日本久久一区二区| 亚洲一区二区影院| 欧美私模裸体表演在线观看|